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

Feature/4718 pac snapshot #4767

Merged
merged 17 commits into from
Jul 28, 2021
Merged

Feature/4718 pac snapshot #4767

merged 17 commits into from
Jul 28, 2021

Conversation

rfultz
Copy link
Contributor

@rfultz rfultz commented Jul 14, 2021

Summary

Building the PAC snapshot

Required reviewers

UX, front-end (x2?), back-end to check the Python (I don't love this proposal)

Impacted areas of the application

Adds the snapshot to the committees-single template, adds a couple new variables to get_committee in views.py

Screenshots

(Include a screenshot of the new/updated features in context (“in the wild”). If it is an interface change, include both before and after screenshots)

Related PRs

None

How to test

  • pull branch
  • npm run build
  • ./manage.py runserver
  • Check a ton of committee pages, sure to check different types (There have been several discussions and spreadsheets for good examples)

Known issues

  • I don't love this approach of determining the text to display for the glossary links
  • There are still some glossary links that need guidance

@codecov-commenter
Copy link

codecov-commenter commented Jul 14, 2021

Codecov Report

Merging #4767 (0865246) into develop (83f478e) will decrease coverage by 0.53%.
The diff coverage is 24.69%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4767      +/-   ##
===========================================
- Coverage    75.77%   75.24%   -0.54%     
===========================================
  Files          125      125              
  Lines         7690     7771      +81     
  Branches       622      622              
===========================================
+ Hits          5827     5847      +20     
- Misses        1863     1924      +61     
Impacted Files Coverage Δ
fec/data/views.py 49.21% <23.61%> (-5.91%) ⬇️
fec/data/templatetags/filters.py 63.15% <25.00%> (-2.88%) ⬇️
fec/fec/settings/base.py 89.58% <100.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 83f478e...0865246. Read the comment docs.

@patphongs
Copy link
Member

  • I don't love this approach of determining the text to display for the glossary links

@rfultz I think the approach is good and it's also clear as to what committee types are relevant. In fact, you'll need it for more than just the glossary, we'll need it to determine whether or not to even show the snapshot on the page, since we're only doing this for certain committees right now.

Comment on lines +60 to +63
{% else %}
{% set rec_ind_l = '!' %}
{% set rec_ind_ring = '0 100' %}
{% set rec_ind_class = '' %}
Copy link
Member

Choose a reason for hiding this comment

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

@rfultz I think this applies to if it's 0 then give the "!" error state? Do we really want to do that anytime it's 0? Are there currently any errors thrown from the API right now when it can't be calculated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New code just committed includes == 0 values in the outer if statement

Copy link
Member

@patphongs patphongs left a comment

Choose a reason for hiding this comment

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

Looks good @rfultz, thanks for making those quick fixes. My comment about the error state isn't a blocker to getting this merged in, but I would like to have more error handling logic worked out when we're able to fine tune it.

@JonellaCulmer
Copy link
Contributor

@rfultz Here are my comments on changes. Nothing serious that blocks a merge under the feature flag, but I'd really like to take a deeper dive into the math to make sure it works for parties, SSFs and other committees that may not fit the original design, like we discussed during demo. I would like these changes before launch, in that sense these would be blockers. But not today.

Screen Shot 2021-07-19 at 9 36 58 PM

Copy link
Contributor

@johnnyporkchops johnnyporkchops left a comment

Choose a reason for hiding this comment

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

Looks good. Nice job on the svg implementation!

@rfultz
Copy link
Contributor Author

rfultz commented Jul 21, 2021

New updates on the way!

There's a spreadsheet of committees with outlier values

@JonellaCulmer
Copy link
Contributor

@rfultz Everything looks really great. The only thing we missing is that some committees are SSFs and require two glossary terms. I've highlighted them in the spreadsheet in green. https://docs.google.com/spreadsheets/d/1WkNHCI-vXqxM1ZOSK0d-HZp9Sbx3Tj0CWnoKiC9rjbE/edit#gid=0.

I know we're still waiting on some definitions. So if you're planning to do all the remaining glossary terms at the same time I'm fine with that.

@patphongs
Copy link
Member

@rfultz Everything looks really great. The only thing we missing is that some committees are SSFs and require two glossary terms. I've highlighted them in the spreadsheet in green. https://docs.google.com/spreadsheets/d/1WkNHCI-vXqxM1ZOSK0d-HZp9Sbx3Tj0CWnoKiC9rjbE/edit#gid=0.

I know we're still waiting on some definitions. So if you're planning to do all the remaining glossary terms at the same time I'm fine with that.

The rest of the glossary changes will be handled in this ticket: #4793. I'll merge in the current code so that we have this snapshot feature under the feature flag.

@patphongs patphongs merged commit f6b545a into develop Jul 28, 2021
@lbeaufort lbeaufort deleted the feature/4718-pac-snapshot branch October 20, 2021 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PAC Snapshot: build snapshot front-end
5 participants