Skip to content

fix(ui): keep dialogs inside the window and scroll what doesn't fit - #2984

Open
camielvs wants to merge 1 commit into
masterfrom
cvs/dialog-max-height
Open

camielvs wants to merge 1 commit into
masterfrom
cvs/dialog-max-height

Conversation

@camielvs

@camielvs camielvs commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Intent

Make every dialog fit inside the browser window, so its title and buttons can always be reached, however long the content or short the window.

Current behavior

Dialogs sit in the middle of the window and grow with their content, with no height limit. When the content is taller than the window, the dialog runs off the top and bottom edges. Its title and its buttons (such as Cancel and Add) end up out of view, and nothing can be scrolled to bring them back. A long document, or a short window, is enough: a laptop at 125–150% browser zoom, or with developer tools docked at the bottom. A few dialogs avoid this by setting their own height, one at a time.

What changes

Dialogs and confirmation dialogs now stop at 90% of the window's height. When the content is taller, the dialog scrolls inside, so the title and buttons stay reachable. Dialogs that fit look the same as before.

Dialogs that already set their own height or scrolling keep it, because their own settings take priority over the new default. Menus, dropdowns and tooltips opened from a dialog are drawn outside it, so the dialog's scrolling doesn't cut them off.

How to test

  1. On a project page, click Add, then Document.
  2. Paste about 100 lines of text into Content. The dialog stays inside the window and gets a scrollbar. Scroll down to reach Cancel and Add. Without this change, the dialog grows past the top and bottom of the window and the buttons can't be reached.
  3. Close the dialog, open it again, and type a single line into Content. The dialog looks as it did before, with no scrollbar.
  4. In the pipeline editor's component library, click the info button (ⓘ) next to any component. The details dialog looks as before, and its code view still scrolls inside its own box.

The full unit test suite passes. I also checked how the new default combines with the dialogs that set their own height or scrolling: the run pickers, the tour's secrets dialog and the component details dialog each keep their own setting. This hasn't been checked in a browser yet, and the end-to-end tests weren't run.

Related Issue and Pull requests

Follows up a review comment on #2978: that PR's document editor makes the Add Document dialog tall enough to overflow a window under about 600px high.

Type of Change

  • Bug fix

Line Breakdown

Category Added Removed
Production code 2 2
Total 2 2

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Additional Comments

The limit is a plain 90% of the window height, in line with the 80–90% that individual dialogs already use.

🤖 Generated with Claude Code

@camielvs
camielvs requested a review from a team as a code owner November 3, 2026 18:14
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: cvs/dialog-max-height/9783858

Dialogs sat in the middle of the window with no height limit. Content
taller than the window ran off both edges, taking the title and the
footer's buttons with it, with no way to scroll to them. A laptop at
125-150% browser zoom, or with devtools docked at the bottom, is enough.

Dialog and alert dialog content now stop at 90% of the window's height
and scroll. Dialogs that already set their own height or overflow keep
it, because their classes override the defaults.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@camielvs
camielvs force-pushed the cvs/dialog-max-height branch from 701a16f to 9783858 Compare November 3, 2026 23:45

This branch has not been deployed

No deployments
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