Update dependency govuk-frontend to v5.9.0 #157
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.
This PR contains the following updates:
5.7.1
->5.9.0
Release Notes
alphagov/govuk-frontend (govuk-frontend)
v5.9.0
Compare Source
To install this version with npm, run
npm install [email protected]
. You can also find more information about how to stay up to date in our documentation.New features
Use our improved File upload component
We've added a JavaScript enhancement to the File upload component which:
This improvement is opt-in, as it's a substantial visual change which risks shifting other content on the page.
To enable this improvement for your users, you'll first need to update the markup of your File upload component:
if you use our Nunjucks macro, using the new
javascript
option ofgovukFileUpload
if you're using HTML, wrapping the
<input type="file">
of the File upload markup in a<div class="govuk-drop-zone" data-module="govuk-file-upload">
If you're importing components individually in your JavaScript, which we recommend for better performance, you'll then need to import and initialise the new
FileUpload
component.This change was introduced in pull request #5305: Add progressively enhanced File Upload component
Form control components now have default
id
attributesIf you're using the included Nunjucks macros, these components now automatically use the value of the name parameter for the
id
parameter:You’ll only have to provide the
name
parameters if they both have the same value.The Date input component still requires an
id
attribute.This change was introduced in pull request #5658: Update form control components to set a default id based on name.
Deprecated features
Move service name and navigation links from the GOV.UK header to Service navigation component
We’ve deprecated the option to show a service name in the GOV.UK header component. This option will be removed from the GOV.UK header in the next breaking release of GOV.UK Frontend.
We recommend updating your service to use the Service navigation component as soon as possible.
Previously, we deprecated the option to show navigation links in the GOV.UK header component. This option will be removed as well, along with the GOV.UK header JavaScript component, since its only purpose was to make the navigation links responsive.
This change was introduced in pull request #5721: Add deprecation field and deprecate header navigation.
Migrate to the new organisation colour palette
The legacy organisation colour palette has been deprecated and will be removed in the next major version.
If your service uses the organisation colour palette, make sure that things still look as expected with the
$govuk-new-organisation-colours
feature flag enabled.This change was introduced in pull request #5627: Deprecate legacy organisation colour palette.
Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
v5.8.0
Compare Source
To install this version with npm, run
npm install [email protected]
. You can also find more information about how to stay up to date in our documentation.New features
Use our base configurable component to build your own configurable component
We've added a
ConfigurableComponent
class to help you build your own configurable components. It extends ourComponent
class and allows you to focus on your components' specific features by handling these shared behaviours across components:this.$root
this.config
We introduced this change in:
Deprecated features
Importing Sass using
govuk/all
You'll see a warning when compiling your Sass if you import all of GOV.UK Frontend's styling using
govuk/all
. Importing using theall
file is deprecated, and we’ll remove it in the next major release.In your import statements, use a trailing
/index
rather than/all
to load GOV.UK Frontend's files:@import "govuk/index";
instead of@import "govuk/all";
You do not need
/index
at the end of each import path if you’re using Dart Sass.This change was introduced in pull request #5518: Deprecate
govuk/all.scss
and only referencegovuk/index.scss
internally.Fixes
We've made fixes to GOV.UK Frontend in the following pull requests:
Configuration
📅 Schedule: Branch creation - "after 7am and before 11am every weekday" in timezone Europe/London, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.