Skip to content

Commit a22d7b9

Browse files
committed
docs(skills): pages.md says what a page type, template and region name run
`skills/objectstack-ui/rules/pages.md` follows the page contract `PageTypeSchema`, `PageTemplateSchema` and `PAGE_TEMPLATE_SLOTS` declare: `home` is the widest region page and not a landing (an app opens on its first navigation item; `isDefault` is refused on it), `utility` is a narrow inline region page with no floating or docked shell slot, the template set is closed to `default`, `header-sidebar-main`, `three-column` and `dashboard` with the regions each one places (`sidebar` left, `aside` right; `full-width` retired), a region the template does not place or a second region for a filled slot is refused, and `kind: 'jsx'` is retired rather than an alias of `html`. The published-skills token ratchet holds this file at zero headroom, so the added text is paid for in the same file: the disambiguation sentence that restated the table, the renderer clause of the five-values line and the `responsive.zod.ts` source pointer. Net -11 bytes. Claude-Session: https://claude.ai/code/session_01H9YpvyoScsRAsjBc2pCUgn Co-authored-by: Claude <noreply@anthropic.com>
1 parent a869ea6 commit a22d7b9

1 file changed

Lines changed: 16 additions & 21 deletions

File tree

‎skills/objectstack-ui/rules/pages.md‎

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,28 @@ Register under `defineStack({ pages: [...] })`.
1515

1616
### Page Types
1717

18-
`PageTypeSchema` has exactly **five** values — only types with a dedicated
19-
renderer are authorizable (ADR-0049 enforce-or-remove):
18+
`PageTypeSchema` has exactly **five** values (ADR-0049 enforce-or-remove):
2019

2120
| `type` | Purpose |
2221
|:----------|:--------|
2322
| `record` | Component-based record layout with regions (overrides the default record detail) |
24-
| `home` | App home / landing page |
25-
| `app` | App-level page with navigation context |
26-
| `utility` | Floating utility panel (e.g. notes, phone dialer) |
23+
| `home` | Widest region page; not a landing (`isDefault` refused): an app opens on its first navigation item |
24+
| `app` | Region page at app width |
25+
| `utility` | Narrow inline region page for a tool (notes, a dialer); no floating or docked shell slot exists |
2726
| `list` | Record list/grid interface page — configured via `interfaceConfig` |
2827

29-
Disambiguation: there is **no** `record_detail`, `app_launcher`, or
30-
`utility_bar` type — a record layout is `type: 'record'`, an app-level page is
31-
`type: 'app'`, a utility panel is `type: 'utility'`. Likewise
32-
grid/kanban/calendar/gallery/timeline are NOT page types — they are
33-
*visualizations* of a `list` page
34-
(`interfaceConfig.appearance.allowedVisualizations`).
28+
There is **no** `record_detail`, `app_launcher` or `utility_bar` type, and
29+
grid/kanban/calendar/gallery/timeline are *visualizations* of a `list` page
30+
(`interfaceConfig.appearance.allowedVisualizations`), not page types.
3531

3632
### Templates & Regions
3733

38-
`template` controls the column layout (e.g. `'three-column'`,
39-
`'two-column'`, `'single-column'`). Each template exposes named
40-
**regions** (`header`, `left_sidebar`, `main`, `right_sidebar`, `footer`)
41-
which contain components.
34+
`template` is `default` (regions `header`, `sidebar`, `main`, `aside`, `footer`),
35+
`header-sidebar-main` (`header`, `sidebar`, `main`), `three-column` (the same
36+
five) or `dashboard` (`header`, `footer`; other regions are grid cells);
37+
`full-width` is retired (a second name for `default`). On a `kind: 'full'` page a region
38+
the template does not place, or a second one for a filled slot, is refused at
39+
its `name` — the left column is `sidebar`, the right `aside`.
4240

4341
### Component Catalogue (selection)
4442

@@ -69,7 +67,7 @@ An invoice, a delivery order, a letter or a report is an ordinary page with a
6967
the document. Only a `kind: 'full'` page of `type: 'record'`, `'home'` or
7068
`'app'` with its blocks in `regions` may declare it: the parse refuses `print`
7169
on a `list` page (its switch is `interfaceConfig.allowPrinting`), a `utility`
72-
panel, a `slotted` / `html` / `react` page and a `full` page with no regions.
70+
page, a `slotted` / `html` / `react` page and a `full` page with no regions.
7371

7472
`print` keys, each mapped to print CSS: `paperSize` (`'A4'` default, `'A5'`,
7573
`'Letter'`, `'Legal'`) and `orientation` (`'portrait'` default, `'landscape'`);
@@ -134,8 +132,8 @@ by what the page needs:
134132
| `react` | **real React** (hooks, `.map`, `onClick`, expressions) | yes (main React tree) | complex interactive business UIs — master/detail, wizards, state-driven filters |
135133

136134
`source` is the source-of-truth in both source tiers; `regions` is ignored. A
137-
`kind:'html'`/`'react'` page with no `source` fails the build (ADR-0078). The legacy
138-
value `kind:'jsx'` is a deprecated alias for `kind:'html'`.
135+
`kind:'html'`/`'react'` page with no `source` fails the build (ADR-0078).
136+
`kind:'jsx'` is retired: the parse refuses it and names `kind:'html'`.
139137

140138
#### `kind:'html'` — constrained JSX, parsed (safe by construction)
141139

@@ -284,9 +282,6 @@ Rules:
284282
}
285283
```
286284

287-
The spec field is `PageComponentSchema.responsiveStyles` (`ResponsiveStylesSchema` —
288-
see `node_modules/@objectstack/spec/src/ui/responsive.zod.ts`).
289-
290285
**In the source tiers (`kind:'html'` / `kind:'react'`) the same rule holds — no
291286
Tailwind `className` — but the primitive differs:**
292287

0 commit comments

Comments
 (0)