Repository navigation
refactor(driver): share pointer drag throttling between slider and area - #213
Merged
Merged
Conversation
This was referenced Oct 6, 2026
Owner
Author
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Oct 6, 2026
|
This was referenced Oct 6, 2026
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pbroom
force-pushed
the
feat/react-slider-a11y
branch
from
October 8, 2026 02:44
1e56d26 to
ca25e1a
Compare
pbroom
force-pushed
the
refactor/driver-drag-controller
branch
from
October 8, 2026 02:44
f92ddf0 to
99c5bbb
Compare
This was referenced Oct 8, 2026
Owner
Author
pbroom
changed the base branch from
feat/react-slider-a11y
to
graphite-base/213
October 10, 2026 19:12
- Add a framework-agnostic createPointerDragController to @color-kit/driver: rAF coalescing, dragEpsilon filtering (both axes), and a maxUpdateHz cap that defers (rather than drops) over-budget frames; end() force-commits the pending point. Scheduling and clock are injected (defaults resolve requestAnimationFrame/performance.now at call time; no DOM globals at module scope). - Add normalizeColorAreaPointer; ColorArea drops its inline clamp01 math. - ColorSlider and ColorArea both drive drags through the controller. Slider now flushes the last pending point on pointerup/cancel like the area, and ignores non-finite pointer input. - Hard cut-over: ColorSlider maxPointerRate -> maxUpdateHz (same name as ColorArea). Docs updated. - Unit tests for the controller and area normalization; slider epsilon test now uses real pointer coordinates. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- createPointerDragController takes an optional getCurrentPoint and measures dragEpsilon against it; ColorSlider passes its displayed value so a controlled parent changing it mid-drag no longer swallows moves. - coalescedCount sums the samples of every move folded into a commit. - The slider handler-composition test now uses real coordinates and asserts the release commit made by end(). Co-Authored-By: Claude Opus 5.5 <[email protected]>
pbroom
force-pushed
the
refactor/driver-drag-controller
branch
from
October 10, 2026 19:15
99c5bbb to
32bbeae
Compare
This branch was successfully deployed
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.

rAF coalescing, dragEpsilon filtering (both axes), and a maxUpdateHz cap
that defers (rather than drops) over-budget frames; end() force-commits
the pending point. Scheduling and clock are injected (defaults resolve
requestAnimationFrame/performance.now at call time; no DOM globals at
module scope).
Slider now flushes the last pending point on pointerup/cancel like the
area, and ignores non-finite pointer input.
ColorArea). Docs updated.
now uses real pointer coordinates.
Part of a stacked set of PRs (#204 → #221) from the color-kit assessment. Validated per branch with
pnpm buildandpnpm test; lint, format, typecheck, size, artifact, preprod and agents checks pass at the top of the stack.🤖 Generated with Claude Code