Skip to content

feat(studio): window sizing, keyboard playback, typed number inputs#75

Merged
LeadcodeDev merged 1 commit into
mainfrom
feat/studio-round3
Jul 19, 2026
Merged

feat(studio): window sizing, keyboard playback, typed number inputs#75
LeadcodeDev merged 1 commit into
mainfrom
feat/studio-round3

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

Closes #74 — user iteration round 3.

  1. Window: 75% of the current monitor, centered (multi-monitor aware) — runtime one-shot since tao monitors are only queryable after launch; the one-frame resize flash is documented in code.
  2. Keyboard transport (pure playback_action(key, mods) mapping, unit-tested): Space = play/pause, ←/→ = pause + step 1, Shift+←/→ = pause + step 10, Home/End = seek; handled keys prevent_default. TopBar and PlaybackBar isolate focused controls with the established stop_propagation pattern — no slider double-step, Space on a focused button activates only the button (deliberate choice over relying on WebKit preventDefault semantics). Play/Pause is now a lucide icon with "(Space)" tooltips.
  3. Typed number inputs: Integer/Float split from the schema's type keyword. Integers show no decimals and write real JSON integers12.0 into badge.count: u32 fails the typed parse and would drop the element at render (proven by a round-trip test; non-integer input into an integer field is refused). Floats use shortest-display trimming ("405.0"→"405", "1.40"→"1.4"); the wave-1 curated fmt_num is aligned.
  4. Polish: DEFAULT marker becomes a discreet dot; full explanation remains in the row title.

Noted: Home/End don't pause (seek-while-playing continues — only steps pause by design); window size isn't persisted (out of scope). examples/ working-tree drift (user's studio session) excluded.

Tests: 7 new (schema split, display trimming, integer round-trip proof, key mapping ×4). 391 total, all green.

Verify: cargo check -p rustmotion-studio ✓ · cargo test --workspace → 391 passed ✓ · cargo fmt --check ✓ · clippy gated ≤1 ✓

…puts

- window resizes to 75% of the current monitor and centers on mount
  (runtime one-shot: tao monitors are only queryable post-launch;
  one-frame resize flash documented)
- keyboard transport via a pure key->action mapping on the existing
  root handler: Space toggles play, arrows pause+step 1, Shift+arrows
  step 10, Home/End seek; TopBar and PlaybackBar isolate their focused
  controls with stop_propagation (no double-step on the slider, Space
  on a focused button activates the button only); Play/Pause becomes
  a lucide icon with shortcut tooltips
- PropKind::Number split into Integer/Float from the schema type:
  integers display without decimals and write real JSON integers
  (12.0 into a u32 field fails the typed parse and would drop the
  element at render — proven by round-trip test; non-integer input is
  refused), floats trim trailing zeros via shortest-display, curated
  fmt_num aligned
- DEFAULT marker becomes a discreet dot (full explanation stays in
  the row title), no more label collision
@LeadcodeDev
LeadcodeDev merged commit a793e83 into main Jul 19, 2026
@LeadcodeDev
LeadcodeDev deleted the feat/studio-round3 branch July 19, 2026 11:23
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.

feat(studio): window sizing, keyboard playback, typed number inputs

1 participant