Skip to content

Commit 0d89da5

Browse files
committed
docs(ui): correct the navigation item type count and document separator
The app shell doc claimed eight navigation item types and enumerated eight, omitting `separator` — the schema has declared nine since the inverse-drift fix (#1878/#1891/#1894) that added it to match the objectui renderer's `item.type === 'separator'` branch. The gap matters more now that this PR discriminates the union on `type`: a mistyped `type` reports the valid discriminator list, so the doc's enumeration is the thing authors check it against. And `SeparatorNavItemSchema` is `.strict()` over only `type`/`id`/`order` — it does not spread `BaseNavItemSchema` — so `label`/`icon`/`badge`/`visible`/`requiredPermissions` on a separator are now hard errors where they used to be silently stripped. The "all navigation items share these base properties" table was the exact sentence that would send an author into that error, so it now names the exception. Both claims asserted against the live schema before writing: the union has nine members, and a separator accepts type/id/order while rejecting each of the five base props. Refs #4001 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0147tNF4Snk7Ry1KGt4a5PY4
1 parent 74d3e57 commit 0d89da5

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

content/docs/ui/apps.mdx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const crmApp = {
5757

5858
## Navigation Items
5959

60-
The navigation tree supports eight item types, combined to create rich menu structures. The most common are shown below (`object`, `dashboard`, `page`, `url`, `group`); the spec also defines `report`, `action`, and `component` items.
60+
The navigation tree supports nine item types, combined to create rich menu structures. The most common are shown below (`object`, `dashboard`, `page`, `url`, `group`, `separator`); the spec also defines `report`, `action`, and `component` items.
6161

6262
### Object Navigation
6363

@@ -121,9 +121,23 @@ Groups items into collapsible sections with children:
121121
}
122122
```
123123

124+
### Separator
125+
126+
A visual divider in the navigation list. It renders no target and carries no
127+
label — the only keys it accepts are `type`, an optional `id`, and an optional
128+
`order`:
129+
130+
```typescript
131+
{ type: 'separator', order: 30 }
132+
```
133+
124134
### Common Navigation Properties
125135

126-
All navigation items share these base properties. Every item **must** declare a unique `id` (lowercase `snake_case`) — it is required by the schema and is referenced by `homePageId` and `mobileNavigation.bottomNavItems`:
136+
All navigation items **except `separator`** share these base properties. Every
137+
item **must** declare a unique `id` (lowercase `snake_case`) — it is required by
138+
the schema and is referenced by `homePageId` and `mobileNavigation.bottomNavItems`.
139+
(On a `separator`, `id` is optional and the remaining properties below are
140+
rejected — a divider has nothing to label, gate, or badge.)
127141

128142
| Property | Type | Description |
129143
| :--- | :--- | :--- |

0 commit comments

Comments
 (0)