diff --git a/.changeset/35840-mobile-max-visible-default-copy.md b/.changeset/35840-mobile-max-visible-default-copy.md new file mode 100644 index 00000000000..b4eec031f00 --- /dev/null +++ b/.changeset/35840-mobile-max-visible-default-copy.md @@ -0,0 +1,10 @@ +--- +'@object-ui/components': patch +--- + +fix(ui): the designer and docs text for `page:header` `mobileMaxVisible` states the real default + +Clause-②: no +Metadata-protocol: none + +The Max Inline Actions (mobile) input description, and the `page.mdx` reference generated from it, said the budget defaults to 1. Unset, it is 2 in a record page's bottom action bar on a phone (the host's Edit counts) and 1 on any other header. The description now says so, matching the spec text from #35660, and the stale 3 / 1 comments on the header actions row are corrected. Text only: no value, fallback or rendering changes. diff --git a/content/docs/ui/components/page.mdx b/content/docs/ui/components/page.mdx index 09bd86351fa..c08eeb8c346 100644 --- a/content/docs/ui/components/page.mdx +++ b/content/docs/ui/components/page.mdx @@ -56,7 +56,7 @@ Namespace `page`. | `recordChrome` | `boolean` | | Set false for the bare h1 header on non-record pages | | `showCopyId` | `boolean` | | — | | `maxVisible` | `number` | | How many header actions render as inline buttons on desktop before the rest fold into the overflow menu. A positive integer — the contract rejects 0 and fractional values. Two kinds of action are routed to the overflow menu regardless of this budget and never occupy an inline slot: an action whose locations declare record_more without record_header, and any action with component action:menu. The host's own buttons (the record page's Edit) take no slot and never fold. The first inline action, or the one declaring variant primary, is the one filled primary button; the others are outline buttons. An action declaring variant danger is never the primary: inline it is a destructive button, and in the overflow menu it is a red row below a separator. | -| `mobileMaxVisible` | `number` | | The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer, defaulting to 1; the desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged. | +| `mobileMaxVisible` | `number` | | The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer; when unset it is 2 in a record page's bottom action bar on a phone (counting the host's Edit) and 1 on any other header. The desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged. | ## `page:section` [#page-section] diff --git a/scripts/sdui-manifest.record.json b/scripts/sdui-manifest.record.json index 83d138ef01e..dc8400f30cf 100644 --- a/scripts/sdui-manifest.record.json +++ b/scripts/sdui-manifest.record.json @@ -14,7 +14,7 @@ "source": "built-tree", "generator": "scripts/gen-sdui-manifest-node.mjs", "generatedAt": "2026-11-20", - "sha256": "95510b0adeaef1efbfdb761325bcb96f034d252e179587f82dd9a7ae2d98f262", + "sha256": "eb1d4319bfd42d09fd5e3783c00572f77a281626724481f815da7686509d73de", "components": 106, "inTree": { "modulesRoot": "ui/apps/console", diff --git a/sdui.manifest.json b/sdui.manifest.json index 9ae116bf56d..e2dceb0cc88 100644 --- a/sdui.manifest.json +++ b/sdui.manifest.json @@ -3544,7 +3544,7 @@ { "name": "mobileMaxVisible", "type": "number", - "description": "The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer, defaulting to 1; the desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged." + "description": "The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer; when unset it is 2 in a record page's bottom action bar on a phone (counting the host's Edit) and 1 on any other header. The desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged." } ] }, diff --git a/ui/packages/components/src/renderers/layout/containers.tsx b/ui/packages/components/src/renderers/layout/containers.tsx index c542c310877..f3796f9575c 100644 --- a/ui/packages/components/src/renderers/layout/containers.tsx +++ b/ui/packages/components/src/renderers/layout/containers.tsx @@ -1944,9 +1944,9 @@ export interface PageHeaderActionsProps { * live, in place of an `actions` list. Only the boolean `true` opts in. */ placedActions?: unknown; - /** The inline-button budget on desktop, as `page:header`'s `maxVisible`; an out-of-contract value falls back to 3. */ + /** The inline-button budget on desktop, as `page:header`'s `maxVisible`; an out-of-contract value falls back to the unset default: 1 in a record page's one-row header (`defaultMaxVisible`), 3 on any other header. */ maxVisible?: unknown; - /** The inline-button budget on mobile, as `page:header`'s `mobileMaxVisible`; an out-of-contract value falls back to 1. */ + /** The inline-button budget on mobile, as `page:header`'s `mobileMaxVisible`; an out-of-contract value falls back to the unset default: 2 in a record page's phone bottom bar (`face: 'bar'`, the host's Edit included), 1 on any other header. */ mobileMaxVisible?: unknown; /** Drawn in place of the action row when no action survives the gates. */ emptySlot?: React.ReactNode; @@ -2572,8 +2572,10 @@ export const PageHeaderActions: React.FC = ({ // 4. a host button (the record page's Edit) is not one of the page's // actions: it takes no slot and never folds (objectui#12617). // `maxVisible` / `mobileMaxVisible` are overridable on the page:header - // schema and default to 3 / 1. This keeps the header from drowning in 4–5 - // buttons on every record page. + // schema. Unset, `maxVisible` is 1 in a record page's one-row header and 3 + // on any other header; `mobileMaxVisible` is 2 in a phone's record bottom + // bar (the host's Edit included) and 1 on any other header. This keeps the + // header from drowning in 4–5 buttons on every record page. // // `readMax` enforces the SPEC's value domain rather than a laxer renderer // tolerance (objectui#5006). Measured on `ComponentPropsMap['page:header']` @@ -3628,7 +3630,7 @@ ComponentRegistry.register('header', PageHeaderRenderer, { // `description` stays the only authoring-time expression of it, and spec // stays the sole judge of values.) { name: 'maxVisible', type: 'number', description: 'How many header actions render as inline buttons on desktop before the rest fold into the overflow menu. A positive integer — the contract rejects 0 and fractional values. Two kinds of action are routed to the overflow menu regardless of this budget and never occupy an inline slot: an action whose locations declare record_more without record_header, and any action with component action:menu. The host\'s own buttons (the record page\'s Edit) take no slot and never fold. The first inline action, or the one declaring variant primary, is the one filled primary button; the others are outline buttons. An action declaring variant danger is never the primary: inline it is a destructive button, and in the overflow menu it is a red row below a separator.' }, - { name: 'mobileMaxVisible', type: 'number', description: 'The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer, defaulting to 1; the desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged.' }, + { name: 'mobileMaxVisible', type: 'number', description: 'The same inline-button budget on mobile viewports, where horizontal room is scarce. A positive integer; when unset it is 2 in a record page\'s bottom action bar on a phone (counting the host\'s Edit) and 1 on any other header. The desktop half is Max Inline Actions, and the overflow routing rules stated there apply unchanged.' }, ], });