fix: Polish token selector for Buy, Swap and Send#28711
Conversation
|
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. |
|
I have read the CLA Document and I hereby sign the CLA |
4804e20 to
ad4b35f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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 ad4b35f. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: The PR contains UI/styling and component migration changes across three main areas:
All changes are UI-level (no business logic, no controller changes, no state management changes). The component migration from Pressable to ButtonToggle in the network filter is the most impactful change as it changes the interactive behavior of the send flow's network selector. The layout reorders in Bridge and Ramp are cosmetic but could affect test selectors or user interaction flows. No tags beyond SmokeTrade, SmokeConfirmations, and SmokeRamps are warranted as:
Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |
…etaMask#29391) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until this PR meets the canonical Definition of Ready For Review in `docs/readme/ready-for-review.md`. In short: the template must be materially complete (not just section titles present), all status checks must be currently passing, and the only expected follow-up commits must be reviewer-driven. --> ## **Description** This PR polishes the filter patterns on the Market and Transactions pages for consistency. It is part of a wider initiative to standardize our design patterns. [See this file ](https://www.figma.com/design/aRyo0N82L0IoNlMVIKvSpc/Mobile-Papercuts?node-id=1204-1329)for context. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** Fixes: MetaMask#28711 MetaMask#29396 ## **Manual testing steps** ```gherkin Feature: Perps market category filters (design system badge, no dismiss icon) Scenario: user selects and clears a perps market category using chip taps only Given I am on the Perps markets list and all category chips are visible with none selected (or a known starting filter) When user taps a category chip to apply that filter, then taps that same chip again Then the list filters when the chip is selected, no dismiss “×” appears on the chip, and tapping the selected chip again clears the filter back to all markets ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <img width="768" height="771" alt="Screenshot 2026-04-28 at 8 54 33 PM" src="https://github.com/user-attachments/assets/43fb350b-68ae-438a-b6cc-f771ec0beee8" /> ### **After** <img width="1285" height="743" alt="Screenshot 2026-04-28 at 1 43 59 PM" src="https://github.com/user-attachments/assets/bded9482-933e-4214-8b3f-78fd6420ef74" /> ## **Pre-merge author checklist** <!-- Every checklist item must be consciously assessed before marking this PR as "Ready for review". A checked box means you deliberately considered that responsibility, not that you literally performed every action listed. Unchecked boxes are ambiguous: they are not an implicit "N/A" and they are not a silent "skip". See `docs/readme/ready-for-review.md` for the full checklist semantics. --> - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] 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](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. #### 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 these [power-user SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [ ] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example For performance guidelines and tooling, see the [Performance Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers). ## **Pre-merge reviewer checklist** <!-- Reviewer checklist items follow the same semantics as the author checklist: an unchecked box is ambiguous, a checked box means the reviewer consciously assessed that responsibility. See `docs/readme/ready-for-review.md`. --> - [ ] 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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk UI polish and minor component API simplification; main risk is unintended visual/regression in Perps category filtering due to removing the badge dismiss affordance. > > **Overview** > Polishes Perps filter UI spacing to be consistent across screens (e.g., tighter gaps between Transactions filter tabs and adjusted Market search bar padding). > > Simplifies `PerpsMarketCategoryBadge` by removing the `showDismiss`/`onDismiss` behavior and dismiss icon, updating styling/typography, and adjusting `PerpsMarketCategoryBadges` plus tests to reflect the new toggle-off-by-retap interaction without dismiss indicators. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 5e65e5f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->




Description
What is the reason for the change?
What is the improvement/solution?
ButtonTogglewith 12px corner radius (rounded-xl), solid background when selected (primary) and when unselected (secondary), and no border. This matches the Bridge “Select token” filter chips.TokenListItemsubtitles (symbols) now useTextVariant.BodySMinstead ofTextVariant.BodyMDfor consistent secondary label sizing.Changelog
CHANGELOG entry: fix: Polish token selector for Buy, Swap and Send
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Primarily UI layout/styling refactors (chip components, spacing, avatar sizes) with minimal behavioral change; risk is limited to visual regressions and testID-dependent UI tests.
Overview
Aligns token-selection UIs across Bridge, Ramp, and Send by standardizing spacing and filter chip styling.
Bridge and Ramp token selectors reorder the search bar and network pills/filters and switch to Tailwind-based layout spacing (removing some local styles). Send confirmations’
NetworkFilteris restyled to useButtonTogglechips withAvatarNetworkicons (and new avatar test IDs), and the send asset search padding is adjusted.Token list item visuals are polished (e.g., Bridge
TokenSelectorItemrow height/spacing, larger token avatar, smaller secondary balance text; NFT avatar gets rounded corners), and tests are updated to assert the new avatar test IDs.Reviewed by Cursor Bugbot for commit d2da76b. Bugbot is set up for automated code reviews on this repo. Configure here.