GeezerVison is showing github.com — fix(ui): cap large dialogs at 720px and extra-large dialogs at 880px … · anomalyco/opencode@8bb7fab
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/app/e2e/regression/new-session.spec.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -1154,7 +1154,7 @@ test("the location dialog separates added projects from server projects and tags | 1154 | 1154 | await expect(options.nth(0)).toHaveCSS("height", "28px") | 1155 | 1155 | await expect(dialog.locator(".palette-menu-search [data-component='text-input-v2']")).toHaveCSS("height", "28px") | 1156 | 1156 | await expect(dialog.locator(".new-session-location-hints")).toHaveCount(0) | 1157 | | - await expect(dialog.locator("..")).toHaveCSS("width", "880px") | | 1157 | + await expect(dialog.locator("..")).toHaveCSS("width", "720px") | 1158 | 1158 | await expect(options.nth(0)).toHaveCSS("display", "flex") | 1159 | 1159 | await expect(names.nth(0).locator(".command-palette-title")).toHaveCSS("font-size", "13px") | 1160 | 1160 | await expect(names.nth(0).locator(".command-palette-title")).toHaveCSS("white-space", "nowrap") | |
Collapse file Copy file name to clipboardExpand all lines: packages/ui/src/overlays/dialog/dialog.css +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 171 | 171 |
| 172 | 172 | &:is([data-size="large"], [data-size="x-large"]) [data-slot="dialog-container"] { | 173 | 173 | --dialog-height: min(calc(100vh - 96px), 600px); | 174 | | - width: min(calc(100vw - 32px), 880px); | | 174 | + width: min(calc(100vw - 32px), 720px); | 175 | 175 | background: var(--v2-background-bg-base); | 176 | 176 | border-radius: 12px; | 177 | 177 | } | 178 | 178 |
| 179 | 179 | &[data-size="x-large"] [data-slot="dialog-container"] { | 180 | 180 | --dialog-height: min(calc(100vh - 96px), 680px); | 181 | | - width: min(calc(100vw - 32px), 1040px); | | 181 | + width: min(calc(100vw - 32px), 880px); | 182 | 182 | } | 183 | 183 |
| 184 | 184 | &[data-fit] [data-slot="dialog-container"] { | |
Collapse file Copy file name to clipboardExpand all lines: packages/ui/src/overlays/dialog/dialog.stories.tsx +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -16,8 +16,8 @@ Compose with \`DialogHeader\`, \`DialogTitle\`, \`DialogTitleGroup\`, \`DialogBo | 16 | 16 | ### API | 17 | 17 | - \`Dialog\`: \`size\`, \`variant\`, \`fit\`. | 18 | 18 | - \`normal\`: 480px wide, for confirmations, sign-ins and small forms. | 19 | | - - \`large\`: 880×600, for palettes, pickers and lists. | 20 | | - - \`x-large\`: 1040×680, for long documents and settings-like panels. | | 19 | + - \`large\`: 720×600, for palettes, pickers and lists. | | 20 | + - \`x-large\`: 880×680, for long documents and settings-like panels. | 21 | 21 | - 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. | 22 | 22 | - Dialogs don't set their own container width or height: pick the size that fits. | 23 | 23 | - \`DialogHeader\`: row container with optional \`closeLabel\` and \`hideClose\`. | |
Collapse file Copy file name to clipboardExpand all lines: packages/ui/src/overlays/dialog/dialog.tsx +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -21,8 +21,8 @@ const TEXT_FIELD = [ | 21 | 21 |
| 22 | 22 | export interface DialogProps extends ParentProps { | 23 | 23 | /** | 24 | | - * normal: 480px wide, for confirmations and small forms. large: 880×600, for palettes, pickers and lists. | 25 | | - * x-large: 1040×680, for long documents and settings-like panels. Each clamps to the window. | | 24 | + * normal: 480px wide, for confirmations and small forms. large: 720×600, for palettes, pickers and lists. | | 25 | + * x-large: 880×680, for long documents and settings-like panels. Each clamps to the window. | 26 | 26 | */ | 27 | 27 | size?: "normal" | "large" | "x-large" | 28 | 28 | /** Height follows the content, up to the size's height. Large sizes grow down from a fixed top edge. */ | |
|