Skip to content

fix(studio): color picker popover overlays the renderer#82

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

fix(studio): color picker popover overlays the renderer#82
LeadcodeDev merged 1 commit into
mainfrom
fix/studio-picker-overlay

Conversation

@LeadcodeDev

Copy link
Copy Markdown
Owner

User feedback on #81 (screenshot): the popover was clipped at the inspector panel's left edge — the upstream position:absolute keeps it inside the panel's scroll container, so it couldn't overlay the canvas.

Measurement-free escape (one themed CSS block + one handler; upstream primitive untouched):

  • position: fixed; top: auto — the box keeps its static position (level with its trigger row, spec behavior, the classic escape-the-scroll-container dropdown pattern) while escaping every overflow ancestor
  • right: 308px — panel width constant (300, view.rs) + gap, commented for future changes: the popover always lands just left of the panel, over the renderer; z-index: 1000 tops the canvas and hit-map overlay (ancestor chain verified free of transform/filter containing blocks)
  • Panel scroll closes the picker (a fixed popover doesn't follow scroll; standard dropdown behavior, one line via the existing exclusivity signal)

Documented residual: a row very near the window bottom can still push the 340px popover below the viewport — that's upstream collision handling's job (verified absent at HEAD in #81); escalate/contribute if hit in practice.

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

The upstream popover's position:absolute kept it clipped inside the
inspector's scroll container at the panel's left edge. Escape without
measuring anything: position:fixed with top:auto keeps the box at its
static position (level with its trigger row, CSS 2.1 §10.6.4) while
escaping every overflow ancestor; right: 308px (panel width constant
+ gap, commented) lands it just left of the panel, over the renderer;
z-index 1000 tops the canvas and hit-map overlay. Ancestor chain
verified free of transform/filter containing blocks. Panel scroll
closes the picker (a fixed popover would detach from its row).
Documented residual: a row very near the window bottom can still
overflow below the viewport — upstream collision handling remains the
real fix.
@LeadcodeDev
LeadcodeDev merged commit 8ea195c into main Jul 19, 2026
@LeadcodeDev
LeadcodeDev deleted the fix/studio-picker-overlay branch July 19, 2026 13:25
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