Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 3 more sections to election summary page #388

Merged
merged 14 commits into from
Jul 17, 2020

Conversation

ckingbailey
Copy link
Contributor

Partial resolution of #364

Adds

  • Who is contributing to races on this ballot?
  • Candidates with the largest proportion of small contributions (under $100)
  • Where is the money coming from?
    to the election summary page.

Does not add Top 5 Spenders. We're waiting for the data from the backend team for that one.

Previews

Large screens

Screenshot_2020-07-14 Oakland November 3rd, 2020 General Election

Small screens

@ckingbailey ckingbailey changed the title Feat/more summary page Add 3 more sections to election summary page Jul 15, 2020
Comment on lines 7 to 8
{% for source in election_totals.total_contributions_by_source %}
{% assign amount = contribution_type[1] %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the amount be assigned to the source variable that comes out of the for loop here? Or is this correct, in order to calculate/set the max variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like both of these loops could be removed as the max value is now provided at the key total_contributions.

<h2>Who is contributing to races on this ballot?</h2>
</div>
<div class="l-section__content">
{% for contribution_type in election_totals.contributions_by_type %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above, you have this line written as:

{% for contribution_type in election_totals['contributions_by_type'] %}

Is there a reason for the difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason. I don't know why we wound up with a mix of square bracket and dot notation in this file. Dot would be consistent with the rest of the code, I think

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I ❤️ consistency.

@anlawyer
Copy link
Member

Couple more things:

  • Any idea why the candidate names under "with the largest proportion of small contributions" have commas after each name/link?
  • About the design... the fonts for the headers on this summary page feel unnecessarily large to me. This is especially evident in the mobile views, but I think even in the normal desktop view, the headers each seem so much bigger than the text in the nav on the side, it feels a little awkward to me. What do you think?

@ckingbailey
Copy link
Contributor Author

  • Any idea why the candidate names under "with the largest proportion of small contributions" have commas after each name/link?

Looks like it's supposed to be Candidate Name, Office but the office is missing from the data. The comma is left over from the dummy data, which included the office. Pinging @mikeubell here and on the backend.

  • About the design... the fonts for the headers on this summary page feel unnecessarily large to me. This is especially evident in the mobile views, but I think even in the normal desktop view, the headers each seem so much bigger than the text in the nav on the side, it feels a little awkward to me. What do you think?

Now that you point it out, I agree they look too big on mobile. They're the same size as candidate's data headings, like "Contributions", "Expenses", which are h2. Maybe they look big because they're long lines of text, instead of compact headings like "Expenses".

How's h3 look?

desquetop

Screen Shot 2020-07-15 at 9 11 58 PM

mobíl

@anlawyer
Copy link
Member

Now that you point it out, I agree they look too big on mobile. They're the same size as candidate's data headings, like "Contributions", "Expenses", which are h2. Maybe they look big because they're long lines of text, instead of compact headings like "Expenses".

How's h3 look?

I like that better! The h2 compared to the size of the text in the side nav also just seemed awkward, maybe out of place? Good point about it being for longer phrases than just one word, I think the h3 is good. What do you think about changing the title of the page ("Data for Oakland Election...") to be an h2 instead of (I assume) the h1? It just seems so massive compared to everything else on the page.

@ckingbailey
Copy link
Contributor Author

What do you think about changing the title of the page ("Data for Oakland Election...") to be an h2 instead of (I assume) the h1? It just seems so massive compared to everything else on the page.

Looks 🍕 ✌️ me

desk

Screen Shot 2020-07-15 at 9 57 24 PM

mōb

@anlawyer
Copy link
Member

:shipit:

@ckingbailey
Copy link
Contributor Author

Office titles are innnnnnn 🎉 !

Screen Shot 2020-07-16 at 7 20 09 PM

@ckingbailey ckingbailey merged commit 56d0eac into master Jul 17, 2020
@ckingbailey ckingbailey deleted the feat/more-summary-page branch July 17, 2020 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants