chore: fix Pay With sheet elevation mismatch for pure black#32909
chore: fix Pay With sheet elevation mismatch for pure black#32909georgewrmarshall wants to merge 4 commits into
Conversation
…tions Replace hardcoded bg-default in PayWithSection and PaymentMethodRow with useElevatedSurface() so the Add funds Pay With modal adapts to the pure black theme when MM_PURE_BLACK_PREVIEW is enabled. Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-994 Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
Unselected payment method rows inherit the elevated bottom sheet surface instead of painting bg-default/bg-alternative. Drop the elevated-surface test scaffolding added for the pure black rollout. Co-authored-by: Cursor <cursoragent@cursor.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
|
|
||
| const PayWithSection = ({ config }: PayWithSectionProps) => { | ||
| const testID = config.testID ?? `pay-with-section-${config.id}`; | ||
| const surfaceClass = useElevatedSurface(); |
There was a problem hiding this comment.
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.
| }: PaymentMethodRowProps) => { | ||
| const tw = useTailwind(); | ||
| const resolvedTestID = testID ?? `payment-method-row-${id}`; | ||
| const rowBackgroundClass = isSelected ? 'bg-section' : 'bg-transparent'; |
There was a problem hiding this comment.
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.
| tw.style( | ||
| 'flex-row items-center px-4 py-3', | ||
| isSelected ? 'bg-section' : 'bg-default', | ||
| rowBackgroundClass, |
There was a problem hiding this comment.
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.
Remove useElevatedSurface from PayWithSection so the rows container stays transparent and inherits the elevated surface from PayWithBottomSheet. Co-authored-by: Cursor <cursoragent@cursor.com>
| </Text> | ||
| ) : null} | ||
| <Box twClassName="bg-default" testID={`${testID}-rows`}> | ||
| <Box testID={`${testID}-rows`}> |
There was a problem hiding this comment.
The container is responsible for the background color, not this rows wrapper. PayWithBottomSheet applies useElevatedSurface on the BottomSheet, so PayWithSection children stay transparent. A child bg-default would paint a second surface on top of bg-alternative and recreate the pure black mismatch.
| }: PaymentMethodRowProps) => { | ||
| const tw = useTailwind(); | ||
| const resolvedTestID = testID ?? `payment-method-row-${id}`; | ||
| const rowBackgroundClass = isSelected ? 'bg-section' : 'bg-transparent'; |
There was a problem hiding this comment.
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.
| tw.style( | ||
| 'flex-row items-center px-4 py-3', | ||
| isSelected ? 'bg-section' : 'bg-default', | ||
| rowBackgroundClass, |
There was a problem hiding this comment.
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.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These changes are in the The Performance Test Selection: |
|



Description
Fixes elevation mismatches in the Pay With bottom sheet when
MM_PURE_BLACK_PREVIEWis enabled (TMCU-994 / 8.3.0 pure black soak testing).Problem:
PayWithBottomSheetalready usesuseElevatedSurface()(bg-alternative), but inner children still painted their ownbg-default. With pure black on,bg-defaultis#000000, so rows appeared as black patches inside the elevated sheet.Approach (minimal, time-sensitive):
PayWithSectionrows container —useElevatedSurface()instead of hardcodedbg-defaultPaymentMethodRowunselected state —bg-transparentso the parent container owns the surface; selected rows keepbg-sectionfor highlightFollow-up (not in this PR): Refactor
PayWithSection/PaymentMethodRowto MMDSListItem/ListItemSelectonce pure black QA lands. Keeping this diff small for the release timeline.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-994
Manual testing steps
Screenshots/Recordings
Manual verification on device/simulator with
MM_PURE_BLACK_PREVIEW=true— Pay With sheet rows align with elevated sheet surface (Perps Add funds flow).Before
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-07-07.at.12.27.57.mov
After
MM_PURE_BLACK_PREVIEW="true"Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-07-07.at.12.23.57.mov
MM_PURE_BLACK_PREVIEW="false"Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-07-07.at.13.16.29.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist