Skip to content

Commit

Permalink
Merge pull request #3067 from fecgov/feature/3040-new-data-summary-la…
Browse files Browse the repository at this point in the history
…nguage

[Due by July 22nd] Add new data summary language to various pages
  • Loading branch information
patphongs authored Jul 22, 2019
2 parents f83b933 + 5adcb11 commit 22ae197
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 4 deletions.
9 changes: 7 additions & 2 deletions fec/data/templates/macros/bythenumbers.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
{% endfor %}
</select>
</form>

<span class="t-sans js-dates"></span>
<div class="chart-table simple-table--responsive js-top-table" id="top-table" aria-live="polite" role="grid">
<div role="row" class="simple-table__header">
<div role="columnheader" class="simple-table__header-cell cell--40">Name</div>
<div role="columnheader" class="simple-table__header-cell cell--20 t-right-aligned">Total {{ action }}</div>
<div role="columnheader" class="simple-table__header-cell cell--40"></div>
</div>

</div>
<div class="results-info">
<button class="js-previous is-disabled button button--standard button--previous"><span class="u-visually-hidden">Previous page</span></button>
Expand All @@ -51,11 +51,16 @@
Showing <span class="js-page-info"></span> entries
</div>
</div>

</div>

<div class="content__section row">
<ul class="list--buttons u-float-right">
<li><a class="button button--standard button--table" href="/data/{{ value_field }}">Browse {{value_field}}</a></li>
<li><button class="button button--alt js-ga-event" data-a11y-dialog-show="{{ action }}-modal" data-ga-event="{{ action }} methodology modal clicked" aria-controls="{{ action }}-modal">Methodology</button></li>


</ul>
<p><i>Newly filed summary data may not appear for up to 48 hours.</i></p>
</div>
{% endmacro %}
10 changes: 10 additions & 0 deletions fec/data/templates/macros/disclaimer.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,13 @@
{# <a href="{{ url_for(type, committee_id=id, cycle=cycle) }}">access the list of itemized transactions.</a></p> #}
</div>
{% endmacro %}
{% macro summary() %}
<div class="accordion--neutral">
<div class="accordion__content">
<div class="message message--info message--small">
<p class="t-sans">Newly filed summary data may not appear for up to 48 hours.</p>
</div>
</div>
</div>
{% endmacro %}

1 change: 1 addition & 0 deletions fec/data/templates/macros/tables.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,6 @@ not 'type' object, so use 'link' to check for 'independent-expenditures' and 'pa
</tr>
{% endfor %}
</table>
<p class="t-small u-negative--top--margin"><i>Newly filed summary data may not appear for up to 48 hours.</i></p>
</figure>
{% endmacro %}
5 changes: 4 additions & 1 deletion fec/data/templates/partials/browse-data/raising.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@
</section>
</li>
<li>
<div class="content__section--indent-left">
<div class="content__section--ruled">

<p class="t-small u-negative--top--margin t-serif"><i>Newly filed summary data may not appear for up to 48 hours.</i></p>

<div class="js-accordion accordion--neutral" data-content-prefix="methodology_raising">
<button type="button" class="js-accordion-trigger accordion__button">Methodology</button>
<div class="accordion__content">
Expand Down
3 changes: 2 additions & 1 deletion fec/data/templates/partials/browse-data/spending.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@
</section>
</li>
<li>
<div class="content__section--indent-left">
<div class="content__section--ruled">
<p class="t-small u-negative--top--margin t-serif"><i>Newly filed summary data may not appear for up to 48 hours.</i></p>
<div class="js-accordion accordion--neutral" data-content-prefix="methodology_spending">
<button type="button" class="js-accordion-trigger accordion__button">Methodology</button>
<div class="accordion__content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
<span class="t-block t-sans">Spent by others to <strong>oppose</strong> from <strong>{{cycle_start(min_cycle)|date_full}} to {{cycle_end(max_cycle)|date_full}}.</strong></span>
</div>
</div>

<p class="t-note u-padding--top--small">Newly filed summary data may not appear for up to 48 hours.</p>

<table
class="data-table data-table--heading-borders"
data-type="independent-expenditures"
Expand Down
3 changes: 3 additions & 0 deletions fec/data/templates/partials/candidate/raising.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
</div>
</div>
</div>
<div class="content__section--ruled">
<p class="t-small u-negative--top--margin"><i>Newly filed summary data may not appear for up to 48 hours.</i></p>
</div>
</div>
{% endif %}

Expand Down
3 changes: 3 additions & 0 deletions fec/data/templates/partials/candidate/spending.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
</div>
</div>
</div>
<div class="content__section--ruled">
<p class="t-small u-negative--top--margin"><i>Newly filed summary data may not appear for up to 48 hours.</i></p>
</div>
</div>
{% endif %}

Expand Down
3 changes: 3 additions & 0 deletions fec/data/templates/partials/candidates-office-filter.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{% import 'macros/filters/election-filter.jinja' as election_filter %}
{% import 'macros/filters/range.jinja' as range_filter %}
{% import 'macros/filters/years.jinja' as years %}
{% import 'macros/disclaimer.jinja' as disclaimer %}

{% block filters %}
<div class="js-accordion accordion--neutral" data-content-prefix="filter" data-open-first="false">
Expand Down Expand Up @@ -41,5 +42,7 @@
</div>
{% endif %}
</div>

</div>
{{ disclaimer.summary() }}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
</div>
</div>
{{ tables.summary(ie_summary) }}
<p class="t-note">Newly filed summary data may not appear for up to 48 hours.</p>
</div>
<!-- Inaugural Committees -->
{% elif organization_type == 'I' %}
Expand Down
3 changes: 3 additions & 0 deletions fec/data/templates/partials/committee/raising.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
</div>
</div>
</div>
<div class="content__section--ruled">
<p class="t-small u-negative--top--margin"><i>Newly filed summary data may not appear for up to 48 hours.</i></p>
</div>
</div>
{% endif %}
<div class="entity__figure" id="individual-contribution-transactions">
Expand Down
3 changes: 3 additions & 0 deletions fec/data/templates/partials/committee/spending.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
</div>
</div>
</div>
<div class="content__section--ruled">
<p class="t-small u-negative--top--margin"><i>Newly filed summary data may not appear for up to 48 hours.</i></p>
</div>
</div>
{% endif %}

Expand Down
6 changes: 6 additions & 0 deletions fec/fec/static/js/widgets/aggregate-totals-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,12 @@ function buildElement(callingInstance, scriptElement) {
// `;
toReturn.innerHTML = theInnerHTML;

let disclaimer = document.createElement('span');
disclaimer.setAttribute('class', 't-note');
disclaimer.innerHTML =
'Newly filed summary data may not appear for up to 48 hours.';
toReturn.appendChild(disclaimer);

// Add the stylesheet to the document <head>
let head = document.head;
let linkElement = document.createElement('link');
Expand Down
7 changes: 7 additions & 0 deletions fec/fec/static/scss/components/_type-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@
color: $secondary-contrast;
}

.t-serif {
font-family: $serif
}

.t-sans-serif {
font-family: $sans-serif
}
// Set a bigger size to lead paragraphs
.t-lead,
.t-lead p,
Expand Down
4 changes: 4 additions & 0 deletions fec/fec/static/scss/layout/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@
margin-right: u(1rem);
}

.u-negative--top--margin {
margin-top: u(-1rem);
}

// horizontal rule

.hr--lighter {
Expand Down

0 comments on commit 22ae197

Please sign in to comment.