- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.4k
fix(perps): update drag value in tap handler #21608
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
base: main
Are you sure you want to change the base?
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. | 
| Codecov Report❌ Patch coverage is  
 Additional details and impacted files@@           Coverage Diff           @@
##             main   #21608   +/-   ##
=======================================
  Coverage   77.15%   77.15%           
=======================================
  Files        3720     3720           
  Lines       93544    93548    +4     
  Branches    17947    17949    +2     
=======================================
+ Hits        72171    72179    +8     
- Misses      16475    16476    +1     
+ Partials     4898     4893    -5     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
| Pulled down the branch, and this is the behavior that I am seeing: Screen.Recording.2025-10-27.at.8.50.59.AM.movIt seems like the  I think this is partly what we are trying to solve in this bugfix. I wonder if we can trigger the loading skeleton  | 
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.
This seems like a very large amount of tests added, could they be grouped with better assertions?
| @abretonc7s @gambinish I've updated the tests and made it to display a loading indicator when the user starts dragging the slider, however can't quite get the coverage above 80%. Could you please have a look again? Thanks! | 
| 
 | 


Description
Fixed a bug in the leverage slider where tapping or long pressing on the slider track did not trigger the
onDragEndcallback, causing inconsistent state management between tap and drag interactions.Changelog
CHANGELOG entry: Fixed leverage slider tap and long press gesture not finalizing state updates correctly
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/TAT-1826
Manual testing steps
Screenshots/Recordings
Before
Simulator.Screen.Recording.-.iPhone.16e.-.2025-10-27.at.07.12.51.mov
After
Simulator.Screen.Recording.-.iPhone.16e.-.2025-10-27.at.07.09.55.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Ensures tap and long-press finalize leverage changes, adds comprehensive gesture tests, and introduces a non-flickering skeleton state for liquidation data.
onDragStart/onDragEndrequired and invoke unconditionally during pan end/begin.handleHoldEndand wire toGesture.TapandGesture.LongPress; compose withPanviaGesture.Simultaneous.testIDleverage-slider-trackfor gesture/layout targeting.shouldShowSkeletonto control liquidation UI and prevent flicker; reset on close and when value unchanged.Number.parseFloat; setdynamicLiquidationPriceto0whileisCalculating.PerpsLeverageBottomSheet.test.tsx):fireGestureHandler,LongPress, haptics) and extensive tests for pan/tap/long-press flows, state updates, and haptic integration.Written by Cursor Bugbot for commit eeb9bc7. This will update automatically on new commits. Configure here.