-
Notifications
You must be signed in to change notification settings - Fork 119
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 #6616
Draft
patrickpatrickpatrick
wants to merge
9
commits into
main
Choose a base branch
from
use-govuk-frontend-v5
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Use govuk frontend v5 #6616
Commits on May 20, 2024
-
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 8ea0309 - Browse repository at this point
Copy the full SHA 8ea0309View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0efaf11 - Browse repository at this point
Copy the full SHA 0efaf11View 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 5943fe9 - Browse repository at this point
Copy the full SHA 5943fe9View 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 0df3336 - Browse repository at this point
Copy the full SHA 0df3336View commit details -
Remove deprecated CSS variables
- Remove $govuk-compatibility-govuktemplate - Remove $govuk-use-legacy-palette - Remove $govuk-new-link-styles
Configuration menu - View commit details
-
Copy full SHA for 19d7e66 - Browse repository at this point
Copy the full SHA 19d7e66View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1792d89 - Browse repository at this point
Copy the full SHA 1792d89View commit details -
Configuration menu - View commit details
-
Copy full SHA for c38ee1c - Browse repository at this point
Copy the full SHA c38ee1cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4460f66 - Browse repository at this point
Copy the full SHA 4460f66View commit details -
Configuration menu - View commit details
-
Copy full SHA for 94091e5 - Browse repository at this point
Copy the full SHA 94091e5View 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.