-
Notifications
You must be signed in to change notification settings - Fork 6
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 #3376
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
MartinJJones
force-pushed
the
upgrade-to-govuk-frontend-5.1.0
branch
from
June 10, 2024 11:22
5b8a7e0
to
795e329
Compare
MartinJJones
force-pushed
the
upgrade-to-govuk-frontend-5.1.0
branch
from
July 5, 2024 15:10
795e329
to
591dde3
Compare
MartinJJones
added
the
do-not-merge
Indicates that a PR should not be merged into master / release branches
label
Jul 5, 2024
MartinJJones
changed the title
Upgrade to govuk frontend 5.1.0
[DO NOT MERGE] Upgrade to govuk frontend 5.1.0
Jul 5, 2024
andysellick
approved these changes
Jul 8, 2024
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.
Changes look good. I note that the tests are failing, but only because this branch doesn't have the v5 upgrade as part of it yet, so that's fine.
MartinJJones
force-pushed
the
upgrade-to-govuk-frontend-5.1.0
branch
from
July 12, 2024 12:27
591dde3
to
2a88393
Compare
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"`.
- $govuk-new-link-styles is now set to true by default - The other SCSS variables are deprecated from v5 of govuk-frontend
Updated to continue to use the closest Polyfill from v4 of govuk-frontend which is now included in the publishing_components_gem
AshGDS
force-pushed
the
upgrade-to-govuk-frontend-5.1.0
branch
from
July 15, 2024 09:48
774896b
to
ab15234
Compare
AshGDS
changed the title
[DO NOT MERGE] Upgrade to govuk frontend 5.1.0
Upgrade to govuk frontend 5.1.0
Jul 15, 2024
AshGDS
removed
the
do-not-merge
Indicates that a PR should not be merged into master / release branches
label
Jul 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
es6-components.js
fileWhy
Move components that rely on govuk-frontend modules to seperate
es6-components.js
fileIn the event that a browser below the target for
govuk-frontend
loads a page with JS on it, attempting to parse the JS fromgovuk-frontend
will cause an error. To avoid this from happening, JS that containsgovuk-frontend
JS has been moved to seperate file which will be loaded in a script tag withtype="module"
. This will prevent the JS from being parsed and so prevent the errorRemove Sass variables
$legacy
attribute ingovuk-colour
has been deprecated and using it will have no effect (other than generating warnings on pre-compilation)$govuk-compatibility-govuktemplate
$govuk-use-legacy-palette
$govuk-typography-use-rem
$govuk-new-link-styles
is now set totrue
by default, so it does not need to be setUpdate polyfill file paths
Browser polyfills are no longer included in v5 of govuk-frontend, any Polyfills provided in v4 of govuk-frontend will be included in the new version of the govuk-publishing-components gem.
The intention is for this PR to include the bump to the govuk-frontend v5 version of the govuk-publishing-components gem, this will also fix the failing tests relating to the missing polyfill.
Trello
Follow these steps if you are doing a Rails upgrade.