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

Revert "Add signup links index to data_attributes" #3218

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

andysellick
Copy link
Contributor

What

Reverts #3140

Why

This was some quite complex code to ensure that the values for indexes for GA4 tracking were correct on the 'Get emails' and 'Subscribe to feed' links at the top and bottom of search results. The top two were supposed to have an index of 1 and 2, and the bottom two had to have 3 and 4.

The problem was that sometimes only one of these links was visible, so the indexes had to account for that - the top link would be index 1, the bottom link index 2.

This was all fine until we realised that on mobile the links at the top are always hidden, using CSS. Since we can't know the size of the user viewport when rendering the page (without some additional and probably nasty JS) the decision was made to remove the index values entirely a the links already have information that shows whether they're at the top or the bottom.

Visual changes

None.

Trello card: https://trello.com/c/qALJdYg1/722-amend-index-on-mobile-view-of-subscribe-to-rss-feed-link

andysellick and others added 2 commits November 21, 2023 09:47
- set-indexes attempts to automatically calculate and set the indexes on links using JavaScript. Since we no longer need the indexes this is unnecessary
@govuk-ci govuk-ci temporarily deployed to finder-frontend-pr-3218 November 21, 2023 10:03 Inactive
@govuk-ci govuk-ci temporarily deployed to finder-frontend-pr-3218 November 21, 2023 10:06 Inactive
@andysellick andysellick force-pushed the revert-3140-fix_subscription_links_index branch from da1e1e7 to 56dbf48 Compare November 21, 2023 10:12
@govuk-ci govuk-ci temporarily deployed to finder-frontend-pr-3218 November 21, 2023 10:13 Inactive
@andysellick andysellick marked this pull request as ready for review November 21, 2023 11:02
@andysellick andysellick merged commit 315abeb into main Nov 22, 2023
7 checks passed
@andysellick andysellick deleted the revert-3140-fix_subscription_links_index branch November 22, 2023 08:39
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.

3 participants