-
Notifications
You must be signed in to change notification settings - Fork 20
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
Use govuk-frontend v5 #3855
Closed
Closed
Use govuk-frontend v5 #3855
Commits on Mar 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9fcd6c6 - Browse repository at this point
Copy the full SHA 9fcd6c6View commit details -
Use Terser instead of Uglifier
govuk_publishing_components has govuk-frontend as a dependency. govuk-frontend v5 now targets browsers that support ES6. This means that the UMD modules used in govuk_publsihing_components from govuk-frontend use features of ES6 and so it means that Uglifier can't be used anymore because it only supports ES5. As well as installing terser and updating the config, this commit also contains a patch for getting terser working. Sprockets doesn't have an built-in loader for terser so we need to add this functionality.
Configuration menu - View commit details
-
Copy full SHA for a8ed809 - Browse repository at this point
Copy the full SHA a8ed809View commit details -
Move Javascript modules to es6-components
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"`.
Configuration menu - View commit details
-
Copy full SHA for 0e74baf - Browse repository at this point
Copy the full SHA 0e74bafView commit details -
Change initialisation method to new method
In govuk-frontend v5, the `init` function is now called when a module is created. This meant changing how the `initAll()` function works in govuk_publishing_components so that it does not call `init()` when initialising components JavaScript. It also meant moving `init` functions in components to the constructor to bring them in line with the new way of initialising.
Configuration menu - View commit details
-
Copy full SHA for 9321840 - Browse repository at this point
Copy the full SHA 9321840View commit details -
Remove deprecated scss variables
- Remove $legacy attribute in govuk-colour - Remove $govuk-compatibility-govuktemplate - Remove $govuk-new-link-styles
Configuration menu - View commit details
-
Copy full SHA for 4e930eb - Browse repository at this point
Copy the full SHA 4e930ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1677e6 - Browse repository at this point
Copy the full SHA f1677e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 430e63f - Browse repository at this point
Copy the full SHA 430e63fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c45f15 - Browse repository at this point
Copy the full SHA 9c45f15View commit details -
Configuration menu - View commit details
-
Copy full SHA for 56d1bf5 - Browse repository at this point
Copy the full SHA 56d1bf5View commit details
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.