Skip to content

Remove sign in text from header - #16758

Draft
zaraGNM wants to merge 17 commits into
mainfrom
zk-sign-in-header-optimisation
Draft

zaraGNM wants to merge 17 commits into
mainfrom
zk-sign-in-header-optimisation

Conversation

@zaraGNM

@zaraGNM zaraGNM commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

What does this change?

This Pr adds a new mobile only A/B test, martech-header-sign-in-header-optimisation, for the sign in and My Account controls in the header. For users in the test variant, the “Sign in” and “My account” text is removed on mobile and replaced with icon only controls.

What does this change?

  • Added the martech-header-sign-in-header-optimisation A/B test and the logic to determine which users see the new variant.
  • Updated TopBar, TopBarMyAccount and the related components to pass the test variant through and control whether the sign in text is shown on mobile.
  • Updated the mobile sign in control to show the profile icon without the “Sign in” text for the test variant.
  • Updated the mobile My Account dropdown to use the circular profile icon, switching to a close icon when the dropdown is open.
  • Updated the Dropdown component to support a custom renderTrigger, so the mobile account control can change its icon based on the dropdown state.
  • Added accessible labels to the icon only controls so they still have a clear accessible name when the visible text is removed.
  • Updated the dropdown click handling to ensure the new mobile trigger continues to open and close correctly.
  • Added/updated Storybook stories to cover the different signed in, signed out, mobile and desktop states.
  • The existing desktop header controls remain unchanged.

Why?

This is the first test for our header space optimisation work. Removing the “Sign in” and “My account” text on mobile gives us more space to optimise the CTA and accompanying text in the header.

We'll use the test to see whether changing these controls to icons affects the sign in rate.

How has this change been tested?

Tested locally using storybook.

need to test in CODE

Screenshots

Existing Header:

control header signed in control account dropdown

Variant Updated Header:

updated header variant fsigned out varint account

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

🚀 Image pushed to AWS ECR

Image digest: sha256:7c1dc016e7777a74cacbd9b16427a89f9cca1939b7857c9d9bf521f7f96d5981

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

# Refer to image using branch tag
# IMAGE_IDENTIFIER=":branch-zk-sign-in-header-optimisation"

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

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

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

@zaraGNM zaraGNM added ab-testing feature Departmental tracking: work on a new feature labels Sep 21, 2026
Comment thread dotcom-rendering/src/components/TopBarMyAccount.tsx
@tomrf1
tomrf1 requested a balanced review from Copilot September 29, 2026 08:34
@tomrf1 tomrf1 added the run_chromatic Runs chromatic when label is applied label Sep 29, 2026

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.

Copilot review overview

🟡 Changes recommended

The variant changes desktop spacing, breaks account-trigger analytics, lacks interaction tests, and expires almost immediately.

Review effort: Balanced
Findings: 3 Medium severity · 1 Low severity

Open (4)
What changed in this PR

Adds a mobile A/B test that replaces account text with icon-only controls.

Changes:

  • Adds the header optimisation experiment.
  • Introduces responsive account icons and dropdown triggers.
  • Adds Storybook scenarios for account states.
File Description
ab-testing/​config/​abTests.ts Registers the experiment.
Dropdown.island.tsx Supports state-aware custom triggers.
TopBar.island.tsx Applies the experiment assignment.
TopBarMyAccount.tsx Implements icon-only mobile controls.
TopBar.stories.tsx Adds account-state stories.

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

Comment thread ab-testing/config/abTests.ts Outdated
Comment thread dotcom-rendering/src/components/TopBarMyAccount.tsx
Comment thread dotcom-rendering/src/components/TopBarMyAccount.tsx Outdated
Comment thread dotcom-rendering/src/components/Dropdown.island.tsx
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Sep 29, 2026
@tomrf1 tomrf1 added the run_chromatic Runs chromatic when label is applied label Oct 1, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Oct 1, 2026
@zaraGNM zaraGNM added the run_chromatic Runs chromatic when label is applied label Oct 1, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Oct 1, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ab-testing feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants