Repository navigation
docs(schema-reference): dashboard widgets teach layout and type + options, not colSpan / rowSpan / body - #10452
Conversation
…ions, not colSpan / rowSpan / body
The DashboardComponentSchema section taught three widget keys the strict
DashboardWidgetSchema refuses by name. The example now sizes each widget with
layout { x, y, w, h } and gives it content as a family in `type` with its
settings under `options`; the widgets row names both arms of the slot and the
prose under the table says what each family reads from `options`.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN
… component slot A spec chart family named in a docs code block needs a doc-types exemption entry, which lives outside this change's file surface; the chart widget now holds its `chart` node in `component`, so the example shows both content forms the widgets row names and the prose teaches the chart families' options. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014mXUNuFomfj24w7s1pZzhN
|
changeset-claim-re-read
|
Contract reviewServed-tier: ① Derived judgmentsSurface. Parse evidence (my own harness, not the dev's). Scratch project under
Table row
Prose paragraph 1.
Prose paragraph 2.
Rest of the page and the README. ② Semver levelEmpty frontmatter is right. ③ Boundary flags
Implemented-by: VERDICT: PASSGenerated by Claude Code |
Fixes #8290
Clause-②: no — documentation only: it stops a published page from teaching keys (
colSpan,rowSpan,body) that the strictDashboardWidgetSchemarefuses by name. No schema, export or accept set moves.What changed
content/docs/api/schema-reference.md, theDashboardComponentSchemasection only (JSON example,widgetsrow, prose under the table), plus one empty-frontmatter changeset.layout: { x, y, w, h }instead ofcolSpan/rowSpan, and holds its content as a family intypewith settings underoptions(metric,list), or as a registered component node incomponent(thechartwidget) instead ofbody.widgetsrow. The type column names both arms of the slot as landed by objectui#7952 (component arm first, as on both faces):(DashboardWidgetSlotComponentSchema | DashboardWidgetSchema)[]. The description nameslayout,type+options,component, and the component-node arm.layoutis (all four numbers or none), thatcolSpan/rowSpan/bodyare refused by name (objectui#6002), what each family reads fromoptions, and that ametricwidget's caption isoptions.description.The seconds half of the card was already discharged at base
cc4366d: the row readsrefreshIntervalSeconds("Auto-refresh interval in seconds", objectui#7783), the example writes"refreshIntervalSeconds": 30, and both renderers computeschema.refreshIntervalSeconds * 1000(DashboardRenderer,DashboardGridLayout). Not redone.Parse evidence (scratch harness, source zod faces, not committed)
The harness takes the first
jsonfence under### DashboardComponentSchemain the file it is given and parses it.Control, base
cc4366dcopy of the page:This branch, head
5eca3f2:Prose probes:
area/bar/line/pie/metric/list/table/metric-cardare all members ofDashboardWidgetTypeSchema, and a widget withlayout: { w: 2, h: 1 }is refusedinvalid_typeatlayout.xandlayout.y.TypeScript face: I pasted the example into a scratch file as
const doc: DashboardComponentSchema = …(imported frompackages/types/src/complex) and rantsc --strict. The new example produces 0 diagnostics in that file. The base example produces 3 (TS2322, one perbody). Both runs also show the same 2 environment-only diagnostics incomplex.ts, "Cannot find namespace 'React'", which come from--ignoreConfig.Gates (local, head
5eca3f2)check-changeset-presence: exit 0. It prints "✅ No source or published contract of a released package changed in this range, so no changeset is owed." The added changeset is the empty-frontmatter declaration.check:doc-types: exit 0, "✅ Every documented component type is registered."check-prompt-component-keys: exit 0.check:doc-fences --self-testandcheck:doc-fences: both exit 0.check:doc-example-ids: exit 0, "✅ 414 real reference(s) all resolve in the catalog registry."check:new-line-citations: exit 0, "VERDICT new-cross-file-line-citations: 0 new citation(s), enforcement report-only -> exit 0".check:control-bytes: exit 0.check-doc-links: exit 0, "Links are valid across 17 scan roots."check-changeset-no-major: exit 0.check-changeset-overwrite: exit 0.check:pending-changeset-literals: exit 0.check:changeset-claims(report-only): exit 0. 14 pending changesets name this file, and none of them mentions the dashboard section.check-doc-expression-carriage(report-only): exit 0. Its one site on this page is in the ActionSchema section, which already existed and is outside this diff.pnpm exec vitest runon 8 files (4packages/typespins that readschema-reference.md, the zod mirror parity suite, andcheck-doc-component-types/check-doc-links/component-node-vocabulary-7434underscripts/__tests__). Result: "Test Files 8 passed (8) · Tests 557 passed (557)", lock verdict "VERDICT command-exit 0".check:doc-snippets/check:doc-examples. The gate exits 2 because the packages it reads are unbuilt.doc-snippetscompiles only ts/tsx fences, and this diff changes onejsonfence and prose.doc-examplesreads JSDoc inpackages/*/src, and this diff touches no source. Build Docs, lychee external links and the docs route closure are left to CI.Deviation: the chart widget uses the
componentslotMy first commit (
13b194c) wrote the chart as"type": "area"+options.check:doc-typesrejected it:unregistered-doc-type ... type 'area' (json). No spec chart family is a registered component key. A shorthand chart family inside a docs code block therefore needs aDOC_TYPE_EXEMPTIONSentry inscripts/check-doc-component-types.mjs, which is outside this claim's file surface. The chart widget now puts itschartnode incomponent. That form is legal on this node and needs no exemption. It also means the example shows both content forms the row names. The prose teaches the chart families'optionskeys. If the seat prefers the shorthand chart in the example, the follow-up is one exemption entry of the same kind theguide/dashboard-filters.mdbar/lineentries already are.Acceptance notes
DashboardComponentSchemaheading. Draft PR objectui#8941 edits this file near line 684, so the two do not overlap.labeler.yml.Generated by Claude Code