-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: fix Pay With sheet elevation mismatch for pure black #32909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
990026d
9559c0e
478c4d1
3ed6a79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,6 +75,7 @@ const PaymentMethodRow = ({ | |
| }: PaymentMethodRowProps) => { | ||
| const tw = useTailwind(); | ||
| const resolvedTestID = testID ?? `payment-method-row-${id}`; | ||
| const rowBackgroundClass = isSelected ? 'bg-section' : 'bg-transparent'; | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. List items follow the same rule: the BottomSheet container owns the default background. Unselected rows use bg-transparent; bg-section is only for the selected highlight.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. List items follow the same pattern: the BottomSheet container owns the background color. Unselected rows use bg-transparent. bg-section is only for the selected highlight; per-row bg-default was a second surface fill and caused the visible black bands. |
||
| const iconSlotTestID = `${resolvedTestID}-icon-slot`; | ||
| const tag = renderFirstTag(tagRenderers); | ||
|
|
||
|
|
@@ -131,9 +132,9 @@ const PaymentMethodRow = ({ | |
| <Box | ||
| flexDirection={BoxFlexDirection.Row} | ||
| alignItems={BoxAlignItems.Center} | ||
| twClassName={`px-4 py-3 ${ | ||
| isSelected ? 'bg-section' : 'bg-default' | ||
| } ${disabled ? 'opacity-50' : ''}`} | ||
| twClassName={`px-4 py-3 ${rowBackgroundClass} ${ | ||
| disabled ? 'opacity-50' : '' | ||
| }`} | ||
| testID={resolvedTestID} | ||
| > | ||
| {content} | ||
|
|
@@ -150,7 +151,7 @@ const PaymentMethodRow = ({ | |
| style={({ pressed }) => | ||
| tw.style( | ||
| 'flex-row items-center px-4 py-3', | ||
| isSelected ? 'bg-section' : 'bg-default', | ||
| rowBackgroundClass, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a minimal pure-black hotfix. A follow-up PR should replace the bespoke Pressable/Box row with MMDS ListItem or ListItemSelect so selection, press, and surface tokens come from the design system.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rowBackgroundClass keeps the static Box and Pressable paths aligned. The container supplies the default background; rows only add a fill for explicit interaction states such as selected or pressed. |
||
| pressed && !disabled ? 'bg-pressed' : '', | ||
| disabled ? 'opacity-50' : '', | ||
| ) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The container is responsible for the background color. PayWithBottomSheet applies useElevatedSurface on the BottomSheet, so this rows wrapper no longer paints bg-default and child rows inherit the elevated surface.