-
Notifications
You must be signed in to change notification settings - Fork 17
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 #3206
Conversation
1d4042a
to
7732439
Compare
7732439
to
b0f20a6
Compare
b0f20a6
to
abf2cde
Compare
@MartinJJones one failing test still, on the label text thing |
Thanks Andy, this is expected, the test will pass once the version of the gem is bumped to the v5 release as part of this PR. Happy to wait on this and get approval on release day once the test is passing. |
abf2cde
to
77d49b5
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
77d49b5
to
a64367e
Compare
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 test for phase banner text
In govuk-frontend v5 the phase banner text is no longer uppercase, now only the first letter of a word is capitalised and the rest of the content lowercase
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.
Follow these steps if you are doing a Rails upgrade.