chore(pure-black): delete useElevatedSurface shim from themeUtils (TMCU-1051)#33165
chore(pure-black): delete useElevatedSurface shim from themeUtils (TMCU-1051)#33165georgewrmarshall wants to merge 3 commits into
Conversation
…CU-1051)
Remove the stopgap useElevatedSurface() hook now that MMDS BottomSheet
handles pure-black elevation internally. All app callsites that passed
twClassName={surfaceClass} to MMDS BottomSheet components have been
cleaned up.
- Delete useElevatedSurface from themeUtils.ts and its unit tests
- Keep getElevatedSurfaceColor for documented legacy-only consumers
- Inline elevated surface class logic in TradeWalletActions custom popup
- Remove row-level surface fill from ActionListItem and network selectors
- Drop obsolete useElevatedSurface mocks from affected test files
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Despite being a refactor, the changes touch BottomSheet components across many critical user flows, so we need to verify that BottomSheet rendering still works correctly in each affected area:
The ActionListItem component also had The risk is medium because while the changes are refactors, they touch BottomSheet styling across many flows — a regression in BottomSheet rendering could affect multiple user journeys. Performance Test Selection: |
🧪 Flaky unit test detectionRun history flaky detectionHistorical failure rate is a hint, not proof — review each suggestion in context. See the flaky-test-detection skill for the full pattern reference and manual audit workflow. Failures / runs sampled per window:
AI-detected flaky patterns
|
- Drop unused useTailwind/tw from CustomNetworkSelector after surfaceClass removal - Move mockIsPureBlackEnabled reset to top-level beforeEach in themeUtils tests Co-authored-by: George Marshall <georgewrmarshall@users.noreply.github.com>
|



Description
MMDS
BottomSheetnow handles pure-black elevated surface styling internally. This PR completes the platform cleanup by deleting the stopgapuseElevatedSurface()hook fromthemeUtils.tsand removing all remaining app callsites.Changes:
useElevatedSurface()fromapp/util/theme/themeUtils.tsand removed its unit teststwClassName={surfaceClass}/useElevatedSurface()from 30+ MMDS BottomSheet callsites (Bridge, Confirmations, Perps, Accounts, Money, Core UX, etc.)ActionListItem,CustomNetworkSelector, andNetworkMultiSelectorListTradeWalletActionscustom popup (non-MMDS component)getElevatedSurfaceColor()with documented legacy-only consumers (BottomSheetDialog, Input, ModalConfirmation, ActionModal, NetworkManager, etc.)useElevatedSurfacemocks from affected test filesChangelog
CHANGELOG entry: null
Related issues
Fixes: TMCU-1051
Manual testing steps
N/A for automated cloud-agent environment — visual QA on device/simulator recommended.
Screenshots/Recordings
Before
N/A — removal-only cleanup; no visual regression expected since MMDS BottomSheet owns surface styling.
After
N/A — visual QA on device/simulator with
MM_PURE_BLACK_PREVIEW=truerecommended.Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an example (N/A — no new traced operations)Pre-merge reviewer checklist