Skip to content

Commit 00a5e74

Browse files
docs(react-pages): state the html tier's registered-name rule and scope the PascalCase one (#13734)
The html tier's allowed tags are the registry's own type names: `compile()` in `@objectstack/sdui-parser` builds its whitelist as `Object.keys(manifest.components)` and `parse.ts` matches the tag against it by exact string, with no case folding. All 57 keys in `sdui.manifest.json` are lowercase — `list-view` is there, `ListView` is not — so a PascalCase tag borrowed from the react tier is rejected at save time with "is not an allowed component". The page never said so. Its PascalCase sentence was unqualified while the page is also the documentation home for the html tier, so an author reading top to bottom had no way to learn the naming rule before hitting the error. Two body edits, no restructuring: - the html-tier section now names the registered spelling, including the namespaced and layout forms, and names the error a borrowed PascalCase tag produces; - the react-tier sentence is scoped to that tier and points at the html spelling. Claude-Session: https://claude.ai/code/session_01Pk26oZ12t5N1hwGW1m1MgC Co-authored-by: Claude <noreply@anthropic.com>
1 parent cff17af commit 00a5e74

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

content/docs/ui/react-pages.mdx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@ tags in the public block manifest are accepted, props are checked against each b
3131
declared inputs, and an unknown tag is a hard error at save time. That is the tier for
3232
author- or AI-generated pages you have not reviewed.
3333

34+
Those tags are the **registered type names, written verbatim** — lowercase and
35+
kebab-case, keeping the namespace prefix where a block has one: `<list-view>`,
36+
`<object-form>`, `<object-chart>`, `<record:related_list>`, `<flex>`. The **PascalCase**
37+
spellings further down this page (`<ListView>`, `<ObjectForm>`, `<ObjectChart>`) are the
38+
**react tier's** convention and are not registered names, so an html page that borrows
39+
one is rejected at save time with `<ListView> is not an allowed component`.
40+
3441
<Callout type="warn">
3542
Reach for `'html'` by default. Reach for `'react'` when the page genuinely needs
3643
behaviour the schema tree cannot express — local state, computed lists, one block's
@@ -74,8 +81,10 @@ builds for it:
7481
| `useAdapter` | The live data source: `find` / `findOne` / `create` / `update`. |
7582
| `data`, `variables`, `page` | The page's data, its `variables` map, and its own schema. |
7683

77-
Blocks are referenced by the **PascalCase form of their registered type**: `object-form`
78-
`<ObjectForm>`, `list-view``<ListView>`, `object-chart``<ObjectChart>`.
84+
**On this tier** blocks are referenced by the **PascalCase form of their registered
85+
type**: `object-form``<ObjectForm>`, `list-view``<ListView>`, `object-chart`
86+
`<ObjectChart>`. A `kind:'html'` page writes the registered name itself instead —
87+
`<object-form>`, `<list-view>`, `<object-chart>`.
7988

8089
The per-block prop lists are **generated** from the spec's block index, so they cannot
8190
drift out of step with the runtime. Treat the generated file as the authority and read it

0 commit comments

Comments
 (0)