Repository navigation
feat(NumberInput): a held stepper repeats into the draft and commits once - #8205
Merged
Merged
Conversation
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.
User need
A stepper moves one step per click, so a far value takes many clicks. A held stepper should keep stepping, without one
onChangeper value.Problem and solution fit
onChange.onChange. A field that turns disabled or read-only, or steppers that go away, end it with no commit. The pointer click after a release steps nothing; a pointerless click, such as a screen reader's, steps.Current specification
component:NumberInputFR5 (steppers) now carries the owner's wording: "Holding a stepper with a mouse or a pen repeats the step, the first repeat after 0.5 s and then faster; each repeated value shows as the field's draft, and the field commits once, throughonChange, when the hold ends by release or pointer cancel. A single click steps and commits at once." A verification row names the "a held stepper" suite; the longer FR5 cell re-pads the table (15 whitespace-only rows).Public delta and caller burden
No new prop, type, default or theme surface. Callers see one
onChangeper mouse or pen hold.Design and alternatives
Pointer capture on the two buttons, so a release anywhere ends the hold. Each hold keeps its pointer and draft; a pen's hold takes the shared selection lock. Rejected: a commit per repeat.
Evidence
mainthe hold, cancel, bound and no-pointer-click cases fail. The mid-hold editability, steppers-removed, pen-lock and second-pointer cases fail on builds without their guards.mainstays at 3.Scope
Writing rubric results
R1 narration: none; the owner's "as before" was dropped.
R2 research: none in the record.
R3 evidence: the new verification row names the "a held stepper" suite.
R4 rejected alternatives: none in the record.
R5 change references: none.
R6 open questions: none added.
Testing
At c2528eb on
main252b45b:vitest run --project ui packages/core/src/NumberInput packages/core/src/InputGroup: 7 files, 370 tests passed.vitest run --project node packages/cli/foundation/discovery packages/core/src/__tests__: 39 files, 1,005 tests passed.tsc --noEmit,pnpm check:knowledge,check:changesets, Prettier andeslint(CI=true) pass.pnpm lintreports only theBasePropsunused-import warning thatmainalready has.pnpm review:pre: 0 findings.