fix(pure-black): align Advanced details Expandable sheet with other elevated sheets#33152
Conversation
…apply bg-alternative surface when Pure Black is enabled; remove legacy BottomModal usage 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. |
|
@cursoragent revert the refactor changes and lets just chagne the styles to use background alternative if pure black is true |
|
Done. I reverted the
This keeps behavior unchanged and fixes the Pure Black background for the Advanced details sheet. |
…lementation Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
Gate border.muted on the Expandable BottomModal surface when pure black preview is enabled in dark mode, matching other elevated surface stopgaps. 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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
These changes only affect the appearance of the expandable component in confirmations when using the pure black dark theme. There are no functional logic changes, no user flow changes, no API changes, and no behavioral changes. This falls under cosmetic/visual styling changes that do not warrant E2E test execution. Per the COSMETIC CHANGES guidance: changes that only affect visual styling (colors, borders, backgrounds) have zero functional impact and must NOT trigger additional test selection on their own. Performance Test Selection: |
|
| // Drop getElevatedSurfaceColor, isPureBlackEnabled, and AppThemeKey checks. | ||
| modalContent: { | ||
| backgroundColor: theme.colors.background.section, | ||
| backgroundColor: getElevatedSurfaceColor(theme), |
There was a problem hiding this comment.
Replaces bg-section on modalContent with getElevatedSurfaceColor so the stacked Advanced details BottomModal reads as an elevated surface on the pure black confirmation backdrop. When MM_PURE_BLACK_PREVIEW is off this still resolves to bg-default, so existing dark and light users should see no surface change.
| const { isCompact } = vars; | ||
| const { colors } = theme; | ||
| const isPureBlackDark = | ||
| isPureBlackEnabled && theme.themeAppearance === AppThemeKey.dark; |
There was a problem hiding this comment.
isPureBlackDark follows the same gated border pattern as SelectComponent and ModalConfirmation: border.muted only when MM_PURE_BLACK_PREVIEW is on in dark mode. That keeps legacy sheet chrome unchanged outside the preview rollout.
| }, | ||
| // TODO(Pure Black): Remove once MMDS ships pure-black-aware surface tokens. | ||
| // Drop getElevatedSurfaceColor, isPureBlackEnabled, and AppThemeKey checks. | ||
| modalContent: { |
There was a problem hiding this comment.
modalContent is shared by every Expandable consumer in confirmations (Advanced details, signature Message, and account Details rows), so this style-only change fixes pure black colors on all stacked BottomModal sheets from this component, not just the Advanced details entry point.
| modalContent: { | ||
| backgroundColor: theme.colors.background.section, | ||
| backgroundColor: getElevatedSurfaceColor(theme), | ||
| borderWidth: isPureBlackDark ? 1 : 0, |
There was a problem hiding this comment.
Net diff vs main is styles only; expandable.tsx still uses legacy BottomModal for stacking on the confirmation sheet. MMDS BottomSheet migration is deferred per confirmations team direction and issue 12656.





Description
Aligns the confirmations Advanced details stacked sheet (
Expandable→BottomModal) with other pure black elevated sheets.In pure black dark mode,
modalContentwas using the wrong surface color (bg-section). This is not as severe as thebg-defaultbanding issue elsewhere, but it made this sheet look inconsistent with other elevated bottom sheets. This PR updatesexpandable.styles.tsonly:backgroundColorusesgetElevatedSurfaceColor()so the sheet resolves tobg-alternativein pure black dark mode (unchanged when the preview flag is off)border.mutedis applied only when pure black preview is on in dark mode, matching other elevated-surface stopgaps (SelectComponent,ModalConfirmation)expandable.tsxis unchanged — still uses legacyBottomModalfor stacking on the confirmation sheet. We plan to replace this with MMDSBottomSheetin a follow-up; this is a style-only stopgap until then.modalContentis shared by allExpandableconsumers in confirmations (Advanced details, signature Message, and account Details rows).Changelog
CHANGELOG entry: Fixed Advanced details bottom sheet surface color in Pure Black to match other elevated sheets (style-only change).
Related issues
Refs: TMCU-622
Fixes: https://consensyssoftware.atlassian.net/browse/TMCU-1095
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
Slack Thread