fix(confirmations): use elevated surface color for TextWithTooltip modal in Pure Black mode#33300
fix(confirmations): use elevated surface color for TextWithTooltip modal in Pure Black mode#33300georgewrmarshall wants to merge 2 commits into
Conversation
Replace background.default with getElevatedSurfaceColor(theme) on the TextWithTooltip bottom sheet container so Pure Black mode shows the correct elevated surface instead of flat black. Fixes TMCU-1094 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. |
Apply muted border on elevated surface in Pure Black dark mode so the info bottom sheet matches other confirmation bottom sheets. 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. |
| // Drop getElevatedSurfaceColor, isPureBlackEnabled, and AppThemeKey checks. | ||
| container: { | ||
| backgroundColor: theme.colors.background.default, | ||
| backgroundColor: getElevatedSurfaceColor(theme), |
There was a problem hiding this comment.
TextWithTooltip wraps info rows such as token-value and currency-display: tapping the value opens a BottomModal sheet with explanatory copy, not a full confirmation modal. In Pure Black dark the container used background.default and vanished against the flat confirmation screen (TMCU-1094); getElevatedSurfaceColor elevates only this sheet chrome.
| const { theme } = params; | ||
| const { colors } = theme; | ||
| const isPureBlackDark = | ||
| isPureBlackEnabled && theme.themeAppearance === AppThemeKey.dark; |
There was a problem hiding this comment.
isPureBlackDark uses the same gate as other confirmation bottom sheets: isPureBlackEnabled plus AppThemeKey.dark. Light mode and non-preview builds are unchanged.
| backgroundColor: theme.colors.background.default, | ||
| backgroundColor: getElevatedSurfaceColor(theme), | ||
| borderWidth: isPureBlackDark ? 1 : 0, | ||
| borderColor: isPureBlackDark ? colors.border.muted : undefined, |
There was a problem hiding this comment.
border.muted separates the elevated sheet from the flat black confirmation backdrop when borderWidth is 1; borderWidth 0 in standard themes avoids extra chrome on the rounded BottomModal.
| top: 10, | ||
| position: 'absolute', | ||
| }, | ||
| // TODO(Pure Black): Remove once MMDS ships pure-black-aware surface tokens. |
There was a problem hiding this comment.
Temporary themeUtils shim with TODO until MMDS ships native elevated surface tokens; tooltipHeader and tooltipContext inner layout are out of scope.
| }, | ||
| // TODO(Pure Black): Remove once MMDS ships pure-black-aware surface tokens. | ||
| // Drop getElevatedSurfaceColor, isPureBlackEnabled, and AppThemeKey checks. | ||
| container: { |
There was a problem hiding this comment.
Manual validation: open any confirmation with a tappable info value (token or fiat amount using TextWithTooltip), tap the value to open the info sheet. With MM_PURE_BLACK_PREVIEW and dark appearance the sheet should show elevated gray with muted top border.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
This is a visual-only change affecting the tooltip component within the confirmations flow. No functional logic is changed. The risk is low - it only affects the visual appearance of tooltips in confirmations screens. SmokeConfirmations is selected as the most relevant tag since this component lives in the confirmations UI directory and could affect how confirmation screens render during E2E tests. Performance Test Selection: |
|



Description
In Pure Black mode, the TextWithTooltip info bottom sheet used
background.default, which collapsed visually into the flat black confirmation surface beneath it. This change usesgetElevatedSurfaceColor(theme)on the modal container so the bottom sheet renders with the correct elevated surface color in Pure Black dark mode, matching other confirmation UI components.Changelog
CHANGELOG entry: null
Related issues
Fixes: TMCU-1094
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an examplePre-merge reviewer checklist