Skip to content

fix(studio): color picker expands inline — floating positioning removed#80

Merged
LeadcodeDev merged 1 commit into
mainfrom
fix/studio-picker-inline
Jul 19, 2026
Merged

fix(studio): color picker expands inline — floating positioning removed#80
LeadcodeDev merged 1 commit into
mainfrom
fix/studio-picker-inline

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

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.

  • The open picker now 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/detachment impossible by construction; zero fixed/absolute/measure/clamp remains.
  • One picker open at a time (panel-context signal; re-click closes, clicking another swatch switches — pure toggle_picker tested); Escape handled locally in the editor subtree; the round-4 live-drag HSV mirror is untouched; no API change at call sites (host rows gain flex-wrap only).
  • Deleted: popover_position and its 4 geometry tests (dead tested code is still dead code), trigger/popover primitives and context, measurement plumbing, popover CSS and keyframes.
  • Noted: "full width" = the ~200px control column (labels stay left); no outside-click dismiss anymore (came from the popover primitive) — close via re-click/Escape/other swatch per the frozen design.

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 ✓

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.
@LeadcodeDev
LeadcodeDev merged commit deea035 into main Jul 19, 2026
@LeadcodeDev
LeadcodeDev deleted the fix/studio-picker-inline branch July 19, 2026 12:40
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