fix(studio): color picker expands inline — floating positioning removed#80
Merged
Conversation
Third real-world failure of computed floating placement (right-edge clip, top-edge clip, then detached at app center — webview coordinate spaces vs Retina logical/physical proved structurally fragile). The architecture changes instead of the math: the open picker renders display:contents with a flex-basis:100% editor that wraps below its own row in the panel flow — full control-column width, pushes content down, scrolls with the panel. Clipping and detachment are impossible by construction. Exclusivity via a panel-context signal (one picker open; re-click closes, another swatch switches), Escape handled locally inside the editor subtree; the round-4 live-drag HSV mirror is untouched. All floating code deleted: popover_position AND its 4 geometry tests (dead tested code is still dead code), trigger/popover primitives, measurement plumbing, popover CSS. Host rows gain flex-wrap only.
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.
Third real-world failure of the floating picker (right-edge clip #77, top-edge clip, then fully detached at app center — screenshot-diagnosed) triggered the three-strikes architecture rule: stop fixing the math, remove the need for it.
display:contentswith aflex-basis:100%editor that wraps below its own row in the panel flow — full control-column width, pushes content down, scrolls with the panel. Clipping/detachment impossible by construction; zero fixed/absolute/measure/clamp remains.toggle_pickertested); Escape handled locally in the editor subtree; the round-4 live-drag HSV mirror is untouched; no API change at call sites (host rows gainflex-wraponly).popover_positionand its 4 geometry tests (dead tested code is still dead code), trigger/popover primitives and context, measurement plumbing, popover CSS and keyframes.Tests: 403 passed (406 − 4 deleted + 1 new exclusivity test).
Verify:
cargo check -p rustmotion-studio✓ ·cargo test --workspace→ 403 passed ✓ ·cargo fmt --check✓ · clippy gated ≤1 ✓