Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;

Copy link
Copy Markdown
Contributor Author

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.


return StyleSheet.create({
container: {
Expand All @@ -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

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Complete the task associated to this "TODO" comment.

See more on https://sonarcloud.io/project/issues?id=MetaMask_metamask-mobile&issues=AZ9dmRjSM2Z0o2L3lEFd&open=AZ9dmRjSM2Z0o2L3lEFd&pullRequest=33152
// Drop getElevatedSurfaceColor, isPureBlackEnabled, and AppThemeKey checks.
modalContent: {

@georgewrmarshall georgewrmarshall Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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,
Expand Down
Loading