Skip to content

Add new variant to mobile above nav test - without the RR StickyBottomBanner - #16721

Open
oliverabrahams wants to merge 2 commits into
mainfrom
oa/mobile-above-nav-variant-2
Open

oliverabrahams wants to merge 2 commits into
mainfrom
oa/mobile-above-nav-variant-2

Conversation

@oliverabrahams

@oliverabrahams oliverabrahams commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

What does this change?

Both variants are only for 2 types of pages.

  1. Crossword pages with tag type crossword which is the same as ArticleDesign Crossword 'type/crossword'
  2. The crossword Front with PageId 'crosswords'

https://github.com/guardian/content-api-scala-client/blob/ed83e958d5ebff2b3aa418dfeb2450236b68109c/client/src/main/scala/com.gu.contentapi.client/utils/CapiModelEnrichment.scala#L123

  • Adds a new variant to the test variant2 which does not show the RR sticky bottom banner.
  • Adds variant2 to the variants which show the advert above nav on mobile web

Why?

We are going to run a test on this new ad slot #16691

We need to see what affect RR sticky bottom banner has on this new ad slot on mobile.

@oliverabrahams oliverabrahams changed the title Add variant 2 for mobile above nav test. without the RR StickyBottomBanner Add new variant to mobile above nav test - without the RR StickyBottomBanner Sep 14, 2026
@oliverabrahams oliverabrahams added the feature Departmental tracking: work on a new feature label Sep 15, 2026
@oliverabrahams
oliverabrahams requested a lite review from Copilot September 15, 2026 09:06

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

Add focused tests covering variant2 suppression and crossword page boundaries.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds variant2 to the mobile above-nav experiment and suppresses the Reader Revenue banner for eligible crossword pages.

Changes:

  • Enables variant2 for mobile above-nav adverts.
  • Suppresses RR banners on crossword pages and fronts.
  • Updates experiment configuration and lockfile metadata.
File summaries
File Summary
pnpm-lock.yaml Updates dependency resolution metadata.
dotcom-rendering/src/lib/commercialMobileAboveNavTest.ts Defines eligible ad-slot variants.
dotcom-rendering/src/layouts/FrontLayout.tsx Enables the mobile slot for both variants.
dotcom-rendering/src/layouts/CrosswordLayout.tsx Enables the mobile slot for crossword articles.
dotcom-rendering/src/components/StickyBottomBanner/ReaderRevenueBanner.tsx Suppresses RR banners for eligible pages.
dotcom-rendering/src/components/StickyBottomBanner.island.tsx Passes experiment participation to RR logic.
ab-testing/config/abTests.ts Adds variant2 to the experiment.
Review details

Files not reviewed (1)

  • pnpm-lock.yaml: Generated file

Suppressed comments (1)

dotcom-rendering/src/components/StickyBottomBanner/ReaderRevenueBanner.tsx:233

  • This new suppression path is not covered by the existing tests: StickyBottomBanner.island.test.tsx mocks canShowRRBanner, so it cannot verify that variant2 suppresses RR only for Web crossword articles/fronts while control/variant, non-crossword pages, and Apps remain eligible. Add focused tests for these boundaries (including the type/crossword tag and crosswords page ID).
	if (
		inNoShowMobileAboveNavVariant === true &&
		isInMobileAboveNavTest(tags, renderingTarget, pageId)
	) {
		return { show: false };
	}
  • Files reviewed: 6/7 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread dotcom-rendering/src/components/StickyBottomBanner.island.tsx
@oliverabrahams
oliverabrahams marked this pull request as ready for review September 15, 2026 10:51
@oliverabrahams
oliverabrahams requested a review from a team as a code owner September 15, 2026 10:51
@oliverabrahams oliverabrahams added the run_chromatic Runs chromatic when label is applied label Sep 15, 2026
@github-actions

Copy link
Copy Markdown

🚀 Image pushed to AWS ECR

Image digest: sha256:d5915722a74150e50329280b315fa7d16bcc83f604cf8408fafa52db55d0d88b

🐛 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:d5915722a74150e50329280b315fa7d16bcc83f604cf8408fafa52db55d0d88b"

# Refer to image using branch tag
# IMAGE_IDENTIFIER=":branch-oa-mobile-above-nav-variant-2"

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

# 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${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.

@oliverabrahams
oliverabrahams requested a review from a team September 15, 2026 10:53
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Sep 15, 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.

3 participants