Skip to content

Use layouts for worldwide organisation pages - #5746

Merged
andysellick merged 8 commits into
mainfrom
worldwide-org-layout
Sep 1, 2026
Merged

andysellick merged 8 commits into
mainfrom
worldwide-org-layout

Conversation

@andysellick

@andysellick andysellick commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

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

What

Example worldwide organisation pages:

This change means these pages aren't using the header partial in worldwide_organisation anymore, but this is relied upon by other pages. We might be able to remove it after this and #5749 are merged.

There's also probably some CSS for the thing that the metadata component is being used for that can be removed after these two PRs are merged.

Why

Jira card: https://gov-uk.atlassian.net/browse/[CARD-ID]

Visual changes

Possibly the most important part of this PR is the final commit, where I've refactored the header partial to use CSS grid instead of the GOVUK grid, in an attempt to fix the problem of varying height content for different things (lead para, metadata, translation nav) and the layout of elements on desktop compared with the ordering of the same elements on mobile. I think this is a good solution, but it probably needs further testing and interation.

This PR also fixes some obvious layout and spacing problems in the existing pages, particularly where some components are vertically too close together.

Embassy page on desktop. Note the increased spacing between elements, increased H1 size, and better alignment of elements overall.

Before After
Screenshot 2026-09-01 at 14 29 21 Screenshot 2026-09-01 at 14 29 31

Same page on mobile. Note the increased spacing. I've also switched the news/part of section to use the metadata component, which looks very similar but has bold links. I think that's okay as it's a bit more consistent (with the other links in the sidebar on desktop).

Before After
Screenshot 2026-09-01 at 14 33 51 Screenshot 2026-09-01 at 14 33 59

Bonus improvement on https://www.gov.uk/government/publications/breast-screening-helping-women-decide

Before After
Screenshot 2026-09-01 at 15 15 27 Screenshot 2026-09-01 at 15 15 34

@govuk-ci
govuk-ci temporarily deployed to govuk-frontend-app-pr-5746 August 20, 2026 14:38 Inactive
@govuk-ci
govuk-ci temporarily deployed to govuk-frontend-app-pr-5746 August 20, 2026 15:19 Inactive
@govuk-ci
govuk-ci temporarily deployed to govuk-frontend-app-pr-5746 August 21, 2026 08:39 Inactive
@govuk-ci
govuk-ci temporarily deployed to govuk-frontend-app-pr-5746 August 21, 2026 11:21 Inactive
- will be needed for worldwide organisation pages
- little bit untidy to start with, but planning on cleaning up and refactoring in a following commit
- for worldwide organisation pages
- set new layout in controller
- add extra bits into presenter, for page-title partial
- was previously in a full width column where a quarter width made sense, but now constrained to a 2/3rds column
- metadata component is almost exactly the same, except link text is bold (could probably have an option on the component for this) and order of news/part of changes
- do a bit of work in the presenter to maintain some of the existing code, as it is still used elsewhere
- improve the logic around showing the metadata in page-title, although still not great, will iterate shortly
- allows it to move to the correct side on a right to left language page
@govuk-ci
govuk-ci temporarily deployed to govuk-frontend-app-pr-5746 September 1, 2026 12:40 Inactive
- use CSS grid to achieve a better layout
- uses row spanning to allow elements to occupy more than one row, cutting down on excess space when these pieces of the page are varying heights
@govuk-ci
govuk-ci temporarily deployed to govuk-frontend-app-pr-5746 September 1, 2026 13:01 Inactive
@andysellick
andysellick marked this pull request as ready for review September 1, 2026 13:36
@andysellick andysellick changed the title [DO NOT MERGE] Use layouts for worldwide organisation pages Use layouts for worldwide organisation pages Sep 1, 2026
AshGDS
AshGDS previously approved these changes Sep 1, 2026

@AshGDS AshGDS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, LGTM 👍

@andysellick

Copy link
Copy Markdown
Contributor Author

Thanks @AshGDS. I've just pushed another commit as I spotted a problem with the new grid layout. Basically grid can't exactly replicate the GOVUK grid (see commit message) but I've found a middle ground option that seems to be pretty close. Works fine on desktop, just a few pixels out just before it drops to mobile. Take a look and let me know what you think.

Some screenshots (annotated to compared the CSS grid with the GOVUK grid beneath it):

Desktop Just before mobile
Screenshot 2026-09-01 at 15 37 47 Screenshot 2026-09-01 at 15 37 58

- slight problem with this layout
- 66.6666667% (or defining the main column as two thirds) doesn't work properly because we have a column gap
- ideally we'd use `2fr 1fr` here because that takes into account the column gap and should make things nice, but it doesn't quite line up properly
- so this is the best solution I've found, it lines up when the screen is wider than the page, and there's only a few pixels out just before it collapses to mobile

@AshGDS AshGDS left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good spot 👍

@andysellick
andysellick merged commit f551636 into main Sep 1, 2026
13 checks passed
@andysellick
andysellick deleted the worldwide-org-layout branch September 1, 2026 15:39

This branch was previously deployed

1 inactive deployment
govuk-frontend-app-pr-5746 — 2f1181d5 Deployed Sep 1, 2026 by govuk-ci
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.

3 participants