Skip to content
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

[DO NOT MERGE] OLH-1263: Bump govuk-frontend to v5 #1149

Closed
wants to merge 2 commits into from

Conversation

danacotoran
Copy link
Contributor

@danacotoran danacotoran commented Jan 15, 2024

Proposed changes

What changed

Implement changes required to update govuk-frontend to the latest version which is a breaking one, removing JS support for <IE11, introducing breaking updates to the JS API, amongst other changes.

  • update SASS/JS/asset load paths to include /dist: everything in the package has been moved to a dist folder
  • update the way components are initialised and imported – the GOVUKFrontend window global has been removed, plus you no longer need to call the init method to initialise a component
  • bundle component dependencies from GOVUK Frontend into application.js – I did this using rollup but if anyone has opinions feel free to share
  • reformat showPassword component to match the new format of Design System components
  • remove $govuk-new-link-styles flag from the application sass file as the new styles are no longer opt-in only
  • load cookies script separately as a normal script while all other application JS is loaded as a <script type="module">
  • remove ie8 conditional from header
  • remove <span class="govuk-header__logotype-text"> and its content from the header and update the SVG to the supplied version
  • remove span wrapper around the svg in the header

Why did it change

The latest update to the package introduces breaking changes

Related links

Checklists

Environment variables or secrets

  • No environment variables or secrets were added or changed

Testing

Tested manually in dev and on local, checking that components are working, cookie functionality is preserved, and application.js contains only scripts of components we are using in account management.

How to review

Please check the release notes for v5 and highlight if anything isn't covered in this PR.
Check that no breaking changes were introduced as a result of this update, for instance:

  • components are still styled correctly
  • links are styled correctly
  • no essential functionality is missing
  • cookies/analytics code still running as expected
  • JS code bundles correctly and is uglified for the production build

@danacotoran danacotoran marked this pull request as ready for review January 15, 2024 12:05
@danacotoran danacotoran requested a review from a team as a code owner January 15, 2024 12:05
@danacotoran danacotoran marked this pull request as draft January 16, 2024 09:28
Implement changes required to update govuk-frontend to the latest
version which is a breaking one, removing JS support for <IE11,
introducing breaking updates to the JS API, amongst other changes.
- update SASS/JS/asset load paths to include /dist: everything in the
  package has been moved to a dist folder
- update the way components are intialised and imported
- reformat showPassword component to match the new format of Design
  System components
- remove $govuk-new-link-styles flag from the application sass file as
  the new styles are no longer opt-in only
- load cookies script separately as a normal script while all other
  application JS is loaded as a <script type="module">
Update account home's version of the header component as per the release
notes:
- remove ie8 conditional from header
- remove <span class="govuk-header__logotype-text">  and its content and
  update the SVG to the supplied version
- remove span wrapper around the svg
@danacotoran danacotoran marked this pull request as ready for review February 13, 2024 13:29
@benjamin-mortimer
Copy link

Please hold off on merging this - still checking with the UCD leads about the visual changes.

@danacotoran danacotoran changed the title OLH-1263: Bump govuk-frontend to v5 [DO NOT MERGE] OLH-1263: Bump govuk-frontend to v5 Feb 15, 2024
@danacotoran danacotoran closed this Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants