Repository navigation
Slider: a typed range wider than the track's (part of #328, based on #403) - #407
Merged
Merged
Conversation
`SliderChain::typed_range(range)`: a value typed in the editable readout reaches `range` (e.g. ±380 dB behind a 60 dB track), as the user decided on #328. - A typed value is clamped to the typed range and snapped on the track's step lattice (a new crate-internal `Step::snap_from`, which `snap` now calls with the range's own start). - Outside the track the thumb pins at its end; the arrow keys step from where the value is, within the typed range; Home and End go to the track's ends. - AccessKit's min and max are the track's, widened to hold the value. - A typed range that does not hold the track's is widened to it and reported as `BadRange`; no panic. - Without a typed range, nothing changes. Based on #403. Part of #328. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PWiKKf74MNWrhkW1CvKVUP
…e-328 # Conflicts: # src/owned/slider.rs
# Conflicts: # src/owned/slider.rs # tests/it/main.rs
Owner
Author
|
Approved by the user after the number-field trial (2026-11-19). GitHub's required checks pass on the branch merged with current main. Merging. |
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.
Part of #328: PR 2 of 3,
typed_range. Based on #403: this PR targets #403's branch and moves to main when #403 merges.API (rustdoc
TODO(prose))Behaviour, as the user accepted it on #328
Step::snap_from(origin, value, range)does this, andStep::snapnow calls it with the range's own start, so its behaviour is unchanged. It also prefers either end of the range when that's nearer, which only matters when the start is off the lattice.BadRange. No panic.typed_range: nothing changes; the typed range is the track's.The stepper doesn't take it, because it has one range.
Tests (
tests/it/typed_range.rs, through the real readout, keys and AccessKit)Mutations, each caught:
The existing slider, stepper and step tests (85) pass unchanged.
Prose for you
TODO(prose)onSliderChain::typed_range.git diff numberfield-328 HEAD --stat(this PR alone)cargo xtask ciexits 0 on 6833d6c (on #403's 6ad9d8d).🤖 Generated with Claude Code
https://claude.ai/code/session_01PWiKKf74MNWrhkW1CvKVUP