Skip to content

refactor: Updated tokens full view to use MMDS components#30916

Merged
brianacnguyen merged 4 commits into
mainfrom
select/tokens
Jun 4, 2026
Merged

refactor: Updated tokens full view to use MMDS components#30916
brianacnguyen merged 4 commits into
mainfrom
select/tokens

Conversation

@brianacnguyen

@brianacnguyen brianacnguyen commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Description

Updates the Tokens full view (“View all tokens”) and shared token control bar to use MMDS (@metamask/design-system-react-native) and correct safe-area handling.

Why

  • Align the Tokens full-screen experience with the design system (network filter, header, icon buttons).
  • Fix layout/spacing: control bar alignment, bottom home-indicator clearance on the scrollable list, and header safe area.

What changed

  • TokensFullView: SafeAreaViewBox; HeaderBaseHeaderStandard with includesTopInset (no custom header styles).
  • BaseControlBar: Network filter ButtonBaseSelectButton (primary); network avatar → AvatarNetwork; filter/add icons → MMDS ButtonIcon (Md). Removed legacy bordered button styles from ControlBarStyles.
  • TokenListControlBar: Import (+) button uses MMDS ButtonIcon (Md), no custom background override.
  • TokenList / Tokens: When isFullView, apply bottom safe-area inset as paddingBottom on scroll content (FlashList contentContainerStyle; empty-state ScrollView contentContainerStyle). Hide vertical scroll indicator on full-view list.
  • Spacing: Full-view control bar horizontal padding kept (px-4); bottom padding pb-3 on control bar; tests updated for SelectButton / AvatarNetwork.

Motivation
Design-system migration for the Tokens full view control bar and header, with safer list scrolling above the home indicator on notched devices.


Changelog

CHANGELOG entry: Updated the Tokens full view header and network filter to use the design system, and improved bottom spacing when scrolling the token list.

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-770


Manual testing steps

Feature: Tokens full view design system and safe area

  Scenario: user opens Tokens full view from homepage
    Given the user is logged in with multiple tokens on popular networks
    And the user is on the wallet homepage

    When the user taps "View all" on the Tokens section
    Then the Tokens full view opens with a HeaderStandard title "Tokens" and a back button
    And the network filter shows as a primary SelectButton (e.g. "Popular networks")
    And filter and add (+) icon buttons appear at Md size on the right

  Scenario: user scrolls to the bottom of the token list
    Given the user is on the Tokens full view with a long token list
    And the device has a bottom safe area (e.g. iPhone with home indicator)

    When the user scrolls to the last token row
    Then the last row is not obscured by the home indicator
    And there is comfortable padding below the final list item

  Scenario: user uses network filter and add token actions
    Given the user is on the Tokens full view

    When the user taps "Popular networks"
    Then the network manager / filter flow opens

    When the user returns and taps the "+" button
    Then the import / add token flow opens

    When the user taps the filter (sort) button
    Then the token sort bottom sheet opens

  Scenario: user navigates back
    Given the user is on the Tokens full view

    When the user taps the back button in the header
    Then the user returns to the previous screen

  Scenario: wallet tab tokens section is unchanged
    Given the user is on the wallet tab (embedded tokens list, not full view)

    When the user views the tokens section
    Then the tokens list and control bar still render without full-view-only bottom inset on the outer container

Also verify (quick):

  • Android + iOS, light/dark mode.
  • Single-network filter label + network avatar on SelectButton when only one network is enabled.
  • Cash / mUSD full view (CashTokensFullView) if you touched shared BaseControlBar / Tokens paths used there.

Screenshots/Recordings

Before

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-06-01.at.22.59.30.mov

After

Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-06-01.at.22.51.18.mov

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs and MetaMask Mobile Coding Standards.
  • I've completed the PR template to the best of my ability
  • I've included tests if applicable — BaseControlBar.test.tsx, TokensFullView.test.tsx, TokenList / Tokens tests updated or passing
  • I've documented my code using JSDoc format if applicable — N/A for mostly component swaps
  • I've applied the right labels on the PR

Performance checks (if applicable)

  • I've tested on Android
  • I've tested with a power user scenario
  • I've instrumented key operations with Sentry traces — N/A (UI-only)

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.

Note

Low Risk
UI-only design-system and layout changes with no auth, networking, or asset logic changes; regression risk is limited to Tokens/Cash full-view presentation and scrolling.

Overview
Migrates the Tokens full view (“View all tokens”) to MMDS: custom header/SafeAreaView layout is replaced with HeaderStandard (includesTopInset), and the shared control bar swaps legacy component-library controls for SelectButton (network filter), AvatarNetwork, and Md ButtonIcon for sort/add—dropping bespoke bordered button styles from ControlBarStyles.

For isFullView only, scroll content now gets bottom safe-area paddingBottom on the FlashList and empty-state ScrollView, hides the vertical scroll indicator on the list, and tweaks control bar spacing (pb-3). BaseControlBar tests are updated for the new components.

Reviewed by Cursor Bugbot for commit 45605a0. Bugbot is set up for automated code reviews on this repo. Configure here.

@brianacnguyen brianacnguyen self-assigned this Jun 2, 2026
@brianacnguyen brianacnguyen requested a review from a team as a code owner June 2, 2026 05:59
@brianacnguyen brianacnguyen added No QA Needed Apply this label when your PR does not need any QA effort. team-design-system All issues relating to design system in Mobile labels Jun 2, 2026
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions github-actions Bot added size-M risk:medium AI analysis: medium risk labels Jun 2, 2026
Comment thread app/components/UI/shared/BaseControlBar/BaseControlBar.test.tsx

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit aa7738b. Configure here.

Comment thread app/components/UI/Tokens/index.tsx
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeConfirmations, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeSwap, SmokeStake, SmokeWalletPlatform, SmokeMoney, SmokePerps, SmokeMultiChainAPI, SmokePredictions, SmokeSeedlessOnboarding, SmokeBrowser, SmokeSnaps
  • Selected Performance tags: @PerformanceAccountList, @PerformanceOnboarding, @PerformanceLogin, @PerformanceSwaps, @PerformanceLaunch, @PerformanceAssetLoading, @PerformancePredict, @PerformancePreps
  • Risk Level: high
  • AI Confidence: %
click to see 🤖 AI reasoning details

E2E Test Selection:
Fallback: AI analysis did not complete successfully. Running all tests.

Performance Test Selection:
Fallback: AI analysis did not complete successfully. Running all performance tests.

View GitHub Actions results

@brianacnguyen brianacnguyen added this pull request to the merge queue Jun 4, 2026
Merged via the queue into main with commit e5cb149 Jun 4, 2026
213 checks passed
@brianacnguyen brianacnguyen deleted the select/tokens branch June 4, 2026 16:57
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

No QA Needed Apply this label when your PR does not need any QA effort. risk:medium AI analysis: medium risk size-M 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