-
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 [DO NOT MERGE] #3700
Commits on May 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d92ca8f - Browse repository at this point
Copy the full SHA d92ca8fView commit details -
Update govuk-frontend asset paths
In govuk-frontend v5 the asset path has changed from: `govuk-frontend/govuk/` to `govuk-frontend/govuk/dist` so we have to change references to the old path.
Configuration menu - View commit details
-
Copy full SHA for 05b66e4 - Browse repository at this point
Copy the full SHA 05b66e4View commit details -
Remove references to the crown fallback
In govuk-frontend v5.0.0, the crown fallback image for IE8 has been removed so we need to remove all references to this asset in the gem.
Configuration menu - View commit details
-
Copy full SHA for f0115a3 - Browse repository at this point
Copy the full SHA f0115a3View commit details -
Remove references to govuk-frontend JS polyfills
In govuk-frontend v5.0.0, JS polyfills have been removed so therefore we need to remove all references to these in the gem.
Configuration menu - View commit details
-
Copy full SHA for 465fb4d - Browse repository at this point
Copy the full SHA 465fb4dView commit details -
Update govuk-frontend .js file names
In the govuk-frontend v5, the .js of UMD files has been changed to use the "*.bundle.js" suffix. This means we have to update references to those UMD files in the JS of the components.
Configuration menu - View commit details
-
Copy full SHA for e5398c7 - Browse repository at this point
Copy the full SHA e5398c7View commit details -
Remove reference to details.js
As of govuk-frontend v5, the details component does not use JS and the .js file has been removed from the package. Remove the `data-module="govuk-details"` attribute See 'Remove references to the JavaScript for the Details component' from https://github.com/alphagov/govuk-frontend/releases/tag/v5.0.0
Configuration menu - View commit details
-
Copy full SHA for f2a05e3 - Browse repository at this point
Copy the full SHA f2a05e3View commit details -
Remove $legacy from govuk-colour
govuk-frontend v5 deprecates the `$legacy` param in the `govuk-colour` mixin. Continuing to use it produces warnings for each instance of it in the CSS. It can be safely removed as alphagov/govuk-frontend#3576 notes that `it is non-operational and the parameter is only maintained to prevent compilation errors`.
Configuration menu - View commit details
-
Copy full SHA for 7e559e3 - Browse repository at this point
Copy the full SHA 7e559e3View commit details -
Update tag component in light of govuk-frontend v5
govuk-frontend v5 introduces some changes to the tag component. The one that has the most impact, is that the tag is now designed not to use ALL CAPS text anymore. Instead it is to be titlecase. In addition there are new background colours introduced which means that the styling for some tags in govuk_publishing_components has to be changed to maintain sufficient contrast. Tests have been updated to anticipate titlecase tag text instead of ALL CAPS text.
Configuration menu - View commit details
-
Copy full SHA for 1e1e2bf - Browse repository at this point
Copy the full SHA 1e1e2bfView commit details -
Remove
$govuk-new-link-styles
feature flagIn govuk-frontend v5, the new link styles are default and this feature flag has been removed.
Configuration menu - View commit details
-
Copy full SHA for d6a8995 - Browse repository at this point
Copy the full SHA d6a8995View commit details -
Replace
govuk-warning-text__assistive
classIn govuk-frontend v5, the `govuk-warning-text__assistive` has been removed. Instead `govuk-visually-hidden` is to be used. Tests that look for `govuk-warning-text__assistive` have been updated.
Configuration menu - View commit details
-
Copy full SHA for cf980a5 - Browse repository at this point
Copy the full SHA cf980a5View commit details -
Use Terser instead of Uglifier
govuk-frontend v5 now targets browsers that support ES6. This means that the UMD modules used in govuk_publishing_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 89adcfa - Browse repository at this point
Copy the full SHA 89adcfaView commit details -
Separate ES6 components from ES5 components
Add new config to state if application is loading ES6 components in 'es6-components.js'. If set to true `layout_for_public` will include a script tag with type `module` that points to `es6-components.js`. If this config is set to true and there is no `es6-components.js` then an error will occur.
Configuration menu - View commit details
-
Copy full SHA for 7f9b2d5 - Browse repository at this point
Copy the full SHA 7f9b2d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 269edc6 - Browse repository at this point
Copy the full SHA 269edc6View commit details -
Update app icon paths from govuk-frontend
In govuk-frontend v5, the names of the app icons have changed and need to be updated. In addition a manifest.json file is provided for specifying the correct file at different sizes. These references have been updated in `layout_for_public`.
Configuration menu - View commit details
-
Copy full SHA for cd519da - Browse repository at this point
Copy the full SHA cd519daView commit details -
Update .svg used in header component
In govuk-frontend v5, the crown .svg has been updated to also include the "GOV.UK" text. This has been updated in the header component. Removed the `.gem-c-header__logotype` class in `_layout-header.scss` as it is not longer required
Configuration menu - View commit details
-
Copy full SHA for ce7b8b2 - Browse repository at this point
Copy the full SHA ce7b8b2View commit details -
In govuk-frontend v5, the crown .svg has been updated to also include the "GOV.UK" text. This has to be updated in the layout_super_navigation_header component. A partial has been created so that a variant of the .svg without "GOV.UK" can be used for the homepage.
Configuration menu - View commit details
-
Copy full SHA for 12f8799 - Browse repository at this point
Copy the full SHA 12f8799View commit details -
Configuration menu - View commit details
-
Copy full SHA for d189785 - Browse repository at this point
Copy the full SHA d189785View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5606c91 - Browse repository at this point
Copy the full SHA 5606c91View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b2c5a6 - Browse repository at this point
Copy the full SHA 9b2c5a6View commit details -
Use govuk-frontend v5 component initialisation
In govuk-frontend v5, initialisation has been moved to creation of component JS module. This means that `init()` does not need to be called to initialise a component, it is instead called in the constructor. To ensure that modules from govuk-frontend and modules from the gem can be initialised easily in the same `initAll()` method, the modules of the gem have been changed to use the new initialisation method. This means moving `init()` to the constructor of each module. It also means updating the `initAll()` method to not call 'init()' of each module.
Configuration menu - View commit details
-
Copy full SHA for 8bf5701 - Browse repository at this point
Copy the full SHA 8bf5701View commit details -
Update tests to use new initialisation method
The modules in govuk_publishing_components have been updated to use the new method of initialisation. To get tests to work correctly, we also need to update how the modules are initialised in the tests themselves as they are individually initialised instead of using `initAll()`
Configuration menu - View commit details
-
Copy full SHA for ff8bacd - Browse repository at this point
Copy the full SHA ff8bacdView commit details -
Update Analytics modules to use new init method
Some of the Analytics modules use window.GOVUK.Modules and so the way they initialise needs to be updated in-line with how other JS modules are initialised. Tests for the modules that are effected have been updated to take into account the new initialisation method.
Configuration menu - View commit details
-
Copy full SHA for 7747e1f - Browse repository at this point
Copy the full SHA 7747e1fView commit details -
Update GA4 modules to use new init method
Some of the GA4 modules use window.GOVUK.Modules and so the way they initialise needs to be updated in-line with how other JS modules are initialised. Tests for the GA4 modules that are effected have been updated to take into account the new initialisation method.
Configuration menu - View commit details
-
Copy full SHA for f3b11ce - Browse repository at this point
Copy the full SHA f3b11ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3dab7a2 - Browse repository at this point
Copy the full SHA 3dab7a2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62110c5 - Browse repository at this point
Copy the full SHA 62110c5View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1b6fc3 - Browse repository at this point
Copy the full SHA b1b6fc3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4c3b470 - Browse repository at this point
Copy the full SHA 4c3b470View commit details