Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/35660-page-header-max-visible-describe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@objectstack/spec': patch
---

docs(spec): `page:header` `maxVisible` / `mobileMaxVisible` descriptions state the renderer's real fallbacks per host

Clause-②: no
Metadata-protocol: none

The two descriptions said the renderer shows 3 inline header buttons (1 on mobile) when the key is unset. Since the record page's header became one row, an unset `maxVisible` gives 1 there and 3 on any other header, and an unset `mobileMaxVisible` gives 2 in a record page's bottom action bar on a phone and 1 elsewhere. Text only: the schema shape, its validation and its lack of a schema default are unchanged.
4 changes: 2 additions & 2 deletions content/docs/references/ui/component.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1579,8 +1579,8 @@ An any-of group: `{ or: [rule, ...] }` matches a record when ANY of its rules ma
| **recordChrome** | `boolean` | optional (default: `true`) | Render the record chrome — the title as a record chip with its copy-id button. Set false on a non-record page (dashboard, landing) to fall back to the bare heading layout. |
| **showStar** | `never` | optional | [REMOVED] `page:header` property `showStar` was removed in @objectstack/spec 18 (ADR-0087 D2) — the reference console draws no star beside the record title, so the key switched nothing: the record's favorites entry is the header's ⋯ menu, and metadata does not control it. Delete the key, whether it was `true` or `false`; the ⋯ menu's favorites entry is unchanged. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. |
| **showCopyId** | `boolean` | optional (default: `true`) | Show the copy-record-id button beside the record title. Part of the record chrome — no effect when `recordChrome` is false. |
| **maxVisible** | `integer` | optional | How many header actions render as inline buttons before the rest fold into the overflow menu (renderer default 3). |
| **mobileMaxVisible** | `integer` | optional | The `maxVisible` budget on mobile viewports (renderer default 1). |
| **maxVisible** | `integer` | optional | How many header actions render as inline buttons before the rest fold into the overflow menu. Renderer default when unset: 1 in a record page's one-row header bar, 3 on any other header. |
| **mobileMaxVisible** | `integer` | optional | The `maxVisible` budget on mobile viewports. Renderer default when unset: 2 in a record page's bottom action bar on a phone, 1 on any other header. |
| **aria** | `{ ariaLabel?: string \| Record<string, string>; ariaDescribedBy?: string; role?: string }` | optional | ARIA accessibility attributes |

### Nested Shape: `PageHeaderProps.aria`
Expand Down
2 changes: 1 addition & 1 deletion content/docs/ui/pages.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ unknown or retired key (`description`, `icon`, `breadcrumb`, `showStar`) is refu
| `placedActions` | — | `true` asks for every action of the object placed at `record_header` / `record_more`, read live, in place of an `actions` list, so an action another package adds is drawn without editing the page. Refused beside an authored `actions` list: keep one. The platform's user, organization and approval request pages set it |
| `recordChrome` | `true` | Draw the title as the record chip (object label, copy-id button, the record's picture when the object names an `imageField`); `false` keeps a bare heading |
| `showCopyId` | `true` | The copy-record-id button in the chip |
| `maxVisible` / `mobileMaxVisible` | 3 / 1 | How many actions render inline before the rest fold into the `⋯` menu |
| `maxVisible` / `mobileMaxVisible` | 1 in a record page's one-row header bar, 3 elsewhere / 2 in a phone record page's bottom bar, 1 elsewhere | How many actions render inline before the rest fold into the `⋯` menu |
| `aria` | — | ARIA attributes (`ariaLabel`, `ariaDescribedBy`, …) for the `<header>` element |

A named action renders only if its `locations` include `record_header` (inline) or
Expand Down
13 changes: 7 additions & 6 deletions packages/spec/src/ui/component.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,22 +839,23 @@ export const PageHeaderProps = strictObject({
* evidence: the renderer has always read them and the schema had not caught
* up. The header renderer (read points recorded in `liveness/page.json`, row `regions`) resolves
* `schema?.maxVisible ?? schema?.properties?.maxVisible` (and the `mobile*`
* twin), the `?? 3` / `?? 1` are its own fallbacks, and its comment says out
* loud that both are "overridable on the page:header". Closing this shape
* twin), the fallbacks for an unset key are its own (they differ by host, as
* the two `.describe()` strings below state), and its comment says out loud
* that both are "overridable on the page:header". Closing this shape
* without declaring them would turn an invited affordance into a hard
* rejection — the lesson of commit 78f0be872, which is to enumerate by the RENDERER'S read
* pattern rather than by the key list a previous ruling happened to quote.
*
* Optional with NO schema default, deliberately: 3 and 1 are the renderer's
* fallbacks, and declaring them here would materialize a `maxVisible` on
* Optional with NO schema default, deliberately: the per-host numbers are the
* renderer's fallbacks, and declaring one here would materialize a `maxVisible` on
* every parsed header — turning an unset key into an authored one, exactly
* as the record picker's `limit` docblock records for its own 50.
*/
maxVisible: z.number().int().positive().optional().describe(
'How many header actions render as inline buttons before the rest fold into the overflow menu (renderer default 3).',
'How many header actions render as inline buttons before the rest fold into the overflow menu. Renderer default when unset: 1 in a record page\'s one-row header bar, 3 on any other header.',
),
mobileMaxVisible: z.number().int().positive().optional().describe(
'The `maxVisible` budget on mobile viewports (renderer default 1).',
'The `maxVisible` budget on mobile viewports. Renderer default when unset: 2 in a record page\'s bottom action bar on a phone, 1 on any other header.',
),
/** ARIA accessibility */
aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),
Expand Down
Loading