fix: text alignment in asset picker#27069
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. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
The component is imported by BridgeTokenSelector.tsx which is part of the bridge/swap token selection flow. Since this affects the token selection UI in bridge and swap flows, SmokeTrade is the appropriate tag. Per the tag guidance, SmokeConfirmations should also be selected when SmokeTrade is selected since swap/bridge flows require confirmations. These are low-risk UI styling changes that don't modify business logic, state management, or transaction handling - just the visual presentation of token items in the selector list. Performance Test Selection: |
The committed fixture schema is out of date. To update, comment: |
|



Description
This PR aligns the mobile asset picker token row layout and text-wrapping behavior with
metamask-extensionto fix wrapping/spacing issues inTokenSelectorItem.It updates the row structure so balances are consistently prioritized on the right, enforces single-line rendering for crypto and fiat balances, and truncates long token names to a single line with tail ellipsis. Tests were updated to reflect the new truncation behavior and to verify single-line balance rendering.
Changelog
CHANGELOG entry: Fixed a bug in the asset picker where token and balance text could wrap incorrectly by aligning mobile layout and truncation behavior with extension.
Related issues
Fixes: SWAPS-4154
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
UI-only layout tweaks to
TokenSelectorItem(flex/shrink, single-line truncation, right-aligned balances) with updated tests; low risk aside from potential visual regressions on edge-case token names/balances.Overview
Updates
TokenSelectorItemlayout to follow a left-details/right-values pattern: token symbol/name are constrained to a single truncated line while crypto/fiat balances render as single-line, right-aligned values.Adds flex/shrink and
minWidth: 0styling to prevent overflow, updates fiat balance rendering tonumberOfLines={1}, and adjusts/extends tests to assert the new truncation and single-line balance behavior.Written by Cursor Bugbot for commit c8ae3e0. This will update automatically on new commits. Configure here.