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.0 #4104

Merged
merged 3 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
  • Remove Sass variables

Why

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

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 seperate 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

Remove Sass variables

  • The $legacy attribute in govuk-colour has been deprecated and using it will have no effect (other than generating warnings on pre-compilation)
  • Removed $govuk-compatibility-govuktemplate as this is no longer available
  • Removed $govuk-new-link-styles as this is now set to true by default

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

Trello


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

@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-4104 June 10, 2024 11:01 Inactive
@MartinJJones MartinJJones force-pushed the upgrade-to-govuk-frontend-5.1.0 branch from 5d29a2a to 5e7111d Compare June 18, 2024 12:42
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-4104 June 18, 2024 12:42 Inactive
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-4104 June 28, 2024 13:37 Inactive
@MartinJJones MartinJJones force-pushed the upgrade-to-govuk-frontend-5.1.0 branch from 21d593f to 172d42d Compare June 28, 2024 13:41
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-4104 June 28, 2024 13:42 Inactive
@MartinJJones MartinJJones force-pushed the upgrade-to-govuk-frontend-5.1.0 branch from 172d42d to 17400f4 Compare July 5, 2024 14:38
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-4104 July 5, 2024 14:38 Inactive
@MartinJJones MartinJJones changed the title Upgrade to govuk frontend 5.1.0 [DO NOT MERGE] Upgrade to govuk frontend 5.1.0 Jul 5, 2024
Copy link
Member

@hannalaakso hannalaakso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me 👍

@MartinJJones MartinJJones force-pushed the upgrade-to-govuk-frontend-5.1.0 branch from 17400f4 to 32e5b35 Compare July 12, 2024 10:47
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-4104 July 12, 2024 10:48 Inactive
patrickpatrickpatrick and others added 3 commits July 15, 2024 11:24
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"`.
Updated to support v5 of govuk-frontend:

- The $govuk-use-legacy-palette and $legacy have been removed as these features are no longer available
- Removed $govuk-compatibility-govuktemplate as this is no longer available
- Removed $govuk-new-link-styles as this is now set to true by default
@MartinJJones MartinJJones force-pushed the upgrade-to-govuk-frontend-5.1.0 branch from 32e5b35 to 56e33e8 Compare July 15, 2024 10:25
@govuk-ci govuk-ci temporarily deployed to govuk-frontend-app-pr-4104 July 15, 2024 10:25 Inactive
@MartinJJones MartinJJones changed the title [DO NOT MERGE] Upgrade to govuk frontend 5.1.0 Upgrade to govuk frontend 5.1.0 Jul 15, 2024
@MartinJJones MartinJJones marked this pull request as ready for review July 15, 2024 11:55
@MartinJJones MartinJJones merged commit cd0b851 into main Jul 15, 2024
12 checks passed
@MartinJJones MartinJJones deleted the upgrade-to-govuk-frontend-5.1.0 branch July 15, 2024 11:56
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.

None yet

5 participants