Skip to content

Add custom subnav type and slimnav component to fronts - #16603

Open
Georges-GNM wants to merge 2 commits into
mainfrom
gl/custom-slimnav-on-fronts
Open

Add custom subnav type and slimnav component to fronts#16603
Georges-GNM wants to merge 2 commits into
mainfrom
gl/custom-slimnav-on-fronts

Conversation

@Georges-GNM

@Georges-GNM Georges-GNM commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

What does this change?

Part of the custom subnav work, now that frontend is sending this data for fronts, we add the relevant type and create the component in a slimnav form which gets wired into fronts (via FrontsLayout, Masthead and Titlepiece.

The FENavType is shared across every page type that carries a nav, so we'll be able to make use of this in articles/tag pages later on.

The diff looks big, because make gen-schemas updated the schemas for all page types using FENavType; in practice, the new type, component and usage changes only amount to about +200.

The component itself is based on the designed for the slim nav on fronts; it looks quite similar to the existing subnav (aside from the large custom subnav header), so a lot of the component code (styles/tsx) were lifted from the current Subnav component.

Follow up PRs can add support in articles, as well as images - at that point we can add a story as well; once there's variations and more to see than currently (happy to add one now if preferred though - Chromatic only picked up a couple of false positives on an unrelated section of the page).

The subnavs aren't in use in production yet (no one has the permission at the moment), so this won't directly be reflected in PROD yet.

How has this change been tested?

Ran locally, using a custom subnav targeted to the uk front page on CODE - see screenshot.

Screenshots

image

@Georges-GNM Georges-GNM self-assigned this Aug 25, 2026
@Georges-GNM
Georges-GNM force-pushed the gl/custom-slimnav-on-fronts branch from 1f7e4d7 to bf8a0e3 Compare August 25, 2026 09:53
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

🚀 Image pushed to AWS ECR

Image digest: sha256:a7caf6c493fc34bb3ad95f213a94352a5d8980bfe4b36e4c21767e4264c5e740

🐛 Run the image locally

The following can be used to run the image locally:

# Refer to image using the immutable digest. Find alternatives below.
IMAGE_IDENTIFIER="@sha256:a7caf6c493fc34bb3ad95f213a94352a5d8980bfe4b36e4c21767e4264c5e740"

# Refer to image using branch tag
# IMAGE_IDENTIFIER=":branch-gl-custom-slimnav-on-fronts"

# Refer to image using build tag
# IMAGE_IDENTIFIER=":build-30427"

# Refer to image via the GitHub commit SHA tag
# IMAGE_IDENTIFIER=":sha-d8fdaa5df73f78cecfb1057f1ade7964f1b4bf4d"

# Set environment variables for the AWS CLI
AWS_PROFILE="<A_PROFILE_FROM_JANUS>"
AWS_DEFAULT_REGION="eu-west-1"

IMAGE_ACCOUNT_ID=$(aws ssm get-parameter --name /organisation/accounts/deployTools --query "Parameter.Value" --output text)
REGISTRY="${IMAGE_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
IMAGE="${REGISTRY}/guardian/dotcom-rendering${IMAGE_IDENTIFIER}"

# Login to AWS ECR https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry_auth.html
aws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY

# Pull the image
docker pull $IMAGE

# Run the image. You'll likely need to set additional flags. See https://docs.docker.com/reference/cli/docker/container/run.
docker run $IMAGE

From guardian/actions-publish-image.

@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

@Georges-GNM
Georges-GNM force-pushed the gl/custom-slimnav-on-fronts branch from bf8a0e3 to 06f9577 Compare August 25, 2026 10:02
@Georges-GNM Georges-GNM added the feature Departmental tracking: work on a new feature label Aug 25, 2026
@Georges-GNM
Georges-GNM force-pushed the gl/custom-slimnav-on-fronts branch from 06f9577 to 8562551 Compare August 25, 2026 20:12
@Georges-GNM Georges-GNM changed the title Add custom subnav type and scaffold component Add custom subnav type and slimnav component Aug 26, 2026
@Georges-GNM Georges-GNM changed the title Add custom subnav type and slimnav component Add custom subnav type and slimnav component to fronts Aug 26, 2026
@Georges-GNM
Georges-GNM marked this pull request as ready for review August 26, 2026 09:28
@Georges-GNM Georges-GNM added the run_chromatic Runs chromatic when label is applied label Aug 26, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Aug 26, 2026
@Georges-GNM
Georges-GNM force-pushed the gl/custom-slimnav-on-fronts branch from cb6ca60 to d8fdaa5 Compare August 26, 2026 09:36
@Georges-GNM Georges-GNM added the run_chromatic Runs chromatic when label is applied label Aug 26, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants