Skip to content

use support header abTest to determine "log in" text - #17368

Open
AnastasiiaBalenko wants to merge 5 commits into
mainfrom
ab-header-sign-in-test
Open

AnastasiiaBalenko wants to merge 5 commits into
mainfrom
ab-header-sign-in-test

Conversation

@AnastasiiaBalenko

@AnastasiiaBalenko AnastasiiaBalenko commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

What does this change?

This change updates the logic to use the support header’s AB test name and variant to choose the mobile sign-in presentation, hide the sign-in control until the header request completes; show the text fallback when it returns no data or fails, keeps “My account” text visible for signed-in users on mobile, removes unused customisation props from Dropdown and its obsolete custom-trigger test.

Why?

The Icon without text should be shown for all variants of the support header test in RRCP that starts with "HEADER_MOBILE_SIGN_IN" and is not the "CONTROL" variant for Logged out users. For all the other cases nothing is changed.

How has this change been tested?

Screenshots

Logged in
logged-in
In TEST and VARIANT
logged-out-test-variant
In TEST and CONTROL
logged-out-test-control
Not in the test
logged-out-without test

@AnastasiiaBalenko AnastasiiaBalenko added the feature Departmental tracking: work on a new feature label Nov 30, 2026
linkCssOverrides?: SerializedStyles;
buttonCssOverrides?: SerializedStyles;
children?: React.ReactNode;
renderTrigger?: (isExpanded: boolean) => React.ReactNode;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leftover props from the previous sign-in header test, that we don't need any more

showSignInTextOnMobile={showSignInTextOnMobile ?? false}
isSignInReady={
!showReaderRevenueLinks ||
showSignInTextOnMobile !== undefined

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this prop to avoid showing the wrong sign-in presentation while the support header is loading

@AnastasiiaBalenko AnastasiiaBalenko added the run_chromatic Runs chromatic when label is applied label Nov 30, 2026
@AnastasiiaBalenko
AnastasiiaBalenko requested a balanced review from Copilot November 30, 2026 10:48
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Nov 30, 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.

🟡 Changes recommended

Sign-in can remain hidden indefinitely when prerequisites fail, and the relocated profile icon no longer opens the account menu.

4 open issues
What changed in this PR

This PR connects the masthead’s mobile sign-in presentation to the support-header A/B test and simplifies the signed-in account dropdown.

Changes:

  • Select mobile sign-in text or icon from support-header metadata, with readiness gating and text fallback for empty or failed responses.
  • Keep “My account” text visible for signed-in users on mobile.
  • Remove unused dropdown customization props and update related tests.
File Description
dotcom-rendering/​src/​components/​TopBarSupport.island.tsx Reports the experiment decision and fallback state; ignores cancelled results.
dotcom-rendering/​src/​components/​TopBarMyAccount.tsx Adds sign-in readiness gating and simplifies the account control.
dotcom-rendering/​src/​components/​TopBarMyAccount.test.tsx Covers readiness, text fallback, and the signed-in label.
dotcom-rendering/​src/​components/​TopBar.island.tsx Connects support-header state to sign-in presentation.
dotcom-rendering/​src/​components/​Dropdown.test.tsx Removes the obsolete custom-trigger test.
dotcom-rendering/​src/​components/​Dropdown.island.tsx Removes custom trigger and button/link styling props.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

🚀 Image for dotcom-rendering pushed to AWS ECR

Image digest: sha256:11f3361f9007a54f99f1b8c862d02bf262865d1cc2b170b10ae83d67d1d44abc

🐛 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:11f3361f9007a54f99f1b8c862d02bf262865d1cc2b170b10ae83d67d1d44abc"

# Refer to image using branch tag
# IMAGE_IDENTIFIER=":branch-ab-header-sign-in-test"

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

# 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 Nov 30, 2026 •

Copy link
Copy Markdown

@AnastasiiaBalenko AnastasiiaBalenko added the run_chromatic Runs chromatic when label is applied label Nov 30, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Nov 30, 2026
@AnastasiiaBalenko AnastasiiaBalenko added the run_chromatic Runs chromatic when label is applied label Nov 30, 2026
@AnastasiiaBalenko
AnastasiiaBalenko requested a balanced review from Copilot November 30, 2026 13:14
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Nov 30, 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.

🔵 Needs a closer look

Local fixtures cover only SINGLE_FRONT_DOOR__HEADER, leaving the external HEADER_MOBILE_SIGN_IN name and whether every non-CONTROL variant requires icon-only sign-in dependent on human confirmation.

1 open issue
3 resolved since last review

Review effort: Balanced

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

A failed or empty response leaves the previous treatment header visible while sign-in falls back to text, so both fallback paths must clear the stale header state.

2 open issues

Review effort: Balanced

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.

🟢 Approval recommended

No active review issues remain for the top bar’s mobile sign-in experiment changes.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@AnastasiiaBalenko AnastasiiaBalenko added the run_chromatic Runs chromatic when label is applied label Nov 30, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Nov 30, 2026
@AnastasiiaBalenko
AnastasiiaBalenko marked this pull request as ready for review November 30, 2026 13:57
@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.

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

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants