Uh oh!
There was an error while loading. Please reload this page.
docs(plugin-gantt): align the README schema key surface with what the renderer reads - #5900
Merged
Merged
Conversation
… renderer reads
The plugin-gantt README taught a task-array schema (`tasks`, `object`,
`nameField`/`startField`/`endField`, `fields`, callbacks on the schema) that
`ObjectGantt` never reads. Copying any of those examples produced an EMPTY
CHART WITH NO DIAGNOSTIC: `gantt` is a registered type, so the node mounts and
simply finds no data config and no gantt config.
Rewrites the schema examples to the two reads that actually decide what
renders (`src/ObjectGantt.tsx`):
getDataConfig -> `data` / `staticData` / `objectName`
getGanttConfig -> top-level `startDateField`+`endDateField` and their
`*Field` family, else the whole `schema.gantt` block
Also in the same defect class, on the same page:
- `color: 'bg-blue-500'` -> a CSS color (`task.color` goes straight into an
inline `backgroundColor`, so a Tailwind class is invalid and the bar
silently falls back to default blue)
- runtime task literals -> real `Date`s and `title` (the `GanttTask` shape)
- the `year` scale was missing from View Modes
- `dataSource` is not an adapter slot on the schema node; the same-named
spec binding is `{ object, view?, filter?, sort?, limit? }`
- docs-site twin: `onTaskClick`/`className` are React props, not schema
keys, and the api provider takes `read: { url }`, not `endpoint`
`viewMode` is NOT removed: objectui#5074 landed it as declared authoring
surface honoured by both renderer branches, so the page now states its real
conditionality (it reaches the renderer through `getGanttConfig`). Keys read
only through an `as any` cast (`readOnly`, `markers`, `navigation`, ...) are
named rather than dropped.
Renderer reads are untouched — the page was wrong, not the renderer.
Fixes#5057
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EuPCi56cnGyykygi3z9w4mContributor
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
August 23, 2026 19:43
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#5057
The plugin-gantt README taught a whole schema key face the renderer does not
read. This is not stale prose — it is a silent empty result:
ganttis aregistered type, so a node built from those examples mounts, finds no data
config and no gantt config, and draws an empty chart with no diagnostic.
Renderer reads are untouched: the page was wrong, not
ObjectGantt.tsx.Key-surface measurement (cast-aware, re-measured on this branch)
schema\.KEYgrep is blind toas anyread sites, which is exactly howthis card's own table was partially falsified.
Two layers, run over
packages/plugin-gantt/srcexcluding*.test.*:Why
identcloses the cast hole by construction: every read form — plainschema.K, cast(schema as any).K, destructuring, andschema['K']—contains the identifier
K. Soident = 0proves "no read site of any form".I also enumerated the read forms directly:
grepfor destructuring offschema, string-subscript, and spread each returned none, so every schemaread in this package is a member expression — precisely what layer 2 matches.
tasksGanttView'stasksprop)objectobjectName)nameFieldstartFieldendFieldfieldsonTaskClickonTaskUpdateclassNamedataSourceviewModeObjectGantt.tsx:375, both branchesreadOnly:1478,:1523Controls (a broken probe must not read as "zero hits"):
startDateField(known-read, plain)objectName(known-read, plain)markers,navigation(known-read, cast-only)zzzNoSuchKeyControl(nonsense)The cast-only controls are the load-bearing ones: they prove layer 2 sees
(schema as any).K. A naive grep scores them 0 and reads as "unread".What the page now says
Rewritten to the two reads that actually decide what renders:
getDataConfig(:299) —data/staticData/objectNamegetGanttConfig(:346) — top-levelstartDateField+endDateFieldandtheir
*Fieldfamily (both date fields required for that branch to betaken), else the whole
schema.ganttblockviewModeis not deleted. objectui#5074 landed it as declared authoringsurface (
ObjectGanttSchema, derived from the spec'sGanttConfigSchema)honoured by both renderer branches, so the page states its real conditionality:
it reaches the renderer through
getGanttConfig, so as a top-level key itneeds the date fields beside it, or it sits in the
ganttblock. Thedeliberate no-default (persisted layout seeds granularity) is stated too.
Keys read only through a cast are named rather than silently dropped:
readOnly,mobileReadOnly,markers,navigation,skipWeekends,holidays,criticalPath,showBaselines,persistLayout/viewName,label. Those eleven are read but not declared onObjectGanttSchema— filed separately as #5903 (out of this PR's fence: the card is docs-only,
and declaring them is a types change).
The old key face is kept as an explicit "used to teach / use instead"
table so a reader who copied it can find the fix.
Same defect class, fixed in place (each named, with its evidence)
color: 'bg-blue-500'→ CSS color.GanttView.tsx:3637doesbackgroundColor: task.color || '#3b82f6'— a Tailwind class is invalid CSSthere, so bars silently fell back to default blue.
Dates andtitle.GanttTask.start/endare
Date; the label field istitle, notname.yearscale was missing from View Modes —GanttViewModeisday|week|month|quarter|year, matching the spec enum.dataSourceis not an adapter slot on the schema. The adapter arrivesvia renderer context / prop. A
dataSourcekey on the node is the spec'sPageComponentSchema.dataSourcebinding ({ object, view?, filter?, sort?, limit? });ElementDataSourceGateguards against confusing the two.content/docs/plugins/plugin-gantt.mdx):onTaskClick/classNamemoved out of the schema block;data: { provider: 'api', endpoint, method }→read: { url, method }— nothing reads.endpoint(
resolveDataSource.ts:58passesviewData.read/.write).Verification
Gate union re-run after the final commit, at
28200790a:check-doc-links.mjsLinks are valid across 13 scan roots.check-doc-component-types.mjs✅ Every documented component type is registered.check-doc-snippet-types.mjsEvery covered documentation snippet compiles against the built types.check-control-bytes.mjs✅ check-control-bytes: OK (scanned 4908 tracked text file(s); skipped 85 binary).check-changeset-presence.mjs✅ No source of a released package changed in this range, so no changeset is owed.check-changeset-no-major.mjs✅ No changeset declares amajorbump.check-doc-snippet-typeswas run against a built closure (its own--build-filter, 32 turbo tasks green), so it is a real judgement, not anot-run. Its controls printed: resolution landed in
packages/types/dist/ index.d.ts, sentinel produced TS2305, positive control clean.Honest limit — stated because a green run does not cover this page. Both
gantt documents are in that gate's
UNGATED_DOCSdebt list, so my snippetswere not compiled by it (
63 ungated — declared in this script, NOT verified by it). I verified the two blocks I annotated myself, against thebuilt
packages/plugin-gantt/dist:GanttTask[]blocks, verbatim → exit 0TS2322: Type 'string' is not assignable to type 'Date'×2namekept) →TS2353: Object literal may only specify known properties, and 'name' does not exist in type 'GanttTask'— reproducing the reading trap the earlier dev recorded:namestays invisible while a property-level error is present.
Changeset: none, per the gate's own verdict above (no released package
src/changed). Consequence worth knowing: the corrected README reaches npmon the next release of the package.
Lint: not narrowed — the intersection is empty and measured.
eslint. config.jsscopes every block to**/*.{ts,tsx}with no markdown/mdxprocessor configured;
--format jsonover both changed files judged 2 files,0 errors, both messages being
File ignored because no matching configuration was supplied. No.ts/.tsxfile changed, so no untouched file's verdict canmove.
No ablation. This is a docs-only diff — there is no code path to mutate,
so a staged one would be decorative. The read-site measurement above is the
evidence in its place.
Generated by Claude Code
Generated by Claude Code