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

Clean up scripts #2405

Merged
merged 6 commits into from
Mar 2, 2021
Merged

Clean up scripts #2405

merged 6 commits into from
Mar 2, 2021

Conversation

alex-ju
Copy link
Contributor

@alex-ju alex-ju commented Jan 28, 2021

What

Clean up scripts in static:

  • Replace track-click with gem equivalent (requires similar update across frontend apps to switch to gem-track-click)
  • Remove toggle script (requires update across frontend apps to switch to gem-toggle)
  • Remove sticky-element-container script (moved to government-frontend as it's not used elsewhere)
  • Remove deprecated scripts (not in use across frontend apps)

Why

To reduce the size of assets served to users and keep our codebase to a minimum.

Checklist

Notes

E2E tests are failing for known reasons that will be addressed at the application-level as described above.
All public-facing applications relying on static have been updated to use the latest version govuk_publishing_components where components do not rely on track-click from static anymore.

@alex-ju
Copy link
Contributor Author

alex-ju commented Feb 25, 2021

Rebased and e2e tests are passing now, as expected after the app-level changes have been merged. Will preserve this as draft until the govuk_publishing_components is released and rolled out across GOV.UK.

Update: All public-facing applications relying on static have been updated to use the latest version govuk_publishing_components where components do not rely on track-click from static anymore.

@alex-ju alex-ju marked this pull request as ready for review February 26, 2021 13:37
@alex-ju alex-ju requested review from andysellick and injms March 2, 2021 12:19
alex-ju added 6 commits March 2, 2021 14:49
The equivalent gem versions are rewritten using the prototype pattern and do not depend on jQuery. We point to those versions to prevent further edits on these files in static.
This script is not being used by static and it's already made available to frontend applications via govuk_publishing_components.
This is only being used in `government-frontnend` so we're moving it there instead.
`selection-buttons` was only used in GOV.UK Elements which is deprecated and not required by any application

`shim-links-with-button-role` is now embeded in `govuk-frontend` and required by the button component when in use
No evidence of this being used across frontend applications
No evidence of this being used across frontend applications
@alex-ju alex-ju force-pushed the replace-scripts-with-gem-equivalents branch from a68b3e5 to 8615490 Compare March 2, 2021 14:50
@alex-ju alex-ju merged commit 5784ddf into master Mar 2, 2021
@alex-ju alex-ju deleted the replace-scripts-with-gem-equivalents branch March 2, 2021 15:20
@alex-ju
Copy link
Contributor Author

alex-ju commented Mar 19, 2021

Speedcurve results for this change (mobile, 2G)

Web vitals

Screenshot 2021-03-19 at 19 17 57

CPU metrics

Screenshot 2021-03-19 at 19 18 12

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