Skip to content

feat(studio): inspector round 2 — color editors, effective defaults, timing UX#73

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

feat(studio): inspector round 2 — color editors, effective defaults, timing UX#73
LeadcodeDev merged 1 commit into
mainfrom
feat/studio-inspector-feedback

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

Closes #72 — user-feedback iteration on #71, with screenshots.

  1. Color editors: colors arrays get one ColorPicker+hex row per entry with add/remove ("+ Add color"); fill-type unions (shape fill) get a Single / Linear / Radial segmented mode with per-stop pickers and an angle input — existing values auto-detect their mode; writes produce the hex string or the gradient object.
  2. Effective defaults (also fixes the reported show_value sync bug): displayed values come from a typed serde round-trip (from_value::<Component>to_value) that fills every serde default; fields absent from the raw carry a dimmed DEFAULT marker; writes keep targeting the raw. Gauge show_value now shows checked like the render; weight shows "Regular · 400"; font-family placeholders "Inter". Invalid elements fall back to the raw view.
  3. Timing section: start_at/end_at become "Visible from / until (s)", bounded by the containing scene's duration (scenes and composition pointers), placeholders "scene start"/"end of scene", help line "Visibility window — the element keeps its layout slot outside it". Clearing restores the default window.
  4. Multiline strings (code, content, message, or any value with newlines) render as monospace textareas.

v1 limits noted: no stop-position editing on gradients, no color-row reordering, no "unset" from the fill segmented — all editable via source. TDD honesty: tests written first as stubs but the red run wasn't executed for this batch (enum-variant compilation coupling); 9 new tests all green.

Note: examples/rustmotion-promo.json shows working-tree drift from the user's own studio test session — deliberately excluded from this PR.

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

…timing UX

User-feedback iteration on the schema-driven inspector:

- ColorList kind: color arrays render one picker+hex row per entry
  with add/remove (typed whole-array writes); Fill kind for
  string|gradient unions with a Single/Linear/Radial mode selector,
  per-stop pickers and angle; existing values detect their mode
- effective-view: displayed values come from a typed serde round-trip
  that fills every #[serde(default)]; absent-from-raw fields carry a
  dimmed DEFAULT marker; writes still target the raw document. Fixes
  the reported sync bug (gauge show_value now shows checked like the
  render) and gives font-weight/font-family their real defaults
- start_at/end_at leave the generic list for a dedicated Timing
  section: Visible from/until (s), bounded by the containing scene's
  duration (scenes and composition pointers), placeholders and a
  visibility-window help line; clearing restores the default window
- multiline strings (code/content/message or values with newlines)
  render as monospace textareas
@LeadcodeDev
LeadcodeDev merged commit 294c51d into main Jul 19, 2026
@LeadcodeDev
LeadcodeDev deleted the feat/studio-inspector-feedback branch July 19, 2026 11:01
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): inspector feedback round 1 — color editors, effective defaults, timing UX, textareas

1 participant