You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stacked on #2707 (CODAP-1515). A visibility slider now shows a range thumb:
drag either edge to resize the range, or the middle to move it while keeping its width
bounds clamp to the axis; the handles can't cross
a collapsed (zero-width) range snaps to values present in the attribute, while dragging and during playback
each drag is one undoable change
playback moves the whole range, stepping through the data values when it has zero width
It follows the design mockup: the thumb is the slider's thumb split in half at its point, the value row reads "visible value(s) = low - high", and the axis is labeled with the bound attribute's name and units. The label is plain text until CODAP-1514's attribute menu replaces it.
The selection slider isn't implemented yet (CODAP-1518). It will reuse this same appearance. The thumb, value row and axis label apply to any range slider, and its value row will read "selected value(s)".
The range is modeled as the slider's value (its low end) plus a stored width, rather than separate low and high bounds, so the existing dynamic-value, playback, formula and export paths carry it. The design spec's model section was updated to match.
The Config width control depends on CODAP-1513's Config panel, so this story stays open until that lands.
Testing
Jest: range model (clamping, snapping, moving at the axis ends, axis-bound changes, one-step undo), playback stepping and bounds, and the handle and step helpers
Cypress: slider-range-thumb.spec.ts covers the handles and value row, the attribute label, hit-testing at the axis ends, keyboard resize, collapsing onto a data value, ignoring a right-button press, and moving the middle with undo; slider.spec.ts still passes for variable sliders
A visibility or selection slider shows a range thumb: drag either edge
to resize, or the middle to move the range while keeping its width.
Bounds clamp to the axis, a collapsed range snaps to values present in
the attribute, each drag is one undoable change, and playback moves the
whole range, stepping through the data values when it has zero width.
The thumb is the slider's thumb split in half at its point, the value
row shows "visible value(s) = low - high", and the axis is labeled with
the bound attribute.
The range is the slider's value (its low end) plus a stored width, so
the existing dynamic-value, playback, formula, and export paths carry it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
❌ Patch coverage is 70.22222% with 67 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.46%. Comparing base (cefd1be) to head (a9a61e3).
- snap a collapsed range only to data values within the axis
- report the committed range in notifications and the log, from both
edge and middle drags, which now share their commit options
- send the "change slider value" notification when a middle drag ends
- show one value only when the range has zero width
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
For a collapsed range, nextAnimationValue() can return the final data value exactly. Because resetSlider treats equality as already past the boundary, starting playback from the penultimate value wraps immediately and never displays the endpoint (and likewise in reverse). Only reset when the next value is strictly outside the domain.
When playback starts, a range slider tests its current value against the
end of its value domain, not its next step: a collapsed range's next step
can land exactly on the last data value, which has to be shown before
playback wraps. Variable sliders keep their existing check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
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.
Summary
Stacked on #2707 (CODAP-1515). A visibility slider now shows a range thumb:
It follows the design mockup: the thumb is the slider's thumb split in half at its point, the value row reads "visible value(s) = low - high", and the axis is labeled with the bound attribute's name and units. The label is plain text until CODAP-1514's attribute menu replaces it.
The selection slider isn't implemented yet (CODAP-1518). It will reuse this same appearance. The thumb, value row and axis label apply to any range slider, and its value row will read "selected value(s)".
The range is modeled as the slider's value (its low end) plus a stored width, rather than separate low and high bounds, so the existing dynamic-value, playback, formula and export paths carry it. The design spec's model section was updated to match.
The Config width control depends on CODAP-1513's Config panel, so this story stays open until that lands.
Testing
slider-range-thumb.spec.tscovers the handles and value row, the attribute label, hit-testing at the axis ends, keyboard resize, collapsing onto a data value, ignoring a right-button press, and moving the middle with undo;slider.spec.tsstill passes for variable slidersFixes CODAP-1516
🤖 Generated with Claude Code