ControlSurface: position dropdown popover from the measured trigger - #80
Open
ptn wants to merge 1 commit into
Open
ControlSurface: position dropdown popover from the measured trigger#80ptn wants to merge 1 commit into
ptn wants to merge 1 commit into
Conversation
The select-field popover was positioned using grid-cell math ((w.y + w.h) * step), but .card centers its content and a select field is shorter than the knob-sized cell it lives in — so the menu opened well below the visible trigger instead of right under it. Measure the trigger's own getBoundingClientRect() on open instead. Adds a Playwright regression test asserting the menu sits within 10px of the trigger's actual bottom edge. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0174T2D9oi9m9ww761Nn4wss
Author
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.


Summary
(w.y + w.h) * step), assuming the trigger sits flush against its grid cell's bottom edge..cardcenters its content and a select field is shorter than the knob-sized cell it lives in, so the menu opened well below the visible trigger instead of right under it.getBoundingClientRect()on open instead of deriving position from grid math.Test plan
e2e/17-device-layout.spec.ts) asserting the popover sits within 10px of the trigger's actual bottom edge and aligns horizontally — verified it fails (~50px gap) against the old code and passes against the fixnpm run test(vitest, 1111 tests) passes🤖 Generated with Claude Code