-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
2f2209b
to
b2059e5
Compare
de8930b
to
35057dc
Compare
35057dc
to
9832a2a
Compare
fe70206
to
7aa60ee
Compare
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.
LGTM 🎉 Swapping these out turned out to be a bit more complicated than we initially thought and this solution resolves it all quite cleanly without the need for adding extra options to the gem which is nice. I've compared the generated HTML of the relevant templates before and after and it all looks good. The extensive commit messages were also super helpful when reviewing the changes, thanks for doing that 🙏
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
Updated the tests to check that the "title", "link" and "description" for each search result/tagged content is included on the page
7aa60ee
to
da64b05
Compare
What
Why
The taxon-list component is no longer required
The taxon-list 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
Accessibility improvement
Since the document-list component doesn’t support headings for lists of links, we’ve decided not to try and add this option into the component. This is because wrapping links in headings is not a suitable option for loads of GOV.UK pages since:
<p>
tag) after it. Having a heading or a mix of headings and plain links doesn’t seem to be a good option here as it could be confusing for usersVisual 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)
https://collections-pr-3844.herokuapp.com/world/living-in-afghanistan (tagged_content_list.html.erb)
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