From baf6c2b0dfda506fb64611a9cfd98d7aafeeeb47 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 10:52:57 +0000 Subject: [PATCH 1/4] docs(spec): navigation.size says what 'auto' really does Claude-Session: https://claude.ai/code/session_011y7As8yeqbR9TKANdPKRxt Co-authored-by: Claude --- .../36468-navigation-size-auto-describe.md | 12 ++++++++++ packages/spec/src/ui/view.form.ts | 2 +- packages/spec/src/ui/view.zod.ts | 23 ++++++++++++++----- 3 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 .changeset/36468-navigation-size-auto-describe.md diff --git a/.changeset/36468-navigation-size-auto-describe.md b/.changeset/36468-navigation-size-auto-describe.md new file mode 100644 index 00000000000..6686c99ac82 --- /dev/null +++ b/.changeset/36468-navigation-size-auto-describe.md @@ -0,0 +1,12 @@ +--- +'@objectstack/spec': patch +--- + +docs(spec): `navigation.size` says what `'auto'` really does + +Clause-②: no +Metadata-protocol: none + +The TSDoc and `.describe()` text of a view's `navigation.size` said that the default `'auto'` makes the renderer derive the drawer size from the object's field count and the viewport, so an author writes nothing. No renderer does that. `'auto'` is the host's fixed default width, the same for every object: the console's record side panel opens at `min(92vw, 460px)`, and a page block's drawer at that block's own default. The text now says so, gives the pixel cap of each explicit bucket (sm 480, md 720, lg 960, xl 1200, full 1600, always clamped to the viewport), says that a width the reader drags wins, and says where the key has no effect (a record that opens as a page, a phone-width screen). It no longer calls the buckets aligned with `FormView.modalSize`, whose buckets have other names and other widths. + +Prose only: the key, its values and its default are unchanged. The view form's help text for the key and the generated reference pages carry the same text. diff --git a/packages/spec/src/ui/view.form.ts b/packages/spec/src/ui/view.form.ts index d0ed2c30438..0b64cd49fa8 100644 --- a/packages/spec/src/ui/view.form.ts +++ b/packages/spec/src/ui/view.form.ts @@ -303,7 +303,7 @@ export const viewForm = defineForm({ }, { field: 'preventNavigation', helpText: 'Disable standard navigation entirely' }, { field: 'openNewTab', helpText: 'Open the record\'s full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place' }, - { field: 'size', helpText: 'Overlay size bucket for the drawer detail: \'auto\' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it.' }, + { field: 'size', helpText: 'Width bucket for the record drawer: \'auto\' (default) keeps the host\'s fixed default width, the same for every object whatever its field count (the console\'s record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it.' }, { field: 'width', helpText: '[DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket.' }, ], }, diff --git a/packages/spec/src/ui/view.zod.ts b/packages/spec/src/ui/view.zod.ts index 50b9fa8d292..1944dba063f 100644 --- a/packages/spec/src/ui/view.zod.ts +++ b/packages/spec/src/ui/view.zod.ts @@ -3102,14 +3102,25 @@ export const NavigationConfigSchema = lazySchema(() => strictObject({ openNewTab: z.boolean().default(false).describe('Open the record\'s full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place'), /** - * [#2578] Overlay size for a drawer detail — coarse T-shirt buckets, - * aligned with `FormView.modalSize` (`page` mode ignores it). `'auto'` - * (default): the renderer derives the size from the object's field count and - * clamps it to the client viewport, so AI writes nothing — it cannot know the - * client width. Explicit buckets are a coarse, viewport-independent override. + * [#2578] Width of the record drawer, as a coarse T-shirt bucket. Each + * explicit bucket is a pixel cap the renderer clamps to the viewport + * (`min(92vw, CAP)`): sm 480, md 720, lg 960, xl 1200, full 1600. + * + * `'auto'` (default) is the host's fixed default width, the same for every + * object whatever its field count — nothing is derived from the object's + * fields. The console's record side panel (opened from an object's list, and + * the drawer level over a record page) opens at `min(92vw, 460px)`; a page + * block's drawer opens at that block's own default (`min(960px, 60vw)` for + * the grid, kanban, calendar, gantt and tree; 42rem for the list, gallery, + * map and timeline). A width the reader drags is remembered and wins over + * both `'auto'` and a bucket. + * + * The key has no effect where the record opens as a page rather than a + * drawer (in the console every record opens as a page on a phone), nor on a + * phone-width screen, where a block's drawer fills the screen. */ size: z.enum(['auto', 'sm', 'md', 'lg', 'xl', 'full']).default('auto') - .describe("Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it."), + .describe("Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it."), /** * @deprecated [#2578 → `size`] A pixel/percent width cannot be authored blind: From 90f133f24b0f79abd930947d9936f6840476c8e9 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 11:13:35 +0000 Subject: [PATCH 2/4] docs(spec): regenerate the references for navigation.size Claude-Session: https://claude.ai/code/session_011y7As8yeqbR9TKANdPKRxt Co-authored-by: Claude --- content/docs/references/ui/component.mdx | 14 +++++++------- content/docs/references/ui/view.mdx | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/content/docs/references/ui/component.mdx b/content/docs/references/ui/component.mdx index d6877e98c24..90c188e2468 100644 --- a/content/docs/references/ui/component.mdx +++ b/content/docs/references/ui/component.mdx @@ -541,7 +541,7 @@ Sort field and direction pair | **view** | `never` | optional | [REMOVED] `view.list.navigation.view` was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — it named the form view to open for a record detail, and no layer resolved a view by that name: the value was passed straight into the navigation-MODE argument of the console's `onNavigate`, where anything other than `edit` or `view` matched no branch, so the key selected nothing and could silently deaden the row click. Delete the key; to choose what opens for a record, assign a `record` page to the object and let `isDefault` pick the one that opens — page assignment is the machinery that resolves a detail layout, and a list view's navigation block only decides HOW the detail is surfaced (its `size`, and on a page block its `mode`). | | **preventNavigation** | `boolean` | optional (default: `false`) | Disable standard navigation entirely | | **openNewTab** | `boolean` | optional (default: `false`) | Open the record's full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place | -| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it. | +| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it. | | **width** | `string \| number` | optional | [DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket. | @@ -798,7 +798,7 @@ Sort field and direction pair | **view** | `never` | optional | [REMOVED] `view.list.navigation.view` was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — it named the form view to open for a record detail, and no layer resolved a view by that name: the value was passed straight into the navigation-MODE argument of the console's `onNavigate`, where anything other than `edit` or `view` matched no branch, so the key selected nothing and could silently deaden the row click. Delete the key; to choose what opens for a record, assign a `record` page to the object and let `isDefault` pick the one that opens — page assignment is the machinery that resolves a detail layout, and a list view's navigation block only decides HOW the detail is surfaced (its `size`, and on a page block its `mode`). | | **preventNavigation** | `boolean` | optional (default: `false`) | Disable standard navigation entirely | | **openNewTab** | `boolean` | optional (default: `false`) | Open the record's full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place | -| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it. | +| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it. | | **width** | `string \| number` | optional | [DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket. | ### Nested Shape: `ObjectGanttProps.markers[number]` @@ -974,7 +974,7 @@ Sort field and direction pair | **view** | `never` | optional | [REMOVED] `view.list.navigation.view` was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — it named the form view to open for a record detail, and no layer resolved a view by that name: the value was passed straight into the navigation-MODE argument of the console's `onNavigate`, where anything other than `edit` or `view` matched no branch, so the key selected nothing and could silently deaden the row click. Delete the key; to choose what opens for a record, assign a `record` page to the object and let `isDefault` pick the one that opens — page assignment is the machinery that resolves a detail layout, and a list view's navigation block only decides HOW the detail is surfaced (its `size`, and on a page block its `mode`). | | **preventNavigation** | `boolean` | optional (default: `false`) | Disable standard navigation entirely | | **openNewTab** | `boolean` | optional (default: `false`) | Open the record's full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place | -| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it. | +| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it. | | **width** | `string \| number` | optional | [DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket. | ### Nested Shape: `ObjectGridProps.exportOptions` @@ -1093,7 +1093,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **view** | `never` | optional | [REMOVED] `view.list.navigation.view` was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — it named the form view to open for a record detail, and no layer resolved a view by that name: the value was passed straight into the navigation-MODE argument of the console's `onNavigate`, where anything other than `edit` or `view` matched no branch, so the key selected nothing and could silently deaden the row click. Delete the key; to choose what opens for a record, assign a `record` page to the object and let `isDefault` pick the one that opens — page assignment is the machinery that resolves a detail layout, and a list view's navigation block only decides HOW the detail is surfaced (its `size`, and on a page block its `mode`). | | **preventNavigation** | `boolean` | optional (default: `false`) | Disable standard navigation entirely | | **openNewTab** | `boolean` | optional (default: `false`) | Open the record's full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place | -| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it. | +| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it. | | **width** | `string \| number` | optional | [DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket. | @@ -1185,7 +1185,7 @@ Sort field and direction pair | **view** | `never` | optional | [REMOVED] `view.list.navigation.view` was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — it named the form view to open for a record detail, and no layer resolved a view by that name: the value was passed straight into the navigation-MODE argument of the console's `onNavigate`, where anything other than `edit` or `view` matched no branch, so the key selected nothing and could silently deaden the row click. Delete the key; to choose what opens for a record, assign a `record` page to the object and let `isDefault` pick the one that opens — page assignment is the machinery that resolves a detail layout, and a list view's navigation block only decides HOW the detail is surfaced (its `size`, and on a page block its `mode`). | | **preventNavigation** | `boolean` | optional (default: `false`) | Disable standard navigation entirely | | **openNewTab** | `boolean` | optional (default: `false`) | Open the record's full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place | -| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it. | +| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it. | | **width** | `string \| number` | optional | [DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket. | @@ -1418,7 +1418,7 @@ Sort field and direction pair | **view** | `never` | optional | [REMOVED] `view.list.navigation.view` was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — it named the form view to open for a record detail, and no layer resolved a view by that name: the value was passed straight into the navigation-MODE argument of the console's `onNavigate`, where anything other than `edit` or `view` matched no branch, so the key selected nothing and could silently deaden the row click. Delete the key; to choose what opens for a record, assign a `record` page to the object and let `isDefault` pick the one that opens — page assignment is the machinery that resolves a detail layout, and a list view's navigation block only decides HOW the detail is surfaced (its `size`, and on a page block its `mode`). | | **preventNavigation** | `boolean` | optional (default: `false`) | Disable standard navigation entirely | | **openNewTab** | `boolean` | optional (default: `false`) | Open the record's full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place | -| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it. | +| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it. | | **width** | `string \| number` | optional | [DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket. | @@ -1494,7 +1494,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **view** | `never` | optional | [REMOVED] `view.list.navigation.view` was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — it named the form view to open for a record detail, and no layer resolved a view by that name: the value was passed straight into the navigation-MODE argument of the console's `onNavigate`, where anything other than `edit` or `view` matched no branch, so the key selected nothing and could silently deaden the row click. Delete the key; to choose what opens for a record, assign a `record` page to the object and let `isDefault` pick the one that opens — page assignment is the machinery that resolves a detail layout, and a list view's navigation block only decides HOW the detail is surfaced (its `size`, and on a page block its `mode`). | | **preventNavigation** | `boolean` | optional (default: `false`) | Disable standard navigation entirely | | **openNewTab** | `boolean` | optional (default: `false`) | Open the record's full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place | -| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it. | +| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it. | | **width** | `string \| number` | optional | [DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket. | diff --git a/content/docs/references/ui/view.mdx b/content/docs/references/ui/view.mdx index 0330a617a04..79057ea8406 100644 --- a/content/docs/references/ui/view.mdx +++ b/content/docs/references/ui/view.mdx @@ -966,7 +966,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **view** | `never` | optional | [REMOVED] `view.list.navigation.view` was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — it named the form view to open for a record detail, and no layer resolved a view by that name: the value was passed straight into the navigation-MODE argument of the console's `onNavigate`, where anything other than `edit` or `view` matched no branch, so the key selected nothing and could silently deaden the row click. Delete the key; to choose what opens for a record, assign a `record` page to the object and let `isDefault` pick the one that opens — page assignment is the machinery that resolves a detail layout, and a list view's navigation block only decides HOW the detail is surfaced (its `size`, and on a page block its `mode`). | | **preventNavigation** | `boolean` | optional (default: `false`) | Disable standard navigation entirely | | **openNewTab** | `boolean` | optional (default: `false`) | Open the record's full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place | -| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it. | +| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it. | | **width** | `string \| number` | optional | [DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket. | ### Nested Shape: `ListView.pagination` @@ -1212,7 +1212,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **view** | `never` | optional | [REMOVED] `view.list.navigation.view` was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — it named the form view to open for a record detail, and no layer resolved a view by that name: the value was passed straight into the navigation-MODE argument of the console's `onNavigate`, where anything other than `edit` or `view` matched no branch, so the key selected nothing and could silently deaden the row click. Delete the key; to choose what opens for a record, assign a `record` page to the object and let `isDefault` pick the one that opens — page assignment is the machinery that resolves a detail layout, and a list view's navigation block only decides HOW the detail is surfaced (its `size`, and on a page block its `mode`). | | **preventNavigation** | `boolean` | optional (default: `false`) | Disable standard navigation entirely | | **openNewTab** | `boolean` | optional (default: `false`) | Open the record's full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place | -| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it. | +| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it. | | **width** | `string \| number` | optional | [DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket. | @@ -1357,7 +1357,7 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma | **view** | `never` | optional | [REMOVED] `view.list.navigation.view` was removed in @objectstack/spec 17.5.0 (ADR-0049 enforce-or-remove) — it named the form view to open for a record detail, and no layer resolved a view by that name: the value was passed straight into the navigation-MODE argument of the console's `onNavigate`, where anything other than `edit` or `view` matched no branch, so the key selected nothing and could silently deaden the row click. Delete the key; to choose what opens for a record, assign a `record` page to the object and let `isDefault` pick the one that opens — page assignment is the machinery that resolves a detail layout, and a list view's navigation block only decides HOW the detail is surfaced (its `size`, and on a page block its `mode`). | | **preventNavigation** | `boolean` | optional (default: `false`) | Disable standard navigation entirely | | **openNewTab** | `boolean` | optional (default: `false`) | Open the record's full page in a new browser tab when it is clicked; rows that open nothing stay that way, and a phone opens the page in place | -| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it. | +| **size** | `Enum<'auto' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| 'full'>` | optional (default: `"auto"`) | Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it. | | **width** | `string \| number` | optional | [DEPRECATED → size] Pixel/percent width of the drawer (e.g. "600px"). A pixel width cannot be chosen at authoring time without knowing the client viewport — use the `size` bucket. | ### Nested Shape: `ObjectListView.pagination` From 7a0c1ee4be4ad2d8b5fe7ceb19357eeee1fcc468 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 11:16:51 +0000 Subject: [PATCH 3/4] docs(platform-objects): regenerate the English metadata-form bundle for navigation.size Claude-Session: https://claude.ai/code/session_011y7As8yeqbR9TKANdPKRxt Co-authored-by: Claude --- .changeset/36468-navigation-size-auto-describe.md | 3 ++- .../src/apps/translations/en.metadata-forms.generated.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.changeset/36468-navigation-size-auto-describe.md b/.changeset/36468-navigation-size-auto-describe.md index 6686c99ac82..a82ad82a3fc 100644 --- a/.changeset/36468-navigation-size-auto-describe.md +++ b/.changeset/36468-navigation-size-auto-describe.md @@ -1,5 +1,6 @@ --- '@objectstack/spec': patch +'@objectstack/platform-objects': patch --- docs(spec): `navigation.size` says what `'auto'` really does @@ -9,4 +10,4 @@ Metadata-protocol: none The TSDoc and `.describe()` text of a view's `navigation.size` said that the default `'auto'` makes the renderer derive the drawer size from the object's field count and the viewport, so an author writes nothing. No renderer does that. `'auto'` is the host's fixed default width, the same for every object: the console's record side panel opens at `min(92vw, 460px)`, and a page block's drawer at that block's own default. The text now says so, gives the pixel cap of each explicit bucket (sm 480, md 720, lg 960, xl 1200, full 1600, always clamped to the viewport), says that a width the reader drags wins, and says where the key has no effect (a record that opens as a page, a phone-width screen). It no longer calls the buckets aligned with `FormView.modalSize`, whose buckets have other names and other widths. -Prose only: the key, its values and its default are unchanged. The view form's help text for the key and the generated reference pages carry the same text. +Prose only: the key, its values and its default are unchanged. The view form's help text for the key, the English metadata-form bundle `@objectstack/platform-objects` serves it from, and the generated reference pages carry the same text. diff --git a/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts index bbe344b61b6..6ab7b580977 100644 --- a/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/en.metadata-forms.generated.ts @@ -1387,7 +1387,7 @@ export const enMetadataForms: NonNullable = { }, "navigation.size": { label: "Size", - helpText: "Overlay size bucket for the drawer detail: 'auto' (default — renderer derives from field count + viewport; AI writes nothing) or a coarse override sm/md/lg/xl/full. Prefer this over the pixel `width`; page mode ignores it." + helpText: "Width bucket for the record drawer: 'auto' (default) keeps the host's fixed default width, the same for every object whatever its field count (the console's record side panel opens at 460px), or a coarse override sm/md/lg/xl/full (a 480/720/960/1200/1600px cap, always clamped to the viewport). A width the reader drags wins over either. Prefer this over the pixel `width`; it has no effect where the record opens as a page (in the console, every record on a phone), nor on a phone-width screen, where the drawer fills it." }, "navigation.width": { label: "Width", From 2148b95b0772cffc9778b98ca0023f697fd443f8 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Nov 2026 11:29:32 +0000 Subject: [PATCH 4/4] docs(i18n): the zh-CN navigation.size help text says what 'auto' really does Claude-Session: https://claude.ai/code/session_011y7As8yeqbR9TKANdPKRxt Co-authored-by: Claude --- .../src/apps/translations/zh-CN.metadata-forms.generated.ts | 2 +- .../app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts b/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts index ab3fb4c2f22..4e8e00e739e 100644 --- a/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts +++ b/packages/platform-objects/src/apps/translations/zh-CN.metadata-forms.generated.ts @@ -1387,7 +1387,7 @@ export const zhCNMetadataForms: NonNullable = }, "navigation.size": { label: "尺寸", - helpText: "抽屉详情的浮层尺寸档位:'auto'(默认——渲染器按字段数与视口推导,AI 无需填写),或粗粒度覆盖 sm/md/lg/xl/full。优先使用它而非像素 `width`;page 模式会忽略它。" + helpText: "记录抽屉的宽度档位:'auto'(默认)沿用宿主固定的默认宽度,每个对象都一样,与字段数无关(控制台的记录侧边面板以 460px 打开);或粗粒度覆盖 sm/md/lg/xl/full(上限分别为 480/720/960/1200/1600px,始终受视口限制)。读者拖动出的宽度优先于两者。优先使用它而非像素 `width`;记录以整页打开时它不起作用(控制台在手机上一律以整页打开记录),在手机宽度的屏幕上也不起作用,那里抽屉占满屏幕。" }, "navigation.width": { label: "宽度", diff --git a/ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts b/ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts index 6a54461b561..143ef283030 100644 --- a/ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts +++ b/ui/packages/app-shell/src/views/metadata-admin/metadata-form-zh-cn.ts @@ -474,7 +474,7 @@ export const ZH_CN_SPEC_FORMS: NonNullable = { 'navigation.mode': { label: '模式', helpText: '[已弃用] 在对象列表(列表视图、对象的 `listViews`)上不再决定记录如何打开:在控制台中,对所有用户而言,点记录名称进入整页,点名称旁的悬停图标从侧边面板打开。这里 `drawer`、`page`、`new_window` 仍可解析,但不再起作用,请省略此键;`none` 仍表示列表行不打开任何内容——建议改用 `preventNavigation: true`。带 `navigation` 的页面区块(列表区块、时间线、嵌入视图)仍按所有取值生效。' }, 'navigation.preventNavigation': { label: '禁止导航', helpText: '完全禁用标准导航' }, 'navigation.openNewTab': { label: '在新标签页打开', helpText: '点击记录时在新的浏览器标签页中打开其整页;设为不打开的行保持不打开,手机上仍在当前页打开' }, - 'navigation.size': { label: '尺寸', helpText: '抽屉详情的浮层尺寸档位:\'auto\'(默认——渲染器按字段数与视口推导,AI 无需填写),或粗粒度覆盖 sm/md/lg/xl/full。优先使用它而非像素 `width`;page 模式会忽略它。' }, + 'navigation.size': { label: '尺寸', helpText: '记录抽屉的宽度档位:\'auto\'(默认)沿用宿主固定的默认宽度,每个对象都一样,与字段数无关(控制台的记录侧边面板以 460px 打开);或粗粒度覆盖 sm/md/lg/xl/full(上限分别为 480/720/960/1200/1600px,始终受视口限制)。读者拖动出的宽度优先于两者。优先使用它而非像素 `width`;记录以整页打开时它不起作用(控制台在手机上一律以整页打开记录),在手机宽度的屏幕上也不起作用,那里抽屉占满屏幕。' }, 'navigation.width': { label: '宽度', helpText: '[已弃用 → size] 抽屉的像素 / 百分比宽度(如 "600px")。编写时无法预知客户端视口,因此选不出合适的像素宽度——请使用 `size` 档位。' }, sharing: { label: '共享', helpText: '视图共享配置:谁锁定了视图配置' }, 'sharing.lockedBy': { label: '锁定者', helpText: '锁定该视图配置的用户' },