Skip to content

[hot-fix]: use canonical test assignment for poly-instantiated AB tests#16342

Merged
wackerow merged 1 commit into
masterfrom
hot-fix-ab-test
Sep 23, 2025
Merged

[hot-fix]: use canonical test assignment for poly-instantiated AB tests#16342
wackerow merged 1 commit into
masterfrom
hot-fix-ab-test

Conversation

@wackerow
Copy link
Copy Markdown
Member

Description

  • Adds prop to ABTestWrapper to accept an assignment index override
  • Calculates a single canonical test assignment from parent component and passes to each instantiation of a test (in this case, the Devconnect banner test, but pattern can be applied in future with other similar tests)
  • Aside: Also enabled enableAllLocales for this test, and updates key names for clarity

Related Issue

AB tests that require placement of more than one <ABTestWrapper> (due to different locations on a page) not always producing a matching test group assignment, leading to potentially showing both versions (or neither):

image

Fixes above by calculating assignment once from parent and passing assignment as a prop

@netlify
Copy link
Copy Markdown

netlify Bot commented Sep 23, 2025

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 28ae4ef
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/68d2daf96d3d8c00094587e9
😎 Deploy Preview https://deploy-preview-16342--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 50 (🔴 down 4 from production)
Accessibility: 94 (no change from production)
Best Practices: 91 (🔴 down 9 from production)
SEO: 92 (no change from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Member

@pettinarip pettinarip left a comment

Choose a reason for hiding this comment

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

LGTM!

@wackerow wackerow merged commit 565a798 into master Sep 23, 2025
13 of 14 checks passed
@wackerow wackerow deleted the hot-fix-ab-test branch September 23, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants