Skip to content

Bump govuk frontend to v6#442

Open
tombye wants to merge 10 commits intomainfrom
bump-govuk-frontend-to-v6
Open

Bump govuk frontend to v6#442
tombye wants to merge 10 commits intomainfrom
bump-govuk-frontend-to-v6

Conversation

@tombye
Copy link
Copy Markdown
Contributor

@tombye tombye commented Mar 13, 2026

What’s changed

This bumps the version of Design System (GOV.UK Frontend) used by this gem to V6 and packages it up as a beta release, to allow downstream projects time to try it out.

example_multi-page_new_look

Identifying a user need

Public documentation should have the GOV.UK brand, so users get confirmation they're looking at the right thing because it matches both the service and www.gov.uk. Non-public documentation should be consistent with other docs, as much as possible, for similar reasons.

Notes for reviewers

Because the new branding style, which moves the header links to a service navigation component below the GOV.UK logo, is now mandatory, I'm calling this a major version bump.

Other than those changes, the other things changed are:

  • the introduction of a new colour palette
  • the removal of the 14px font size
  • the footer links being changed to match all other links in the page

Examples of downstream projects with this version of the gem

Based on the spreadsheet of tech docs using the tech docs gem across GDS

GDS Way

gds_way_new_look

WCAG Primer

wcag_primer_new_look

@tombye tombye force-pushed the bump-govuk-frontend-to-v6 branch from 5939592 to 10a017a Compare March 17, 2026 09:53
Moves from a more cautious [tilde
range](https://docs.npmjs.com/cli/v6/using-npm/semver#tilde-ranges-123-12-1)
to [caret
range](https://docs.npmjs.com/cli/v6/using-npm/semver#caret-ranges-123-025-004),
because npm did it when I installed V6 and it
doesn't seem risky because the dependency is GOVUK
Frontend.
@tombye tombye force-pushed the bump-govuk-frontend-to-v6 branch from 10a017a to a56d42b Compare March 17, 2026 14:27
@tombye tombye marked this pull request as ready for review March 17, 2026 14:28
tombye added 8 commits March 17, 2026 15:03
V6 removes `all.scss` so we use `_base.scss`
for the check instead.

Note: `all.scss` was removed in this pull request:

alphagov/govuk-frontend#6412
Introduce a service navigation partial, to match
the design system component and move the links in
the header out into it.

This is the service navigation component:

https://design-system.service.gov.uk/components/service-navigation/

As part of this, the service-level links have now
been moved out into the service navigation
component. This updates the header classes to
match changes made by the design system team when
they did this work.

See this pull request for details of that work:

alphagov/govuk-frontend#6423
The old ones were removed in this pull request so
we no longer need this flag:

alphagov/govuk-frontend#6390
If you're not a rubyist, it's useful to know how
to run the tests.
@tombye tombye force-pushed the bump-govuk-frontend-to-v6 branch from a56d42b to 361b9e3 Compare March 17, 2026 15:09
@jamescarr28 jamescarr28 linked an issue Mar 18, 2026 that may be closed by this pull request
@jamescarr28
Copy link
Copy Markdown
Contributor

@tombye - looks good mostly, however on the mobile-wallet-tech-docs the service links don't highlight the active section correctly:

Section highlighted
Screenshot 2026-03-18 at 11 20 07

Next section not highlighted
Screenshot 2026-03-18 at 11 20 16

This is possibly due to custom layouts applied to the create the table of contents?

@tombye
Copy link
Copy Markdown
Contributor Author

tombye commented Mar 18, 2026

@jamescarr28 I managed to get your docs running locally so can see what you mean. I can see the same thing happening on the current prod site: https://docs.wallet.service.gov.uk/ too. Digging in the code, it's the use of the active_page method in the _service_navigation.rb, which was the same when in the old header code.

There's a bit in the logic where the current_page.path is compared to the header link path. This works if the HTML file for your page is the same as its route, like issue-credentials.html for /issue-credentials, as it is on the example site in the gem. But your pages are all organised in named folders, like issue-credentials/index.html so the logic breaks.

It seems sensible to extend the active_page logic, seeing as middleman allows the structure you're using but I'd suggest doing it outside of this PR if possible.

@jamescarr28
Copy link
Copy Markdown
Contributor

@jamescarr28 I managed to get your docs running locally so can see what you mean. I can see the same thing happening on the current prod site: https://docs.wallet.service.gov.uk/ too. Digging in the code, it's the use of the active_page method in the _service_navigation.rb, which was the same when in the old header code.

There's a bit in the logic where the current_page.path is compared to the header link path. This works if the HTML file for your page is the same as its route, like issue-credentials.html for /issue-credentials, as it is on the example site in the gem. But your pages are all organised in named folders, like issue-credentials/index.html so the logic breaks.

It seems sensible to extend the active_page logic, seeing as middleman allows the structure you're using but I'd suggest doing it outside of this PR if possible.

@tombye - yeah completely understand, not something to fix as part of this - only highlighted as an example of teams maybe wanting some lead in time (in the new service navigation this is a much more obvious bug than the old one 😄 )

@jamescarr28
Copy link
Copy Markdown
Contributor

@tombye - I don't seem to have permission to approve - but I'm happy that this is good to go in once we've given people a chance to check it works for them. I'd say 4 weeks should be enough if @NathanD-GDS agrees? I'd say Monday 19th April looks good

Copy link
Copy Markdown
Contributor

@kr8n3r kr8n3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a marked as a major version so dependency update tools will not auto-upgrade it.
Teams that use this this gem will be able to evaluate, test and make changes in their own timeframe

These changes will mandate the new branding for
all downstream tech docs so do a pre-release first
to let people check for any resulting problems and
feed back.
@tombye tombye force-pushed the bump-govuk-frontend-to-v6 branch from 7fe791c to 1ceab2d Compare March 27, 2026 13:15
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.

Use new Gov UK branding

3 participants