fix(framework-editor): flip Linked Controls panel up when clipped (FRAME-8)#3126
Merged
Merged
Conversation
…bottom The Linked Controls panel always opened downward (absolute top-0), so on rows near the bottom of the framework it extended past the table's overflow-auto container and got clipped — you couldn't see the rest of the panel. Measure the space below the cell when the panel opens and anchor it to the bottom (grow upward) when there's less than ~340px of room, mirroring the existing ComboboxCell behavior. Closes FRAME-8 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
cubic analysis
No issues found across 2 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Linked issue analysis
Linked issue: FRAME-8: Frameworks Editor -> Editing controls list disappears at the bottom of a framework
| Status | Acceptance criteria | Notes |
|---|---|---|
| ✅ | Panel opens downward (top-0) when there is enough space below the cell | RelationalCell sets dropUp based on available space and uses top-0 when dropUp is false; a test asserts the panel class contains top-0 when there is room. |
| ✅ | Panel flips upward (bottom-0) when the cell is near the viewport bottom so the panel is not clipped | On open the code measures window.innerHeight - rect.bottom and sets dropUp when space is < ~340px, and the class toggles to bottom-0; a test mocks a low rect.bottom and asserts bottom-0 is applied. |
| ✅ | Does not add permanent whitespace or change layout structure (no workaround whitespace required) | Change is a behavioral toggle (dropUp) with no added layout elements or permanent padding; PR description and diffs show no whitespace insertion. |
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.
What
Stops the Linked Controls panel from being clipped at the bottom of a framework.
Why (FRAME-8)
The panel always opened downward (
absolute top-0). On rows near the bottom of the table it extended past theoverflow-autoscroll container and was cut off — "you cannot see any more."Joe suggested adding whitespace at the bottom. That's a workaround; the robust fix is to open the panel upward when there isn't room below — the same heuristic
ComboboxCellalready uses in this table.Changes
RelationalCell:window.innerHeight - rect.bottom).bottom-0(grows up) instead oftop-0(grows down).3-line behavioral change, no layout/structure churn, no permanent empty whitespace.
Testing
RelationalCell.test.tsx: added 2 tests — opens down with room below, flips up when the cell sits near the viewport bottom. 5 tests pass.npx turbo run typecheck --filter=@trycompai/framework-editor: clean.Frontend-only. Worth a quick visual check on the preview (open Linked Controls on the last row of a long framework).
🤖 Generated with Claude Code
Summary by cubic
Fixes the Linked Controls panel being cut off at the bottom of the Framework Editor by flipping it upward when there isn’t enough space below, matching
ComboboxCellbehavior. Addresses Linear FRAME-8 without adding whitespace to the table.RelationalCell, measure space below the trigger on open and anchor the panel tobottom-0when space is < ~340px; otherwise usetop-0.Written for commit 3d12388. Summary will update on new commits.