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
6 changes: 3 additions & 3 deletions skills/objectstack-ui/evals/views-apps-actions-pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
{
"id": 4,
"prompt": "Design a custom lead record page: the Convert action inline in the header, a highlights strip, a stage path over `status`, and the related contacts. Also write a user guide for the `crm` package under src/docs and link it from the nav.",
"expected_output": "`definePage({ name, label, type: 'record', object: 'lead', template: 'three-column', regions: [...] })` with `page:header` (the declared action's id in `properties.actions`, no sibling action node), `record:highlights`, `record:path` (`statusField`, `stages`), `record:related_list`. The guide is a flat, namespace-prefixed `src/docs/crm_user_guide.md` in pure Markdown (MDX and image references are rejected at build), surfaced by a `type: 'url'` nav item pointing at `/docs/crm_user_guide`.",
"expected_output": "`definePage({ name, label, type: 'record', object: 'lead', template: 'three-column', regions: [...] })` with `page:header` (the declared action's id in `properties.actions`, no sibling action node), `record:highlights`, `record:path` (`statusField`, `stages`), `record:related_list`. The guide is a flat, namespace-prefixed `src/docs/crm_user_guide.md` in pure Markdown (MDX and image references are rejected at build), surfaced by a `type: 'doc'` nav item (`doc: 'crm_user_guide'`).",
"files": [],
"assertions": {
"must_contain": ["definePage", "type: 'record'", "regions", "page:header", "record:path", "src/docs/", "/docs/"],
"must_not_contain": ["record_detail", ".mdx"]
"must_contain": ["definePage", "type: 'record'", "regions", "page:header", "record:path", "src/docs/", "type: 'doc'"],
"must_not_contain": ["record_detail", ".mdx", "type: 'url'"]
}
},
{
Expand Down
14 changes: 7 additions & 7 deletions skills/objectstack-ui/rules/pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ Disambiguation: there is **no** `record_detail`, `app_launcher`, or
`type: 'app'`, a utility panel is `type: 'utility'`. Likewise
grid/kanban/calendar/gallery/timeline are NOT page types — they are
*visualizations* of a `list` page
(`interfaceConfig.appearance.allowedVisualizations`). Former roadmap-only types
(`dashboard`, `form`, `record_detail`, `record_review`, `overview`, `blank`)
were removed from the enum because they never shipped a renderer.
(`interfaceConfig.appearance.allowedVisualizations`).

### Templates & Regions

Expand Down Expand Up @@ -357,13 +355,15 @@ resolves any doc regardless of which app you came from. The URL is
one URL. Do **not** design per-app or per-package doc URLs; that gives one
doc many addresses and breaks cross-references.

To surface a doc inside an app, add a navigation item that **links into**
that global URL. There is no dedicated `doc` nav-item type yet, so use a
`url` item pointing at `/docs/<name>`:
To surface a doc inside an app, add a `doc` navigation item (a `url` item is
for an external or custom URL): `doc: '<name>'` opens that page,
`book: '<book>'` opens the book at its first readable page (both: that page
in that book). It inherits the docs audience gate, and `os build` refuses a
target the package lacks (`docs/nav-target`):

```typescript
navigation: [
{ id: 'nav_help', type: 'url', url: '/docs/crm_user_guide',
{ id: 'nav_help', type: 'doc', doc: 'crm_user_guide',
label: 'User Guide', icon: 'book-open' },
]
```
Expand Down
Loading