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

Remove taxon-list app component from collections #3844

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MartinJJones
Copy link
Contributor

@MartinJJones MartinJJones commented Nov 12, 2024

What

  • Remove the taxon-list app component
  • Update taxon_list_helper.rb to work with the document-list component
  • Replaced taxon-list app component with either the list or document-list gem components in several view templates

Why

The taxon-list component is no longer required, it was originally created for an AB Test on https://www.gov.uk/education/funding-and-finance-for-students#/education/student-grants-bursaries-scholarships. This page is now using the document-list component from the govuk_publishing_components gem

Visual changes

Spacing is increased slightly for list items when using the document-list component

https://collections-pr-3844.herokuapp.com/world/afghanistan (accordion.html.erb)

Before After
Screenshot 2024-11-26 at 15 21 02 Screenshot 2024-11-26 at 15 21 10

https://collections-pr-3844.herokuapp.com/world/living-in-afghanistan (tagged_content_list.html.erb)

Before After
accordion-before accordion-after

https://collections-pr-3844.herokuapp.com/government/ministers/secretary-of-state-for-foreign-commonwealth-and-development-affairs (past_role_holders.html.erb) - No visual changes

Trello card

@govuk-ci govuk-ci temporarily deployed to collections-pr-3844 November 18, 2024 09:40 Inactive
@MartinJJones MartinJJones force-pushed the remove-taxon-list-component branch 5 times, most recently from a7e0d1b to de8930b Compare November 27, 2024 10:33
Remove all files relating to the taxon-list component the taxon-list component as it is no longer required.

The component was originally created for an AB Test on https://www.gov.uk/education/funding-and-finance-for-students#/education/student-grants-bursaries-scholarships

This page is now using the document-list component from the govuk_publishing_components gem
Update data structure returned from `taxon_list_params` method

Updated the structure to work with the document-list gem component, setting `full_size_description: true` ensures the font-size is set to 19px for the description when present - https://components.publishing.service.gov.uk/component-guide/document_list/with_full_size_description_text
- Use the `document-list` component from the gem instead of the `taxon-list` app component in the `tagged_content_list.html.erb` and `accordion.html.erb` view templates
- By using the document-list component, the list will change from an ordered list to an unordered list, this feels like a slight improvement as the content presented does not appear to be in order of sequence/importance
- `heading_level` variable removed from the `tagged_content_list.html.erb` template, the document-list component does not support headings and is not required here

This approach is also consistent with other places the document-list component is used, for example:

- [Education, training and skills - GOV.UK](https://www.gov.uk/education)  (collections)
- [Find contact details for services - GOV.UK](https://www.gov.uk/contact)  (feedback)
- [Travel or do business in Europe: Brexit guidance](https://www.gov.uk/government/collections/brexit-guidance) (government-frontend)
- set `disable_ga4: true` to disable GA4 tracking
  - in the accordion.html.erb this prevents duplicate events from firing as this is already built into the accordion component
  - GA4 was not enabled previously in the tagged_content_list.html.erb
Replace the `taxon-list` component with the `list` component from the govuk_publishing_components gem.

`list_type: "number"` has been used to ensure an ordered list is used to match the current HTML structure
@govuk-ci govuk-ci temporarily deployed to collections-pr-3844 November 27, 2024 14:11 Inactive
@MartinJJones MartinJJones changed the title Remove taxon-list component Remove taxon-list app component from collections Nov 27, 2024
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