Skip to content

fix: prevent BridgeView from blocking zero-state trending scroll#28103

Merged
bfullam merged 2 commits into
mainfrom
swaps-fix-trending-scroll
Mar 30, 2026
Merged

fix: prevent BridgeView from blocking zero-state trending scroll#28103
bfullam merged 2 commits into
mainfrom
swaps-fix-trending-scroll

Conversation

@bfullam

@bfullam bfullam commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Description

Bridge zero-state scrolling could get stuck when a drag started from the amount area above trending tokens because the outer BridgeView wrapper always claimed the initial responder.

This change keeps the existing blur-and-close behavior for other bridge states, but lets the scroll view own the gesture when zero-state trending content is visible so users can scroll naturally into the trending section.

Changelog

CHANGELOG entry: Fixed bridge zero-state trending scrolling when dragging from the amount area

Related issues

Fixes:

Manual testing steps

Feature: Bridge zero-state trending scroll

  Scenario: user scrolls into trending tokens from the amount area
    Given I am on the Bridge screen with swaps trending tokens enabled
    And I have not entered a source amount so the zero-state trending section is visible

    When user drags upward starting from the amount area toward the trending section
    Then the Bridge screen should scroll
    And the trending section should continue scrolling without getting stuck

  Scenario: user taps outside the input in non-zero bridge states
    Given I am on the Bridge screen with a positive source amount entered

    When user taps outside the source input area
    Then the source input should blur
    And the keypad should close

Screenshots/Recordings

Before

N/A

After

N/A

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

Low Risk
Low risk UI gesture-handling change limited to the Bridge zero-state when the trending-tokens flag is enabled; main risk is unintended responder behavior differences in that specific mode.

Overview
Prevents BridgeView’s outer wrapper from always claiming touch responder events by making onStartShouldSetResponder conditional.

When the bridge is in zero-state and trending tokens are enabled, the wrapper no longer intercepts the initial gesture so the inner ScrollView can scroll normally; all other modes keep the existing tap-to-blur input and close keypad behavior.

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

@bfullam bfullam requested a review from a team as a code owner March 30, 2026 16:42
@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 Mar 30, 2026
@github-actions github-actions Bot added size-XS risk-low Low testing needed · Low bug introduction risk labels Mar 30, 2026
@bfullam bfullam changed the title Fix bridge trending scroll touch handling in zero state fix: prevent BridgeView from blocking zero-state trending scroll Mar 30, 2026
@bfullam bfullam enabled auto-merge March 30, 2026 17:15
@github-actions github-actions Bot added risk-low Low testing needed · Low bug introduction risk and removed risk-low Low testing needed · Low bug introduction risk labels Mar 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeTrade, SmokeConfirmations
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The change is a targeted, minimal bug fix in BridgeView/index.tsx. It modifies the onStartShouldSetResponder callback on the outer Box container to return false (instead of always true) when contentMode === 'zero' && isSwapsTrendingTokensEnabled. This allows the trending tokens scrollable section to properly receive touch/scroll events when the feature flag is enabled and no quote is present. The fix is gated by the swapsTrendingTokens remote feature flag. SmokeTrade covers swap and bridge flows (the primary affected area). SmokeConfirmations is required per SmokeTrade's tag description since swap/bridge flows involve transaction confirmations. No other areas (accounts, identity, network management, snaps, etc.) are affected by this change.

Performance Test Selection:
The change is a boolean condition in a touch event responder callback. It does not affect rendering performance, data loading, list rendering, or any performance-critical paths. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@bfullam bfullam added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit 36ddf90 Mar 30, 2026
99 of 101 checks passed
@bfullam bfullam deleted the swaps-fix-trending-scroll branch March 30, 2026 21:05
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 30, 2026
@metamaskbot metamaskbot added the release-7.73.0 Issue or pull request that will be included in release 7.73.0 label Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.73.0 Issue or pull request that will be included in release 7.73.0 risk-low Low testing needed · Low bug introduction risk size-XS team-swaps-and-bridge Swaps and Bridge team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants