Skip to content
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

Task/htl 113692 limit dragging to header only #1545

Merged
merged 3 commits into from
Jan 7, 2025

Conversation

coolestKev
Copy link
Collaborator

@coolestKev coolestKev commented Jan 7, 2025

Currently, the entire drawer area is drag-to-snappable. Ideally, this action should only be triggered by dragging the header handle, not other parts of the drawer content.

Previously, this introduced a bug where content scrolling triggered the drag-to-snap behavior, which was then patched with a workaround in #1542 by differentiating touch actions.

However, that approach doesn't work well on real devices, introducing jankiness in the scroll action. Therefore, we're revisiting this with a new approach - using the useDragControls hook from framer-motion to limit where we can drag (in this case, the header). This way, we're properly compartmentalizing the interactive areas.

Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 91.66667% with 3 lines in your changes missing coverage. Please review.

Project coverage is 93.90%. Comparing base (2c29662) to head (bfbb718).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
packages/core/src/Drawer/Drawer.tsx 82.35% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1545      +/-   ##
==========================================
+ Coverage   93.86%   93.90%   +0.04%     
==========================================
  Files         154      154              
  Lines       11452    11463      +11     
  Branches      705      706       +1     
==========================================
+ Hits        10749    10764      +15     
  Misses        679      679              
+ Partials       24       20       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@coolestKev coolestKev marked this pull request as ready for review January 7, 2025 15:06
@coolestKev coolestKev merged commit 46130fe into main Jan 7, 2025
10 of 11 checks passed
@coolestKev coolestKev deleted the task/HTL-113692-limit-dragging-to-header-only branch January 7, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants