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. |
app/components/UI/Bridge/components/BridgeTokenSelector/NetworkListModal.tsx
Show resolved
Hide resolved
app/components/UI/Bridge/components/BridgeTokenSelector/NetworkPills.tsx
Show resolved
Hide resolved
app/components/UI/Bridge/components/BridgeTokenSelector/BridgeTokenSelector.tsx
Outdated
Show resolved
Hide resolved
app/components/UI/Bridge/components/BridgeTokenSelector/BridgeTokenSelector.tsx
Outdated
Show resolved
Hide resolved
| } else { | ||
| // Already visible: scroll to its position | ||
| // +1 accounts for the "All" pill at position 0 | ||
| const scrollX = Math.max(0, existingIndex * PILL_WIDTH); |
There was a problem hiding this comment.
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.
app/components/UI/Bridge/components/BridgeTokenSelector/NetworkListModal.test.tsx
Outdated
Show resolved
Hide resolved
app/components/UI/Bridge/components/BridgeTokenSelector/NetworkListModal.test.tsx
Outdated
Show resolved
Hide resolved
app/components/UI/Bridge/components/BridgeTokenSelector/NetworkListModal.test.tsx
Outdated
Show resolved
Hide resolved
app/components/UI/Bridge/components/BridgeTokenSelector/NetworkListModal.test.tsx
Show resolved
Hide resolved
app/components/UI/Bridge/components/BridgeTokenSelector/NetworkPills.test.tsx
Outdated
Show resolved
Hide resolved
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The changes are focused on the Bridge/Swap UI functionality. The E2E tests in 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: |
|





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
NetworkListModalbottom sheet containing the full list. Selecting a non-visible network from the modal dynamically swaps it into the visible pill bar.Key changes:
MAX_VISIBLE_PILLS(4) with a "+X more" overflow button. Visible set is derived from the first 4 entries in the feature-flag-controlledchainRanking. When a non-visible network is selected (via the modal), it's pushed to the front of the visible pills.CellandBottomSheetfrom the component library.tokenSelectorNetworkFilter) was lifted from localuseStateto the bridge Redux slice so it can be shared betweenBridgeTokenSelector,NetworkPills, andNetworkListModal(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
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
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 morepill that opens a newNetworkListModalbottom 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 updatesBridgeTokenSelectorto 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.