Repository navigation
[drawer] Fix release velocity on 120 Hz input - #5845
Merged
atomiks merged 3 commits intoOct 5, 2026
Merged
Conversation
commit: |
Bundle size
PerformanceTotal duration: 487.72 ms +68.04 ms(+16.2%) | Renders: 76 (+0) | Paint: 888.54 ms +103.46 ms(+13.2%)
11 tests within noise — details Metric alarms
Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
atomiks
marked this pull request as ready for review
October 2, 2026 03:35
atomiks
requested review from
colmtuite,
flaviendelangle,
jjenzz and
michaldudak
as code owners
October 2, 2026 03:35
atomiks
force-pushed
the
claude/base-ui-issue-investigation-091a18
branch
from
October 5, 2026 02:44
9bf9102 to
5eca842
Compare
atomiks
force-pushed
the
claude/base-ui-issue-investigation-091a18
branch
from
October 5, 2026 03:02
5eca842 to
8b3cb30
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5837
useSwipeDismissmeasured release velocity from the last two samples and floored the gap at 16 ms. At 120 Hz, consecutive touch moves are about 8 ms apart, so each half-size step was still divided by 16 ms and the velocity read about half the finger's speed. Snap point flicks that clear the 0.5 px/ms thresholds at 60 Hz snapped back at 120 Hz.This PR lowers that minimum from 16 ms to 4 ms, under one frame at 240 Hz, so the latest moving pair is divided by its actual elapsed time. This also corrects mouse drags on high-refresh monitors, which read low the same way. The minimum still damps near-simultaneous samples, and the stationary-sample and 80 ms age rules from #5658 are unchanged.
Two tests encoded the halving and now expect the finger's speed: the trailing-sample test from #5658 (20 px every 8 ms,
1.25→2.5) and the first-move test (10 px over 8 ms,0.625→1.25). New tests check that 60 Hz and 120 Hz input at the same speed release at the same velocity, and pin the 4 ms minimum.