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

Upgrade to govuk frontend 5.1 #1785

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Conversation

MartinJJones
Copy link
Contributor

@MartinJJones MartinJJones commented Jun 10, 2024

What

Move components that rely on govuk-frontend modules to separate es6-components.js file

Why

In the event that a browser below the target for govuk-frontend loads a page with JS on it, attempting to parse the JS from govuk-frontend will cause an error. To avoid this from happening, JS that contains govuk-frontend JS has been moved to separate file which will be loaded in a script tag with type="module". This will prevent the JS from being parsed and so prevent the error

Trello

The intention is for the PR to include the upgrade to the version of the publishing_components_gem as well, once released.


⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

@MartinJJones MartinJJones changed the title Move Javascript modules to es6-components Upgrade to govuk frontend 5.1 Jun 10, 2024
@MartinJJones MartinJJones force-pushed the upgrade-to-govuk-frontend-5.1 branch from 45999be to 89cb177 Compare June 24, 2024 10:40
@MartinJJones MartinJJones force-pushed the upgrade-to-govuk-frontend-5.1 branch from 89cb177 to ffb32a3 Compare July 5, 2024 14:50
@MartinJJones MartinJJones changed the title Upgrade to govuk frontend 5.1 [DO NOT MERGE] Upgrade to govuk frontend 5.1 Jul 5, 2024
@MartinJJones MartinJJones force-pushed the upgrade-to-govuk-frontend-5.1 branch from ffb32a3 to a5eaf49 Compare July 12, 2024 12:31
patrickpatrickpatrick and others added 2 commits July 15, 2024 10:45
To prevent browsers evaluating JS that isn't supported, components that
contain code from govuk-frontend have been moved to a separate file
`es6-components.js` which is included in `application.html.erb` as a
script tag with `type="module"`.
@AshGDS AshGDS force-pushed the upgrade-to-govuk-frontend-5.1 branch from 61dfd23 to 9f123cd Compare July 15, 2024 09:47
@MartinJJones MartinJJones changed the title [DO NOT MERGE] Upgrade to govuk frontend 5.1 Upgrade to govuk frontend 5.1 Jul 15, 2024
@MartinJJones MartinJJones marked this pull request as ready for review July 15, 2024 10:44
@MartinJJones MartinJJones merged commit b4a3cff into main Jul 15, 2024
11 checks passed
@MartinJJones MartinJJones deleted the upgrade-to-govuk-frontend-5.1 branch July 15, 2024 10:44
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.

4 participants