-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(pure-black): align Advanced details Expandable sheet with other elevated sheets #33152
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 all commits
69e5376
f35ba6b
5e13d38
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 |
|---|---|---|
| @@ -1,13 +1,20 @@ | ||
| import { StyleSheet } from 'react-native'; | ||
|
|
||
| import { Theme } from '../../../../../../util/theme/models'; | ||
| import { AppThemeKey, Theme } from '../../../../../../util/theme/models'; | ||
| import { | ||
| getElevatedSurfaceColor, | ||
| isPureBlackEnabled, | ||
| } from '../../../../../../util/theme/themeUtils'; | ||
|
|
||
| const styleSheet = (params: { | ||
| theme: Theme; | ||
| vars: { isCompact: boolean | undefined }; | ||
| }) => { | ||
| const { theme, vars } = params; | ||
| const { isCompact } = vars; | ||
| const { colors } = theme; | ||
| const isPureBlackDark = | ||
| isPureBlackEnabled && theme.themeAppearance === AppThemeKey.dark; | ||
|
|
||
| return StyleSheet.create({ | ||
| container: { | ||
|
|
@@ -20,8 +27,12 @@ | |
| padding: isCompact ? 0 : 16, | ||
| marginBottom: isCompact ? 0 : 8, | ||
| }, | ||
| // TODO(Pure Black): Remove once MMDS ships pure-black-aware surface tokens. | ||
|
Check warning on line 30 in app/components/Views/confirmations/components/UI/expandable/expandable.styles.ts
|
||
| // Drop getElevatedSurfaceColor, isPureBlackEnabled, and AppThemeKey checks. | ||
| modalContent: { | ||
|
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. 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. |
||
| backgroundColor: theme.colors.background.section, | ||
| backgroundColor: getElevatedSurfaceColor(theme), | ||
|
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. 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. |
||
| borderWidth: isPureBlackDark ? 1 : 0, | ||
|
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. 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. |
||
| borderColor: isPureBlackDark ? colors.border.muted : undefined, | ||
| paddingBottom: 34, | ||
| borderTopLeftRadius: 8, | ||
| borderTopRightRadius: 8, | ||
|
|
||
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.
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.