Skip to content

feat: allow direct entry of slider values - #2995

Merged
ert78gb merged 2 commits into
masterfrom
feat/editable-slider-value
Jul 14, 2026
Merged

feat: allow direct entry of slider values#2995
ert78gb merged 2 commits into
masterfrom
feat/editable-slider-value

Conversation

@mondalaci

Copy link
Copy Markdown
Member

Summary

Closes #2795.

Click the value displayed next to a slider to type a number directly, in addition to dragging the slider thumb. Implemented in the shared slider-wrapper component, so all standard sliders get this behavior automatically (e.g. Modules → Trackpad → Base speed, mouse pointer speed, typing behavior timeouts).

Edge cases covered

  • Precision beyond slider step — direct entry accepts values finer than the slider thumb step (e.g. 0.85 on a 0.1 step slider).
  • Unit suffixes — values with valueUnit (e.g. 1250 px/s) are parsed correctly when typed with or without the unit.
  • Number input bindingngModel on <input type="number"> can bind a number rather than a string; parsing handles both.
  • Floating-point round-trips — values that pass through multiply/divide conversions (e.g. mouse move speeds stored as ÷25, displayed as ×25) are normalized to avoid artifacts like 1701.0000000000002.
  • Validation — entered values are clamped to min/max; empty/invalid input is discarded.
  • Keyboard UX — Enter or blur commits; Escape cancels.
  • Disabled sliders — value is not clickable when the slider is disabled.

Out of scope

We do not plan to implement direct entry for the handful of sliders that use a custom valueFormatter for time values (e.g. LED fade timeout shown as 1:30). Those remain slider-only.

Test plan

  • Modules → Trackpad → Base speed: click value, enter 0.85, confirm it saves and displays correctly
  • Mouse key speed → Acceleration: click value, change 1700 to 1701, confirm no floating-point display artifact
  • Mouse key speed with px/s unit: enter value with and without unit suffix
  • Press Escape while editing — value reverts; press Enter — value commits
  • LED fade timeout slider — value remains read-only (not clickable)

Made with Cursor

mondalaci and others added 2 commits July 14, 2026 10:11
Closes #2795.

Click the value next to any slider to type a number directly, in addition
to dragging the slider thumb.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ert78gb
ert78gb force-pushed the feat/editable-slider-value branch from a09372a to 707b9ab Compare July 14, 2026 09:16
@ert78gb ert78gb changed the title Allow direct entry of slider values feat: allow direct entry of slider values Jul 14, 2026
@ert78gb
ert78gb merged commit 27cfc2b into master Jul 14, 2026
5 checks passed
@ert78gb
ert78gb deleted the feat/editable-slider-value branch July 14, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

allow users to click on and type/enter slider values directly

2 participants