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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/party pages descriptions #1566

Merged
merged 4 commits into from
Apr 24, 2023
Merged

Feat/party pages descriptions #1566

merged 4 commits into from
Apr 24, 2023

Conversation

Bekabyx
Copy link
Contributor

@Bekabyx Bekabyx commented Apr 20, 2023

Next phase of the Party Pages overhaul - now featuring more useful data for voters! Trello.

Ref #1200

This update adds:

  • Party descriptions, ordered the same way as they're ordered on the EC website (date last change authorised)
  • An indicator as to which register the party is on (GB or NI)

Screenshots
Screenshot 2023-04-20 at 14 30 04
Screenshot 2023-04-20 at 14 29 52

To test locally:
Part 1

  • Make sure you're fully up to date with migrations and import_parties
  • Run the project
  • Go to a party page who has descriptions (I chose party:52)
  • Check that you can see the descriptions
  • Go through to the EC link
  • Check that the descriptions are in the correct order

Part 2

  • Find a party you know to be registered in GB (party:52 works here too)
  • Check that you can see "This party is on the Great Britain register."

Part 3

  • Find a party you know to be registered in NI (I used party:51 - very convenient)
  • Check that you can see "This party is on the Northern Ireland register."

Tasks

@coveralls
Copy link

coveralls commented Apr 20, 2023

Coverage Status

Coverage: 58.245% (+0.09%) from 58.159% when pulling 6dc1d10 on feat/party-pages-descriptions into b286cdc on master.

@Bekabyx Bekabyx force-pushed the feat/party-pages-descriptions branch 3 times, most recently from 8c62ad8 to 18ab1eb Compare April 20, 2023 14:08
@Bekabyx Bekabyx marked this pull request as ready for review April 20, 2023 14:17
@@ -57,6 +57,13 @@ <h2>{{ object.format_name }}</h2>
{% endif %}
</div>
{% endif %}

{% if object.register %}
{% blocktrans with register=object.format_register %}
Copy link
Member

Choose a reason for hiding this comment

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

if you add trimmed to this block then the the translation file isn't going to contain the newliens and it will make things a little cleaner. Not a huge deal, but it does reduce the noise in diffs when we make changes in future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added trimmed now and fixed up :)

@Bekabyx Bekabyx force-pushed the feat/party-pages-descriptions branch from eacc8cf to 969ce5b Compare April 24, 2023 13:45
This is wrapped inside a logic block so the section will not be
shown if there are no descriptions in our DB.

Also added ordering to the PartyDescription objects.
- Details whether party registered in GB or NI
@Bekabyx Bekabyx force-pushed the feat/party-pages-descriptions branch from 969ce5b to 6dc1d10 Compare April 24, 2023 13:53
@Bekabyx Bekabyx merged commit 1557bc7 into master Apr 24, 2023
5 checks passed
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.

None yet

4 participants