chore: expand pressable region to make selecting token easier in batchSell cp-7.82.0#31673
chore: expand pressable region to make selecting token easier in batchSell cp-7.82.0#31673infiniteflower wants to merge 1 commit into
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:
These are accessibility improvements to the Bridge/Swap token selection UI. The changes are low-risk (new optional props with safe defaults, no breaking changes to existing behavior), but they do affect the Bridge/Swap flow's token selector interaction model. SmokeSwap is the appropriate tag to validate the swap/bridge token selection flows still work correctly. Per SmokeSwap's description, SmokeConfirmations should also be selected when selecting SmokeSwap, but since these changes are purely UI/accessibility improvements to the token selector (not the confirmation flow itself), and the risk is low, SmokeSwap alone is sufficient. However, to be conservative and follow the tag dependency guidance, I'll include SmokeConfirmations as well. Performance Test Selection: |
Description
Users reported that selecting/deselecting tokens on the Batch Sell token-select screen felt unresponsive — taps on the checkbox frequently didn't register, requiring two or three attempts.
The root UX cause is hit-target size: the checkbox and the token row were two separate press targets, and the checkbox itself is only ~22px. Taps that landed just outside the checkbox were missed.
This PR makes the entire token row a single press target. The checkbox becomes display-only and the whole row (including the checkbox column) toggles selection through one
TouchableOpacity. This is implemented as an opt-in capability on the sharedTokenSelectorItemso other consumers are unaffected:TokenSelectorItemgainsshouldIncludeChildrenInPressTargetandpressTargetAccessibilityLabel. When enabled,childrenrender inside the row'sTouchableOpacity(withpointerEvents="none"), and the row press target exposesaccessibilityRole="checkbox",accessibilityState={{ checked }}, and the provided label.BatchSellTokenRowopts in, and itsCheckboxis now purely visual (pointerEvents="none", hidden from the accessibility tree, no-oponChange).Default behavior for all existing
TokenSelectorItemcallers is unchanged (the flag defaults tofalse).Note: earlier exploratory changes (a
setSelectedTokensfunctional-update refactor and row memoization) were intentionally reverted after analysis — they did not address the actual cause. This PR is scoped to the hit-target fix only.Changelog
CHANGELOG entry: Fixed unresponsive token selection in Batch Sell by making the entire token row tappable instead of just the small checkbox.
Related issues
Fixes: SWAPS-4616
Manual testing steps
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist