Skip to content

fix(social): remove useElevatedSurface shim from Quick Buy BottomSheet (TMCU-1050)#33164

Closed
georgewrmarshall wants to merge 1 commit into
mainfrom
cursor/remove-use-elevated-surface-quick-buy-0f09
Closed

fix(social): remove useElevatedSurface shim from Quick Buy BottomSheet (TMCU-1050)#33164
georgewrmarshall wants to merge 1 commit into
mainfrom
cursor/remove-use-elevated-surface-quick-buy-0f09

Conversation

@georgewrmarshall

Copy link
Copy Markdown
Contributor

Description

MMDS BottomSheetDialog now handles pure-black elevated surface styling internally. This PR removes the redundant useElevatedSurface() shim from the Social Leaderboard Quick Buy bottom sheet so it relies on the design-system component instead of duplicating surface logic.

Updated file:

  • app/components/Views/SocialLeaderboard/TraderPositionView/components/QuickBuy/QuickBuyRoot.tsx

Changelog

CHANGELOG entry: null

Related issues

Fixes: TMCU-1050

Manual testing steps

Feature: Pure black Social Quick Buy bottom sheet

  Scenario: Quick Buy sheet renders with correct elevated surface in pure black mode
    Given the app is running with MM_PURE_BLACK_PREVIEW enabled in dark mode
    And the user navigates to the Social Leaderboard

    When the user opens the Quick Buy bottom sheet for a trader position
    Then the sheet should display with the correct elevated surface background (not collapsing into the pure-black screen background)

N/A for automated-only cleanup; visual QA recommended on device with pure black preview enabled.

Screenshots/Recordings

N/A — internal styling cleanup with no user-facing copy or layout changes. Pure black visual QA should be done on device.

Before

N/A

After

N/A

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android (N/A — styling-only change)
  • I've tested with a power user scenario (N/A — no performance-sensitive paths touched)
  • I've instrumented key operations with Sentry traces for production performance metrics (N/A — no new traced operations)

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
Open in Web Open in Cursor 

…t (TMCU-1050)

MMDS BottomSheetDialog now handles pure-black elevated surface styling
internally. Remove the redundant useElevatedSurface() shim from the Social
Leaderboard Quick Buy sheet.

Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
@metamask-ci metamask-ci Bot added the team-design-system All issues relating to design system in Mobile label Jul 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The change is in QuickBuyRoot.tsx within the SocialLeaderboard/TraderPositionView feature. The diff shows:

  1. Removal of useElevatedSurface import from themeUtils
  2. Removal of const surfaceClass = useElevatedSurface() usage
  3. Removal of twClassName={surfaceClass} prop from BottomSheetDialog

This is a minor visual/styling change that removes an elevated surface styling class from the QuickBuy bottom sheet dialog. While primarily cosmetic (removing a CSS class), it does affect the visual appearance of the QuickBuy bottom sheet in the Trader Position flow.

The QuickBuy component is part of the SocialLeaderboard/TraderPositionView feature which relates to the Perps trading functionality. SmokePerps covers the Add Funds flow and perps interface, which likely exercises this QuickBuy component. SmokeWalletPlatform is selected because Perps is a section inside the Trending tab.

No performance tests are warranted as this is a styling-only change with no impact on rendering performance, data fetching, or app responsiveness.

Performance Test Selection:
The change only removes a CSS class (twClassName prop) from a BottomSheetDialog component. This is a purely visual/styling change with no impact on rendering performance, data fetching, asset loading, or any other performance-sensitive operations.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

onClose={onClose}
twClassName={surfaceClass}
>
<BottomSheetDialog ref={bottomSheetRef} onClose={onClose}>

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.

MMDS BottomSheetDialog applies elevated surface styling internally since design-system-react-native 0.33, so twClassName={surfaceClass} was redundant here. useElevatedSurface returned bg-alternative in pure-black dark mode, which BottomSheetDialog now applies via usePureBlack without callsite overrides.

@github-actions github-actions Bot locked and limited conversation to collaborators Jul 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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