-
Notifications
You must be signed in to change notification settings - Fork 5
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 "House Download" page #15245
Add "House Download" page #15245
Conversation
|
||
def legislative_periods | ||
house.legislative_periods | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the tests pass if I change this implementation to house.legislative_periods.take(1)
, which probably isn't so good…
def initialize(country:, house:, index:) | ||
@country = country | ||
@house = house | ||
@index = index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to instantiate with a @country
here?
@@ -0,0 +1,198 @@ | |||
<div class="page-section page-section--grey text-center"> | |||
<div class="container"> | |||
<h3>Download data for politicians in <%= @page.house.name %>, <%= @page.country.name %>.</h3> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this might be simpler as "Download data for politicians in this legislature." because
- you've already got the house and country name immediately above this line anyway
- it might an article (e.g., "...politicians in the Senate..." but I'm not sure that automatically works for every house name we have (it might))
So I suggest you simplify this with no variables in the string, and if it causes upset subsequently raise an issue to fix/refine it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, as we did in the House page 👍
Generally looking good, though I'm a little concerned that we have a "Want politicians who aren’t from [this country]?" section, but don't explain what to do if you want politicians from a different house in the same country. It doesn't necessarily need to be solved in this PR, but if it's going to happen separately we should at least link to the issue for resolving that. (Likewise for un-hiding the terms.) @davewhiteland perhaps this PR is a good test case for rewriting the description in the style that the new PR template should take? |
Review summaryMeets acceptance criteria?
UXSlight issue with getting to equivalent page for other legislatures in this country, but that can be done in another PR. Architecture
Tests
Style
Git/GitHub
@davewhiteland I've rewritten the Issue description more in line with the style I think we should move to, and cross-linked the things that are now more clearly able to be done post-merge, than as pre-requisites to merge. So I think this is good to go! 👍 @octopusinvitro If you want squash down the fixup! commit before merging, go ahead. Otherwise, let's |
e465b44
to
b535df1
Compare
This template was based on the country download template. It allows to download data for a single legislature.
The terms information describe was misleading as it was testing for a single term. This commit adds a test for the total number of terms and tests the information of two different terms, 113 and 114
Removed because they are already in the main header
Removed because it is already in the main heading
After rebasing master onto this branch and running the tests, some were failing due to the recent simplification of the signature of the term_table_url method. This commit updates the template to use the new signature.
b535df1
to
2413c8f
Compare
This was omitted when migrating download pages from country to house level. Refer to everypolitician#15245, everypolitician#15255.
What does this do?
This PR creates dedicated download pages for a single-legislature-data download.
Why was this needed?
The per-country Download page is too cluttered and confusing, so we want to split it up into separate Download pages per legislature instead.
Relevant Issue(s)
Part of #13599. Part of #15256.
Implementation notes
Adds:
HouseDownload
Screenshots
Notes to Reviewer
There is a lot of duplication here with the Country Download page (particularly the template). However, we will be removing that page before this one goes public, so it's OK to live with the duplication for a little while.
Notes to Merger
This should not go fully live (i.e. on EveryPolitician.org until all the tickets in the first section of #15256 are complete, however it is safe to merge before then as no other public pages will link to here, and so it will not yet get spidered.