alphagov / government-frontend

Serves government pages on GOV.UK
https://docs.publishing.service.gov.uk/apps/government-frontend.html
MIT License
50 stars 17 forks source link

[DO NOT MERGE] Upgrade to govuk frontend 5.1 #3206

Open MartinJJones opened 1 month ago

MartinJJones commented 1 month 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

Update 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.


⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.