Skip to content

fix(pure-black): switch confirmations Expandable to MMDS BottomSheet (uses bg-alternative)#33152

Draft
georgewrmarshall wants to merge 2 commits into
mainfrom
cursor/advanced-details-bottomsheet-7f9d
Draft

fix(pure-black): switch confirmations Expandable to MMDS BottomSheet (uses bg-alternative)#33152
georgewrmarshall wants to merge 2 commits into
mainfrom
cursor/advanced-details-bottomsheet-7f9d

Conversation

@georgewrmarshall

@georgewrmarshall georgewrmarshall commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Description

Reverts the earlier refactor that swapped confirmations Expandable to MMDS BottomSheet. We keep the legacy BottomModal implementation and fix the Pure Black bug by adjusting styles only: the sheet content container now uses the elevated surface color, which resolves to bg-alternative when Pure Black is enabled.

Scope:

  • app/components/Views/confirmations/components/UI/expandable/expandable.tsx (revert to BottomModal)
  • app/components/Views/confirmations/components/UI/expandable/expandable.styles.ts (use elevated surface color)

Notes:

  • No behavior change to headers, copy button, or interactions.
  • Styling now matches other Pure Black elevated surfaces.

Changelog

CHANGELOG entry: Fixed Advanced details bottom sheet surface in Pure Black by using the elevated bg-alternative surface (style-only change; no component refactor).

Related issues

Refs: TMCU-622
Fixes: TMCU-1059

Manual testing steps

Feature: Advanced details sheet uses Pure Black elevated surface

  Scenario: Open Advanced details while Pure Black is enabled
    Given the app is launched with environment variable MM_PURE_BLACK_PREVIEW=true
    And a transaction confirmation is visible (e.g. dapp-initiated transfer)
    When I tap the "Advanced details" row
    Then a bottom sheet opens using the elevated bg-alternative surface (dark grey)
    And the sheet header and content remain unchanged
    And dismissing the sheet works via the close button or swipe down

Screenshots/Recordings

N/A — visual change to sheet surface; will attach screenshots from nightly build if needed.

Before

N/A

After

N/A

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs and Coding Standards
  • I've completed the PR template to the best of my ability
  • I've included tests if applicable
  • I've documented my code using JSDoc format if applicable
  • I've applied the right labels on the PR (internal only)

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use the linked power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

Slack Thread

Open in Web Open in Cursor 

…apply bg-alternative surface when Pure Black is enabled; remove legacy BottomModal usage

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@mm-token-exchange-service mm-token-exchange-service Bot added team-design-system All issues relating to design system in Mobile INVALID-PR-TEMPLATE PR's body doesn't match template labels Jul 10, 2026
@mm-token-exchange-service

Copy link
Copy Markdown
Contributor

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.

@cursor cursor Bot changed the title Pure Black: switch confirmations Expandable to MMDS BottomSheet (uses bg-alternative) fix(pure-black): switch confirmations Expandable to MMDS BottomSheet (uses bg-alternative) Jul 10, 2026
@georgewrmarshall

Copy link
Copy Markdown
Contributor Author

@cursoragent revert the refactor changes and lets just chagne the styles to use background alternative if pure black is true

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Done. I reverted the Expandable refactor and made a style-only fix:

  • Reverted Expandable to use the existing BottomModal (no component migration).
  • Updated expandable.styles.ts to use the elevated surface color, which resolves to bg-alternative when Pure Black is enabled.
  • Pushed commit and updated the PR body to reflect “style-only” change.

This keeps behavior unchanged and fixes the Pure Black background for the Advanced details sheet.

Open in Web Open in Cursor 

…lementation

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@github-actions github-actions Bot added size-XS and removed size-S labels Jul 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 97%
click to see 🤖 AI reasoning details

E2E Test Selection:
The only changed file is app/components/Views/confirmations/components/UI/expandable/expandable.styles.ts. The diff shows a single-line change replacing theme.colors.background.section with getElevatedSurfaceColor(theme) for the modalContent background color. This is a purely cosmetic/visual styling change — it adjusts the background color of the expandable modal content in the confirmations UI. The getElevatedSurfaceColor utility is already widely used across the codebase (BottomSheetDialog, ModalConfirmation, NetworkManager, TextField, etc.) and is a well-established theme utility. There is no functional logic change, no state management impact, no navigation change, and no business logic affected. Per the COSMETIC CHANGES guidance, this type of styling-only change does not warrant any E2E test execution.

Performance Test Selection:
The change is a pure CSS/StyleSheet background color update in a single style file. It has no impact on rendering performance, load times, or any measurable performance metric. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template size-XS team-design-system All issues relating to design system in Mobile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants