From 8bb7fab26e593d3fdb69226f667221e666c4d006 Mon Sep 17 00:00:00 2001 From: usrnk1 <7547651+usrnk1@users.noreply.github.com> Date: Mon, 16 Nov 2026 12:20:44 +0100 Subject: [PATCH] fix(ui): cap large dialogs at 720px and extra-large dialogs at 880px (#64206) --- packages/app/e2e/regression/new-session.spec.ts | 2 +- packages/ui/src/overlays/dialog/dialog.css | 4 ++-- packages/ui/src/overlays/dialog/dialog.stories.tsx | 4 ++-- packages/ui/src/overlays/dialog/dialog.tsx | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/app/e2e/regression/new-session.spec.ts b/packages/app/e2e/regression/new-session.spec.ts index fb9c48b71fc..648c561d5e6 100644 --- a/packages/app/e2e/regression/new-session.spec.ts +++ b/packages/app/e2e/regression/new-session.spec.ts @@ -1154,7 +1154,7 @@ test("the location dialog separates added projects from server projects and tags await expect(options.nth(0)).toHaveCSS("height", "28px") await expect(dialog.locator(".palette-menu-search [data-component='text-input-v2']")).toHaveCSS("height", "28px") await expect(dialog.locator(".new-session-location-hints")).toHaveCount(0) - await expect(dialog.locator("..")).toHaveCSS("width", "880px") + await expect(dialog.locator("..")).toHaveCSS("width", "720px") await expect(options.nth(0)).toHaveCSS("display", "flex") await expect(names.nth(0).locator(".command-palette-title")).toHaveCSS("font-size", "13px") await expect(names.nth(0).locator(".command-palette-title")).toHaveCSS("white-space", "nowrap") diff --git a/packages/ui/src/overlays/dialog/dialog.css b/packages/ui/src/overlays/dialog/dialog.css index 09bfb94b1f4..36624f2ba1f 100644 --- a/packages/ui/src/overlays/dialog/dialog.css +++ b/packages/ui/src/overlays/dialog/dialog.css @@ -171,14 +171,14 @@ &:is([data-size="large"], [data-size="x-large"]) [data-slot="dialog-container"] { --dialog-height: min(calc(100vh - 96px), 600px); - width: min(calc(100vw - 32px), 880px); + width: min(calc(100vw - 32px), 720px); background: var(--v2-background-bg-base); border-radius: 12px; } &[data-size="x-large"] [data-slot="dialog-container"] { --dialog-height: min(calc(100vh - 96px), 680px); - width: min(calc(100vw - 32px), 1040px); + width: min(calc(100vw - 32px), 880px); } &[data-fit] [data-slot="dialog-container"] { diff --git a/packages/ui/src/overlays/dialog/dialog.stories.tsx b/packages/ui/src/overlays/dialog/dialog.stories.tsx index ff56506e806..b3c5dc53d4a 100644 --- a/packages/ui/src/overlays/dialog/dialog.stories.tsx +++ b/packages/ui/src/overlays/dialog/dialog.stories.tsx @@ -16,8 +16,8 @@ Compose with \`DialogHeader\`, \`DialogTitle\`, \`DialogTitleGroup\`, \`DialogBo ### API - \`Dialog\`: \`size\`, \`variant\`, \`fit\`. - \`normal\`: 480px wide, for confirmations, sign-ins and small forms. - - \`large\`: 880×600, for palettes, pickers and lists. - - \`x-large\`: 1040×680, for long documents and settings-like panels. + - \`large\`: 720×600, for palettes, pickers and lists. + - \`x-large\`: 880×680, for long documents and settings-like panels. - Sizes clamp to the window. \`fit\` makes the height follow the content up to the size's height; large sizes keep their top edge, so only the bottom edge moves. - Dialogs don't set their own container width or height: pick the size that fits. - \`DialogHeader\`: row container with optional \`closeLabel\` and \`hideClose\`. diff --git a/packages/ui/src/overlays/dialog/dialog.tsx b/packages/ui/src/overlays/dialog/dialog.tsx index 498be393f0b..8b6df193286 100644 --- a/packages/ui/src/overlays/dialog/dialog.tsx +++ b/packages/ui/src/overlays/dialog/dialog.tsx @@ -21,8 +21,8 @@ const TEXT_FIELD = [ export interface DialogProps extends ParentProps { /** - * normal: 480px wide, for confirmations and small forms. large: 880×600, for palettes, pickers and lists. - * x-large: 1040×680, for long documents and settings-like panels. Each clamps to the window. + * normal: 480px wide, for confirmations and small forms. large: 720×600, for palettes, pickers and lists. + * x-large: 880×680, for long documents and settings-like panels. Each clamps to the window. */ size?: "normal" | "large" | "x-large" /** Height follows the content, up to the size's height. Large sizes grow down from a fixed top edge. */