-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore(runway): cherry-pick fix(ramp): use ScrollView from react-native-gesture-handler in PaymentMethodSelectorModal #24197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(runway): cherry-pick fix(ramp): use ScrollView from react-native-gesture-handler in PaymentMethodSelectorModal #24197
Conversation
…e-gesture-handler in PaymentMethodSelectorModal (#24188) ## **Description** The `ScrollView` in `PaymentMethodSelectorModal` was imported from `react-native` instead of `react-native-gesture-handler`, causing the scroll functionality to not work when used inside a `BottomSheet` component. This fix changes the import source to use `ScrollView` from `react-native-gesture-handler`, which is required for proper gesture handling and scrolling within bottom sheets that use gesture handlers. ## **Changelog** CHANGELOG entry: Fixed payment method selector modal scroll not working ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: Payment Method Selector Modal Scrolling Scenario: user scrolls through payment methods in the modal Given the user is on the Buy/Sell flow with multiple payment methods available When user opens the payment method selector modal And user scrolls down through the list of payment methods Then the list should scroll smoothly And all payment methods should be accessible via scrolling ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** https://github.com/user-attachments/assets/b8be9891-2b09-4bff-a39f-e846af4e2ac0 ### **After** https://github.com/user-attachments/assets/954e1fcd-ef3c-4bae-a507-e481469620fa ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **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. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Switches `PaymentMethodSelectorModal` to use `ScrollView` from `react-native-gesture-handler` and updates snapshots accordingly. > > - **Ramp UI**: > - Replace `ScrollView` import in `app/components/UI/Ramp/Aggregator/components/PaymentMethodSelectorModal/PaymentMethodSelectorModal.tsx` from `react-native` to `react-native-gesture-handler` for proper scrolling inside `BottomSheet`. > - **Tests**: > - Update snapshots in `.../PaymentMethodSelectorModal/__snapshots__/PaymentMethodSelectorModal.test.tsx.snap` to reflect `RCTScrollView` gesture-handler props. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 30a37e0. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
|
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 detailsAnalysis SummaryChanges MadeThe PR contains 2 files with changes to the Payment Method Selector Modal in the Ramp Aggregator component:
Impact AssessmentDirect Impact:
Technical Significance:
Functional Impact:
Risk Assessment: LOW
Test Tag Selection: SmokeRampsWhy SmokeRamps:
Why not other tags:
Confidence: 85%
|
|
No release label on PR. Adding release label release-7.61.3 on PR, as PR was cherry-picked in branch 7.61.3. |
Description
The
ScrollViewinPaymentMethodSelectorModalwas imported fromreact-nativeinstead ofreact-native-gesture-handler, causing thescroll functionality to not work when used inside a
BottomSheetcomponent.
This fix changes the import source to use
ScrollViewfromreact-native-gesture-handler, which is required for proper gesturehandling and scrolling within bottom sheets that use gesture handlers.
Changelog
CHANGELOG entry: Fixed payment method selector modal scroll not working
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
pm_before.mov
After
pm_after.mov
Pre-merge author checklist
Docs and MetaMask Mobile
Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Note
Switches
ScrollViewtoreact-native-gesture-handlerinPaymentMethodSelectorModalto enable proper scrolling within the bottom sheet.react-nativeScrollViewwithreact-native-gesture-handlerScrollViewinapp/components/UI/Ramp/Aggregator/components/PaymentMethodSelectorModal/PaymentMethodSelectorModal.tsxfor correct gesture-based scrolling insideBottomSheet.PaymentMethodSelectorModal.test.tsx.snapreflectingRCTScrollViewgesture handler props.Written by Cursor Bugbot for commit 370a2c9. This will update automatically on new commits. Configure here.
5d8e931