Skip to content

Allow duplicate products in choice cards - #16485

Merged
juabara merged 3 commits into
mainfrom
fix/jm-multiple-choice-cards-of-same-type
Jul 31, 2026
Merged

Allow duplicate products in choice cards#16485
juabara merged 3 commits into
mainfrom
fix/jm-multiple-choice-cards-of-same-type

Conversation

@juabara

@juabara juabara commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Fixes a bug where two choice cards with the same type (e.g. two OneOff cards) produced duplicate radio ids, values, and React keys, and rendered both radios as checked — causing the browser to visually select the wrong card and breaking <label htmlFor> association.

  • Suffix radio id/value/key with the array index for uniqueness.
  • Compare selection by object reference instead of supportTier/ratePlan.
  • Applies to both banner and epic (shared ThreeTierChoiceCards component).

Screenshots

The url of each option is appearing in the screenshots below:

Landing Page

image

Checkout

image

Generated html

image

@juabara juabara added the fix Departmental tracking: fix label Jul 30, 2026
@juabara
juabara requested a review from a team as a code owner July 30, 2026 10:44
@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.

@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown

@juabara juabara added the run_chromatic Runs chromatic when label is applied label Jul 30, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jul 30, 2026
@juabara juabara added the run_chromatic Runs chromatic when label is applied label Jul 30, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Jul 30, 2026
@juabara
juabara added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit ea2bd13 Jul 31, 2026
31 checks passed
@juabara
juabara deleted the fix/jm-multiple-choice-cards-of-same-type branch July 31, 2026 09:42
@gu-prout

gu-prout Bot commented Jul 31, 2026

Copy link
Copy Markdown

Seen on PROD (merged by @juabara 9 minutes and 2 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

fix Departmental tracking: fix Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants