alphagov / smart-answers

Serves smart answers on GOV.UK
https://docs.publishing.service.gov.uk/apps/smart-answers.html
MIT License
175 stars 120 forks source link

Upgrade to govuk frontend 5.1.0 #6806

Closed MartinJJones closed 2 months ago

MartinJJones commented 3 months ago

What

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

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.