feat(studio): structured object editors + robust popover viewport clamping#79
Merged
Conversation
- popover positioning becomes a pure tested function: prefer below the anchor opening leftward, flip above when clipping the bottom, then hard-clamp both axes to the viewport with the margin winning last — the top edge can no longer clip (the reported bug); applied as position:fixed from measured anchor/content/viewport so no panel scroll container can clip it, with a one-frame hidden state while measuring - Complex object fields with known schema properties unfold into indented structured sub-rows through the same control factory (GenericRow gains a custom_commit callback: typed values flow to the parent object instead of the write path) — stat.trend becomes value input + direction select + color picker; sub-key mutations are pure (null prunes, emptied object removes the field) and the whole typed object rides the optimistic+debounced pipeline; depth capped at 2, map-like objects stay JSON areas - number arrays (sparkline_data, dashed) become per-entry number rows with add/remove, writing the whole typed array; ColorRows/ NumberList factorization deliberately rejected (second occurrence, shells differ — documented)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #78 — user iteration round 5.
position:fixedfrom measured anchor + content + logical viewport, escaping every panel scroll container; a one-frame hidden state avoids mis-positioned flashes.GenericRowgains acustom_commitcallback so typed sub-values flow into the parent object) —stat.trend= value input + direction select (schema variants) + color picker. Pure sub-key mutation (null prunes; emptied object removes the field), whole-object typed writes riding the optimistic+debounce+undo pipeline, recursion capped at 2 (map-like objects keep the JSON fallback). Number arrays (sparkline_data,dashed) become per-entry number rows with add/remove.Deliberate calls documented: ColorRows/NumberList factorization rejected (second occurrence, different shells); object sub-rows skip the default marker in v1 (the effective object already carries serde defaults); popover repositions per-open, not on window resize while open.
Tests: 9 new (4 popover geometry, 5 red-first registry/mutation incl. typed round-trip of a mutated stat). 406 total, all green.
Verify:
cargo check -p rustmotion-studio✓ ·cargo test --workspace→ 406 passed ✓ ·cargo fmt --check✓ · clippy gated ≤1 ✓