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

Legislature tabs #15426

Closed
wants to merge 3 commits into from
Closed

Legislature tabs #15426

wants to merge 3 commits into from

Conversation

octopusinvitro
Copy link
Contributor

@octopusinvitro octopusinvitro commented Sep 2, 2016

This PR was superseeded by #15451

What does this do?

This PR rescues the work of @zarino adding a tab component in PR #13598

Why was this needed?

After merging the house/download page, it was clear that either a reword of the bottom of that page was needed (#15259) or either to go for the tab component integration directly (#15240). The latter was chosen and so this PR integrates Zarino's work in #13598 to the term table page instead.

Relevant Issue(s)

This is part of issue #15259 regarding the reword the house download page, which was part of issue #15240 to link between legislature download pages in the same country. It is also the last point in the first section of the workflow described in todo list #15256

Implementation notes

I took the two first commits made by Zarino, added the changes from his fixup commit, and updated the variables used in the template to use the page object passed to the template. Then I added his two commits to this branch. Finally, I made my changes on top of those two commits.

Adds:

  • A new tabbed component in the term_table.erb template and related styles.
  • Styles for smaller screens.
  • Tests to check that the tabs are displayed correctly and with the right information

Screenshots

Country with more than one legislature:

screen shot 2016-07-25 at 14 15 11

screen shot 2016-07-25 at 15 09 39

Country with only one legislature:

screen shot 2016-07-25 at 15 08 09

screen shot 2016-07-25 at 15 09 14

Notes to Reviewer

If the tab component is added to more pages, it's probably better to extract it to it's own erb partial.
But for now, since this is the first page where the component is integrated, I decided to leave it in the template.

Some candidates for tab component integration:

  • /country/house/
  • /country/house/download.html
  • /country/house/wikidata ?
  • ...?

layouts

Notes to Merger

This PR should finish section 1 of #15256 🎉 🎈

@tmtmtmtm tmtmtmtm temporarily deployed to everypolitician-viewe-pr-15426 September 2, 2016 11:12 Inactive
@tmtmtmtm tmtmtmtm temporarily deployed to everypolitician-viewe-pr-15426 September 2, 2016 11:36 Inactive
@tmtmtmtm tmtmtmtm temporarily deployed to everypolitician-viewe-pr-15426 September 2, 2016 12:12 Inactive
zarino and others added 3 commits September 2, 2016 14:39
Makes it easier to move from, for example, a country's lower to
upper chamber. Will also help people navigate once executive
branch is included (#13297).
Also includes some fixes for various term_table page elements
that were causing horizontal scrolling on narrow screens.
@davewhiteland
Copy link
Contributor

tabs look fine to me, it's a good solution, thanks for implementing it 👍

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.

4 participants