Repository navigation
Commit cdbc852
docs(plugin-tree): compile the README's snippet against the authorable surface (#8251)
The page's only collected fence was a bare `object-view` literal carrying
`views: [{ type: 'tree', tree: { ... } }]`. It never parsed (TS1005 x2 +
TS1109), so the ledger row was the whole of what this gate knew about the
page, and a genuine type error in that literal left the row byte-identical.
Two facts made the obvious repair wrong. `ObjectViewSchema` declares no
`views` member at all, so annotating the literal with it compiles green
while checking nothing that matters -- measured: `views: 'not-even-an-array'`
is accepted, only `objectName` turns red. And `tree` is a host-composition
view type, not an authorable one: objectui#5321 ruled it recorded rather
than declared, and ObjectView.tsx states verbatim that its config surface is
"not authoring surface to teach in the docs". The example taught, as
authored metadata, the one shape that ruling forbids teaching.
So the example now writes the `object-tree` node an author can actually
select, bound through the exported `ObjectQLComponentSchema` union, which
narrows on `type` and checks all five declared members. The host-only `tree`
alias keeps its paragraph, as prose rather than as a copyable example.
The four documented defaults were each checked against ObjectTree.tsx and
were already correct; they are unchanged.
Part of #5174 (batch 33)
Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr
Co-authored-by: Claude <noreply@anthropic.com>1 parent 3404893 commit cdbc852
2 files changed
Lines changed: 32 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
17 | 21 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
48 | 63 | | |
49 | 64 | | |
50 | 65 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
781 | 781 | | |
782 | 782 | | |
783 | 783 | | |
784 | | - | |
785 | | - | |
786 | 784 | | |
787 | 785 | | |
788 | 786 | | |
| |||
0 commit comments