Skip to content

Add pointer scrubbing for NumberInput and VectorInput - #196

Merged
snkmcb merged 1 commit into
mainfrom
codex/drag-number-input
Nov 11, 2026
Merged

snkmcb merged 1 commit into
mainfrom
codex/drag-number-input

Conversation

@snkmcb

@snkmcb snkmcb commented Nov 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds public NumberDragDispatcher and number_drag_target (number_drag.hpp) for horizontal pointer scrubbing over every NumberInput and VectorInput component. No new parts, roles or document vocabulary.
  • A primary press on an input's label, field or padding captures the pointer and focuses the input. After a 3-unit horizontal threshold, moves and the release request whole steps of 4 units from the press (truncated toward zero) through the input's own command, only when the count changes. Both distances are configurable.
  • started tells the host to record the origin value. Escape/Cancel while scrubbing requests 0 steps (canceled). PointerCancel keeps the last value. Other key, text and logical input ends capture unconsumed. Replacement keeps a compatible capture by author ID. Step parts are not targets.
  • Inspector: Scale and Position X/Y/Z scrub from their parsed drafts. An invalid draft rejects with the existing feedback. The captured control shows its active background, and Windows shows the horizontal resize cursor over scrubbable inputs. The hint now reads "Enter applies, Esc reverts, Up/Down or drag step."
  • Docs: new input architecture section, NumberInput/VectorInput/Inspector guide sections, support matrix, testing table, changelog.

Verification

  • New owner test number_drag: targets, click vs. threshold, truncated steps, cancellation, replacement, rejection.
  • inspector_hierarchy window-free smoke: new scrub_smoke. The injected native smoke drags the X label under OS capture.
  • Debug: all 98 non-native tests pass.
  • Release: number_drag, inspector_hierarchy and inspector_hierarchy_native pass (native 13 s).
  • scripts/check-docs.ps1 passes. Formatted with clang-format 23.1.1.

Note: in Debug, inspector_hierarchy_native exceeds its 60 s CTest timeout (it passes standalone in 155 s). This change adds only three injected messages, so the slow Debug run is very likely pre-existing. I did not re-measure it on main.

Not included

Modifier-scaled or vertical scrubbing, scrub history transactions in the Inspector (each change is a separate command, like the Display color drag), pointer caret placement, native accessibility.

🤖 Generated with Claude Code

NumberDragDispatcher captures a primary press on a number input's label,
field or padding, focuses it, and after a horizontal threshold requests
whole steps from the press through the input's own command. Escape while
scrubbing restores the origin; PointerCancel keeps the last value.

The Inspector scrubs Scale and Position X/Y/Z from their parsed drafts,
with active feedback and a Windows horizontal resize cursor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snkmcb
snkmcb merged commit d55b053 into main Nov 11, 2026
3 checks passed
@snkmcb
snkmcb deleted the codex/drag-number-input branch November 11, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant