Add custom subnav type and slimnav component to fronts - #16603
Open
Georges-GNM wants to merge 2 commits into
Open
Add custom subnav type and slimnav component to fronts#16603Georges-GNM wants to merge 2 commits into
Georges-GNM wants to merge 2 commits into
Conversation
Georges-GNM
force-pushed
the
gl/custom-slimnav-on-fronts
branch
from
August 25, 2026 09:53
1f7e4d7 to
bf8a0e3
Compare
🚀 Image pushed to AWS ECRImage digest: 🐛 Run the image locallyThe 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 |
Georges-GNM
force-pushed
the
gl/custom-slimnav-on-fronts
branch
from
August 25, 2026 10:02
bf8a0e3 to
06f9577
Compare
Georges-GNM
force-pushed
the
gl/custom-slimnav-on-fronts
branch
from
August 25, 2026 20:12
06f9577 to
8562551
Compare
Georges-GNM
marked this pull request as ready for review
August 26, 2026 09:28
Georges-GNM
force-pushed
the
gl/custom-slimnav-on-fronts
branch
from
August 26, 2026 09:36
cb6ca60 to
d8fdaa5
Compare
alexduf
approved these changes
Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,MastheadandTitlepiece.The
FENavTypeis 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-schemasupdated the schemas for all page types usingFENavType; 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