Repository navigation
Commit 3bdcd14
docs(objectui): concept.mdx collapsed-by-default section example authors collapsible too (#19838)
Fixes #19703
Clause-②: no
## What changed
`content/docs/protocol/objectui/concept.mdx`, section "1. Progressive
Disclosure": the YAML example captioned "Advanced section (collapsed by
default)" authored `collapsed: true` with no `collapsible`. It now
writes both keys (`collapsible: true` + `collapsed: true`), and one
sentence under the block states the rule the spec states: `collapsed:
true` implies `collapsible` — a section that starts closed always
carries the disclosure control that reopens it. +4 / -0, one file, docs
only.
## Why
The spec half is already on `main`: `packages/spec/src/ui/view.zod.ts`
(FormSectionSchema, "The collapse pair, declared once for both members")
declares that `collapsed` IMPLIES `collapsible` as a renderer rule
(maintainer ruling 2026-09-18, letter A), and that parse never rewrites
the pair. So a section authored `collapsed: true` alone parses to
`collapsible: false, collapsed: true`, and any renderer that reads the
parsed `collapsible` without applying the implication draws a section
that starts closed with no toggle. Writing both keys is correct under
the spec's wording (`collapsible: true` beside `collapsed: true` is the
fully explicit spelling) and renders a working toggle on every surface.
Measured against the built spec at `a3091327`:
`FormSectionSchema.safeParse` of the corrected section returns success
with `{collapsible: true, collapsed: true}`; the old section returns
`{collapsible: false, collapsed: true}` — the premise holds.
## Renderer surfaces (objectui at the `.objectui-sha` pin `main` carries
today, `87af769e9a3e`)
The pin has not moved since the card was filed, so the card's citation
still applies. Read at that pin:
- `packages/plugin-form/src/DrawerForm.tsx:609` and `:677` pass
`collapsible: section.collapsible` alone (and `:653` gates collapse on
`section.collapsible`). The old example rendered closed with no toggle
here; with both keys it renders a toggle and starts closed. **Safe with
the corrected example.**
- `packages/plugin-form/src/ObjectForm.tsx:1539-1560` applies the
implication (`collapsed` implies `collapsible`). Safe with either
spelling; **safe with the corrected example.**
Writing both keys does not depend on the pin: it is safe whether or not
a later pin makes DrawerForm apply the implication.
## Changeset
Docs-only: `content/docs/**` is not in any package's `files[]`, so
nothing publishes — `skip-changeset` territory. Labels are left to the
PM seat (no label write from this PR's author).
## Verification
Derived with `node scripts/pm/dispatch-gates.mjs --repo
objectstack-ai/objectstack --commands` (change set taken from git, merge
base `1cacfe4a`): 40 commands, all run at `a3091327`, all exit 0.
Reconciled with `--ran`: "40 derived famil(ies) accounted for — 40 run,
0 NOT-MEASURED (a DERIVED zero — all 40 recorded an exit code and none
of them is 3)". Four gates first exited 3 (prerequisite not met:
`@objectstack/lint`, `@objectstack/formula`, `@objectstack/client-react`
unbuilt); after building those closures they re-ran green.
Note: `check:yaml-examples` validates only tagged blocks and reports
`concept.mdx: 0 tagged / 9 untagged`, so its green does not cover this
block; the direct `FormSectionSchema.safeParse` reading above is the
measurement for it.
## Acceptance notes
- Sibling pages, silences rather than copy-and-fail, **not edited
here**: `content/docs/ui/views.mdx:416-417` (section key table lists
`collapsible` / `collapsed` with no word on the dependency) and
`content/docs/protocol/objectui/layout-dsl.mdx` (the same pair at
several lines; its authored example already writes both keys). Carrier:
none named.
- The DrawerForm residual (reads `section.collapsible` alone) is
objectui's, not this repo's.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01VDtqoecgES7ScQYGbFVDRv)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 81bfeb2 commit 3bdcd14
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| 596 | + | |
596 | 597 | | |
597 | 598 | | |
598 | 599 | | |
599 | 600 | | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
600 | 604 | | |
601 | 605 | | |
602 | 606 | | |
| |||
0 commit comments