Skip to content

fix(framework-editor): flip Linked Controls panel up when clipped (FRAME-8)#3126

Merged
tofikwest merged 2 commits into
mainfrom
tofik/frame-8-linked-controls-dropdown-clip
Jun 12, 2026
Merged

fix(framework-editor): flip Linked Controls panel up when clipped (FRAME-8)#3126
tofikwest merged 2 commits into
mainfrom
tofik/frame-8-linked-controls-dropdown-clip

Conversation

@tofikwest

@tofikwest tofikwest commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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 the overflow-auto scroll 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 ComboboxCell already uses in this table.

Changes

RelationalCell:

  • On open, measure space below the cell (window.innerHeight - rect.bottom).
  • If under ~340px (the panel's max height), anchor the panel to bottom-0 (grows up) instead of top-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 ComboboxCell behavior. Addresses Linear FRAME-8 without adding whitespace to the table.

  • Bug Fixes
    • In RelationalCell, measure space below the trigger on open and anchor the panel to bottom-0 when space is < ~340px; otherwise use top-0.
    • Adds tests to verify opening downward with room and flipping upward near the viewport bottom.

Written for commit 3d12388. Summary will update on new commits.

Review in cubic

…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>
@linear

linear Bot commented Jun 12, 2026

Copy link
Copy Markdown

FRAME-8

@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment Jun 12, 2026 6:43pm
comp-framework-editor Ready Ready Preview, Comment Jun 12, 2026 6:43pm
portal Ready Ready Preview, Comment Jun 12, 2026 6:43pm

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Re-trigger cubic

@tofikwest tofikwest merged commit d242db2 into main Jun 12, 2026
10 checks passed
@tofikwest tofikwest deleted the tofik/frame-8-linked-controls-dropdown-clip branch June 12, 2026 18:43
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