Skip to content

Add sponsorship to puzzles hub containers - #16978

Merged
DanielCliftonGuardian merged 4 commits into
mainfrom
puzzles-container-sponsorship
Oct 22, 2026
Merged

DanielCliftonGuardian merged 4 commits into
mainfrom
puzzles-container-sponsorship

Conversation

@DanielCliftonGuardian

@DanielCliftonGuardian DanielCliftonGuardian commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What does this change?

Adds container level sponsorship to the puzzles hub. A sponsored container (e.g. Crosswords) shows "Supported by" and the sponsor's logo next to its title see figma.

PuzzlesDirectory takes an optional containerBranding prop (sponsor per container ID), but nothing passes it in production yet, so the hub looks the same as it does now. Feeding it from page data will come in a follow-up PR, as with the hub header.

Why?

Puzzles sponsorship needs to work at front, container and game level (see the Puzzles sponsorship RFC). The hub header was merged in a previous pr, this is the container level.

Screenshots

Wide Mobile
before after

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🚀 Image pushed to AWS ECR

Image digest: sha256:9207e282b02827ec2fcb43de584fc2ba07a00d92d8068a6ee0fd6df3f23e560e

🐛 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:9207e282b02827ec2fcb43de584fc2ba07a00d92d8068a6ee0fd6df3f23e560e"

# Refer to image using branch tag
# IMAGE_IDENTIFIER=":branch-puzzles-container-sponsorship"

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

# 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/artifacts --query "Parameter.Value" --output text)
REGISTRY="${IMAGE_ACCOUNT_ID}.dkr.ecr.${AWS_DEFAULT_REGION}.amazonaws.com"
IMAGE="${REGISTRY}/guardian/dotcom-rendering/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-ecr.

@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

@DanielCliftonGuardian DanielCliftonGuardian self-assigned this Oct 20, 2026
@DanielCliftonGuardian DanielCliftonGuardian added feature Departmental tracking: work on a new feature run_chromatic Runs chromatic when label is applied labels Oct 20, 2026
@DanielCliftonGuardian DanielCliftonGuardian changed the title Puzzles container sponsorship Add sponsorship to puzzles hub containers Oct 20, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Oct 20, 2026
@DanielCliftonGuardian
DanielCliftonGuardian marked this pull request as ready for review October 20, 2026 13:32
@github-actions

Copy link
Copy Markdown

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

Copilot AI 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.

🟡 Changes recommended

The container sponsorship label needs theme-aware colouring to remain readable in dark mode.

1 open issue
What changed in this PR

Adds container-level sponsorship to the puzzles hub, extending the existing sponsored header. Production data wiring remains deferred.

Changes:

  • Adds optional per-container branding beside section titles.
  • Shares sponsor-link rendering between header and container branding.
  • Adds a sponsorship test and Storybook example.
File Description
dotcom-rendering/​src/​components/​PuzzlesDirectory.tsx Accepts and displays per-container branding.
dotcom-rendering/​src/​components/​PuzzlesDirectory.test.tsx Tests sponsorship placement and link details.
dotcom-rendering/​src/​components/​PuzzlesDirectory.stories.tsx Adds a sponsored-container example.
dotcom-rendering/​src/​components/​PuzzlesBranding.tsx Adds container branding and shares sponsor-link rendering.

Review effort: Balanced

Comment thread dotcom-rendering/src/components/PuzzlesBranding.tsx Outdated

@andresilva-guardian andresilva-guardian 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.

LGTM, nice work! 🚀

The SponsorLogoLink extraction is clean and leaves the existing PuzzlesBranding markup and Ophan attributes unchanged. Unsponsored containers keep their current heading styles and id, so the aria-labelledby wiring still works. The responsive layout (side by side on mobile, stacked from leftCol) looks sensible, and the new Jest test and SponsoredContainer story cover the behaviour well. Since nothing passes containerBranding in production yet, the risk is low.

Minor, non-blocking nits:

  • Missing blank line between the new it(...) and the next one in PuzzlesDirectory.test.tsx.
  • containerLockupStyles hardcodes palette.neutral[7] while the rest of the component uses CSS variables like --puzzles-text-colour. Worth checking this is fine if the container can appear under a different theme.

@DanielCliftonGuardian DanielCliftonGuardian added the run_chromatic Runs chromatic when label is applied label Oct 22, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Oct 22, 2026
@DanielCliftonGuardian
DanielCliftonGuardian added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit ae61991 Oct 22, 2026
30 checks passed
@DanielCliftonGuardian
DanielCliftonGuardian deleted the puzzles-container-sponsorship branch October 22, 2026 09:40
@gu-prout

gu-prout Bot commented Oct 22, 2026

Copy link
Copy Markdown

Seen on PROD (merged by @DanielCliftonGuardian 8 minutes and 9 seconds ago) Please check your changes!

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 Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants