Skip to content

feat: network pills overflow#25893

Merged
SteP-n-s merged 13 commits intomainfrom
feat/network-pills-overflow
Feb 13, 2026
Merged

feat: network pills overflow#25893
SteP-n-s merged 13 commits intomainfrom
feat/network-pills-overflow

Conversation

@bfullam
Copy link
Copy Markdown
Contributor

@bfullam bfullam commented Feb 10, 2026

Description

The bridge token selector currently shows all supported networks as horizontal pills, which doesn't scale as we add more chains. When there are many networks (e.g. 7+), the pill bar becomes crowded and harder to navigate.

This PR introduces an overflow pattern: only the top 4 networks are shown as pills, with a "+X more" pill that opens a NetworkListModal bottom sheet containing the full list. Selecting a non-visible network from the modal dynamically swaps it into the visible pill bar.

Key changes:

  • NetworkPills: Limited to MAX_VISIBLE_PILLS (4) with a "+X more" overflow button. Visible set is derived from the first 4 entries in the feature-flag-controlled chainRanking. When a non-visible network is selected (via the modal), it's pushed to the front of the visible pills.
  • NetworkListModal (new): A bottom sheet showing all available networks with checkmark selection state, using Cell and BottomSheet from the component library.
  • Redux state: The network filter (tokenSelectorNetworkFilter) was lifted from local useState to the bridge Redux slice so it can be shared between BridgeTokenSelector, NetworkPills, and NetworkListModal (which lives on a separate navigation stack).

Changelog

CHANGELOG entry: Added network pill overflow with "+X more" button that opens a full network list in the bridge token selector

Related issues

Fixes:

Manual testing steps

**Feature: Network pills overflow in bridge token selector**

**Scenario: user sees limited pills with overflow indicator**
- Given user opens the bridge token selector (source or dest)
- And there are more than 4 supported networks
- When the token selector screen loads
- Then user sees "All" pill, 4 network pills with icons, and a "+X more" pill
- And the "+X more" count reflects the number of hidden networks

**Scenario: user opens full network list from overflow pill**
- Given user is on the bridge token selector
- And the "+X more" pill is visible
- When user taps the "+X more" pill
- Then a bottom sheet opens showing all available networks
- And the currently selected network (or "All") has a checkmark

**Scenario: user selects a non-visible network from the modal**
- Given user has opened the network list modal
- And "Polygon" is not currently visible in the pill bar
- When user taps "Polygon" in the modal
- Then the modal closes
- And "Polygon" appears as the first pill in the bar (replacing the last visible pill)
- And the token list filters to show only Polygon tokens

**Scenario: user selects "All networks" from the modal**
- Given user has a specific network selected
- And user has opened the network list modal
- When user taps "All networks"
- Then the modal closes
- And the "All" pill is highlighted
- And the token list shows tokens from all networks

**Scenario: user taps a visible network pill directly**
- Given user is on the bridge token selector
- When user taps the "Ethereum" pill
- Then the pill is highlighted
- And the token list filters to show only Ethereum tokens

**Scenario: overflow pill does not appear when few networks exist**
- Given there are 4 or fewer supported networks
- When the token selector screen loads
- Then all networks are shown as pills
- And no "+X more" pill is displayed

Screenshots/Recordings

Before

After

Pre-merge author checklist

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

Medium Risk
Touches token-selector filtering and search reset behavior and adds new navigation/modal flow; regressions could surface as incorrect token lists or stale search results across network switches.

Overview
Adds an overflow UX to the bridge token selector’s network pills: only the top MAX_VISIBLE_PILLS (4) networks are shown, with a localized +X more pill that opens a new NetworkListModal bottom sheet containing the full network list and selection checkmarks.

Lifts the token selector’s network filter into the bridge Redux slice via tokenSelectorNetworkFilter (with new action + selector) so pills and the modal stay in sync, and updates BridgeTokenSelector to initialize/sync/clear this filter and to reset/cancel searches + remount the list when the filter changes from any source.

Written by Cursor Bugbot for commit 2149963. This will update automatically on new commits. Configure here.

@bfullam bfullam requested a review from a team as a code owner February 10, 2026 11:07
@github-actions
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.

@metamaskbot metamaskbot added the team-swaps-and-bridge Swaps and Bridge team label Feb 10, 2026
@bfullam bfullam changed the title Feat/network pills overflow feat: network pills overflow Feb 10, 2026
@github-actions github-actions bot added size-XL and removed size-L labels Feb 10, 2026
@bfullam bfullam enabled auto-merge February 10, 2026 12:32
Copy link
Copy Markdown

@cursor cursor bot left a comment

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.

} else {
// Already visible: scroll to its position
// +1 accounts for the "All" pill at position 0
const scrollX = Math.max(0, existingIndex * PILL_WIDTH);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Scroll offset comment contradicts implementation

Low Severity

The comment states "+1 accounts for the 'All' pill at position 0," but the formula existingIndex * PILL_WIDTH does not include any +1 offset. Since existingIndex is the chain's index within visibleChainIds (which excludes the "All" pill), the computed scrollX is approximately one pill width short of the selected chain's actual position in the ScrollView.

Fix in Cursor Fix in Web

@github-actions github-actions bot added size-L and removed size-XL labels Feb 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeTrade, SmokeConfirmations
  • Selected Performance tags: @PerformanceSwaps
  • Risk Level: medium
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

E2E Test Selection:
This PR adds a network filter feature to the Bridge Token Selector component, which is part of the swap/bridge flow. The changes include:

  1. Redux state changes: New tokenSelectorNetworkFilter state property, action, and selector in the bridge slice
  2. New NetworkListModal component: A bottom sheet modal for selecting networks to filter tokens
  3. NetworkPills component updates: Now shows limited pills with a "+X more" button to open the modal
  4. BridgeTokenSelector updates: Integrated network filter with Redux and navigation to the new modal
  5. Navigation routes: Added new route for the NetworkListModal

The changes are focused on the Bridge/Swap UI functionality. The E2E tests in tests/smoke/swap/bridge-action-smoke.spec.ts are tagged with SmokeTrade and test bridge functionality including token selection. Since bridge flows require transaction confirmations, SmokeConfirmations is also included as a dependent tag per the tag descriptions.

The changes are well-scoped to the bridge token selector UI and don't affect core wallet functionality, account management, or other unrelated features. Unit tests have been added/updated for all new components.

Performance Test Selection:
The changes affect the Bridge Token Selector component which is part of the swap/bridge flow. The NetworkPills component now has different rendering logic (showing limited pills with a '+X more' button), and the BridgeTokenSelector has new state management for network filtering. These UI changes could potentially impact the swap flow performance, particularly the token selection step. The performance tests for swaps (@PerformanceSwaps) test the swap flow including token selection, so they should be run to verify no performance regression.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

@bfullam bfullam disabled auto-merge February 10, 2026 18:37
@SteP-n-s SteP-n-s added this pull request to the merge queue Feb 13, 2026
Merged via the queue into main with commit c13079c Feb 13, 2026
97 checks passed
@SteP-n-s SteP-n-s deleted the feat/network-pills-overflow branch February 13, 2026 13:45
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2026
@metamaskbot metamaskbot added the release-7.67.0 Issue or pull request that will be included in release 7.67.0 label Feb 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.67.0 Issue or pull request that will be included in release 7.67.0 size-L team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants