Move components that rely on govuk-frontend modules to separate es6-components.js file
Remove Sass variables
Fix failing tests with radio and checkbox inputs
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 Sass variable $govuk-new-link-styles is now set to true by default, so it does not need to be set
The $legacy attribute in govuk-colour has been deprecated and using it will have no effect (other than generating warnings on pre-compilation)
The Sass variables below have been removed, using them will have no effect:
$govuk-compatibility-govuktemplate
$govuk-use-legacy-palette
Fix failing tests with radio and checkbox inputs
Version 5.1.0 of govuk-frontend contains refactoring to the CSS for radio buttons and checkboxes, this change resulted in tests throwing an ElementClickInterceptedError.
The intention is for the PR to include the upgrade to the version of the publishing_components_gem as well, once released. This will also fix the failing test.
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
$govuk-new-link-styles
is now set totrue
by default, so it does not need to be set$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
Fix failing tests with radio and checkbox inputs
Version 5.1.0 of govuk-frontend contains refactoring to the CSS for radio buttons and checkboxes, this change resulted in tests throwing an
ElementClickInterceptedError
.This issue is fixed in version 5.2.0 of govuk-frontend
Trello
The intention is for the PR to include the upgrade to the version of the publishing_components_gem as well, once released. This will also fix the failing test.
⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️
Follow these steps if you are doing a Rails upgrade.