-
Notifications
You must be signed in to change notification settings - Fork 160
fix(swap): connect wallet modal breaks if was closed using swipe (#6605) #6606
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
fix(swap): connect wallet modal breaks if was closed using swipe (#6605) #6606
Conversation
|
@crutch12 is attempting to deploy a commit to the cow Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughFixed a bug in the modal component where the Y position was not reset after dismissing via swipe gesture on mobile, preventing subsequent swipes. Implemented onDragEnd handler to detect drag intent and reset spring value to ensure proper modal state on reopening. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (1)📓 Common learnings🔇 Additional comments (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @crutch12 , thank you for testing the app and fixing issues. |
|
Hi @elena-zh I use Chrome 142.0.7444.171, Android 16, incognito mode. But I can reproduce with any mobile/emulated device (hope you've checked the video from related issue). I just swipe this modal fast enough so I'm not able to see it again (it changes it's Y position). I'm not sure how to clarify it better 😅 Just don't release the finger till it reaches the bottom of the screen |
shoom3301
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to reproduce the bug, but the changes look relevant
|
Have checked on iphone safari, incognito Caught the same problem 🥸 |
|
Another video (android) screen-20251204-104643.mp4 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
elena-zh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Managed to reproduce. Thanks for fixing it.
Summary
Fixes #6605
useGesture's ref shouldn't be destroyed beforeonDragEndcall, it breaksuseGesture's controller behaviour.Behaviour changed: now the modal closes only when user releases finger (as I suppose it should be, every another app implements the same behaviour)
To Test
Modal opens with origin Y position(0). You are able to swipe it again.
Background
y.interpolateis deprecated, usey.toy.set(0)to restore original Y positionSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.