Skip to content

Commit eba2028

Browse files
committed
docs(spec,types,plugin-calendar,plugin-gantt): comments say the producers hand off the calendar / gantt block
The JSDoc around the object-calendar / object-gantt flat-key guidance, and the comments this PR's files carry, still said ObjectView / ListView emit or flatten into the flat spelling and that ObjectGanttSchema declares it. They now say the producers hand the binding off in the block, the flat spelling is a stored-document fallback the renderer still reads, and the flat keys live on the package-local hand-off types. Comments only. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzetP4CSWdmfU9t887J
1 parent 2f10566 commit eba2028

7 files changed

Lines changed: 45 additions & 27 deletions

File tree

‎packages/spec/src/ui/component.zod.ts‎

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6195,8 +6195,11 @@ export type ObjectKanbanPropsParsed = z.infer<typeof ObjectKanbanPropsSchema>;
61956195

61966196
/**
61976197
* The flat per-field spellings `ObjectCalendar` keeps reading as a
6198-
* backward-compat fallback (`getCalendarConfig`; read points recorded in
6199-
* `liveness/page.json`, row `regions`) and that `ObjectView`/`ListView` emit on their runtime handoff. Read, but
6198+
* stored-document fallback (`getCalendarConfig`; read points recorded in
6199+
* `liveness/page.json`, row `regions`). `ObjectView`/`ListView` hand the
6200+
* binding off in the `calendar` block, not flat (objectstack#25923), and the
6201+
* flat keys live on `plugin-calendar`'s own hand-off type, not on
6202+
* `@object-ui/types`' `ObjectCalendarSchema`. Read, but
62006203
* NOT authorable — one composition key per concept (Prime Directive #12, the
62016204
* `body` → `children` precedent on {@link PageContainerProps}): the authored
62026205
* spelling is the `calendar` object.
@@ -7522,21 +7525,22 @@ export type ObjectMapProps = z.input<typeof ObjectMapPropsSchema>;
75227525
export type ObjectMapPropsParsed = z.infer<typeof ObjectMapPropsSchema>;
75237526

75247527
/**
7525-
* The flat `GanttConfig` spellings `getGanttConfig`'s branch 2 reads and that
7526-
* `ObjectView` / `ListView` EMIT when they flatten `options.gantt` — objectui's
7527-
* own `FLAT_GANTT_CONFIG_KEYS` (read points recorded in `liveness/page.json`,
7528-
* row `regions`). Read, but
7528+
* The flat `GanttConfig` spellings `getGanttConfig`'s branch 2 reads as a
7529+
* stored-document fallback — objectui's own `FLAT_GANTT_CONFIG_KEYS` (read
7530+
* points recorded in `liveness/page.json`, row `regions`). `ObjectView` /
7531+
* `ListView` hand the binding off in the `gantt` block, not flat
7532+
* (objectstack#25923). Read, but
75297533
* NOT authorable, for the reason the map's twin set above records: objectui#6469
75307534
* inherited the objectui#5018 ruling for this block, so the `gantt` block is the
75317535
* authoring shape, it is taken WHOLE when present, and every flat key beside it
75327536
* is named as ignored in a dev warning.
75337537
*
7534-
* The flat branch is the HOT path for this block — a hand-authored `gantt` block
7535-
* reaching the renderer through either view layer has already been flattened —
7536-
* which is exactly why the prescription matters here: an author who learned the
7537-
* flat spelling from a view config (or from `@object-ui/types`'
7538-
* `ObjectGanttSchema`, which declares the whole flat face) writes it on an SDUI
7539-
* node next, where nothing flattens anything.
7538+
* The block branch is the path both view layers take — they hand the `gantt`
7539+
* block on whole — and the flat branch is only the stored-document fallback.
7540+
* The prescription still matters: an author who met the flat spelling in an
7541+
* older stored document writes it on an SDUI node next. The flat keys live on
7542+
* `plugin-gantt`'s package-local hand-off type (`ObjectGanttFlatFields`), not
7543+
* on `@object-ui/types`' `ObjectGanttSchema`, which declares only the block.
75407544
*
75417545
* Membership is `GanttConfigSchema`'s own shape plus the legacy singular
75427546
* `dependencyField` alias the flat branch still reads beside `dependenciesField`
@@ -7632,7 +7636,7 @@ function objectGanttMarker() {
76327636
* `mobileReadOnly`.
76337637
*
76347638
* Measured and deliberately NOT declared: the flat `GanttConfig` spellings (the
7635-
* flatten product — {@link OBJECT_GANTT_FLAT_CONFIG_GUIDANCE}); `title`, which
7639+
* stored-document fallback — {@link OBJECT_GANTT_FLAT_CONFIG_GUIDANCE}); `title`, which
76367640
* this renderer never reads (the export-name chain is `gantt.exportFileName` →
76377641
* `label` → the OBJECT's label → `objectName`); a row cap — the reload's `$top`
76387642
* is the platform ceiling, spread in as core's `nonGridRowCeilingQuery()` (one
@@ -7643,7 +7647,7 @@ function objectGanttMarker() {
76437647
* reads, `search` and `searchableFields` (sent as `$search` / `$searchFields`),
76447648
* which `ListView` writes onto the node it generates from its toolbar Search
76457649
* box (its `case 'gantt'` arm) — a host-generated key pair in the same position
7646-
* as the flatten product, and not declared here.
7650+
* as the flat fallback spellings, and not declared here.
76477651
*
76487652
* VALUE posture: `gantt` is the one config block in this family whose value
76497653
* contract is already the SPEC's — the renderer validates it against

‎ui/packages/plugin-calendar/src/ObjectCalendar.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,8 +1470,9 @@ export const ObjectCalendar: React.FC<ObjectCalendarComponentProps> = ({
14701470
* `plugin-view`'s `ObjectView` — and app-shell reaches the first from two
14711471
* faces, `ObjectView` (the object-view door) and `InterfaceListPage` (the
14721472
* interface-page door). Every one of them hands this component the same
1473-
* shape: the shared `baseProps` bag plus whichever of `startDateField` /
1474-
* `endDateField` / `titleField` the author declared. NOTHING on the node
1473+
* shape: the shared `baseProps` bag plus a `calendar` block carrying whichever
1474+
* of `startDateField` / `endDateField` / `titleField` the author declared
1475+
* (flat on the node until objectstack#25923). NOTHING on the node
14751476
* names the door, so there is nothing to infer from, and a door PROP would
14761477
* have to be declared on the node's published schema and threaded through
14771478
* four packages.

‎ui/packages/plugin-gantt/src/ObjectGantt.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ const warnedShadowedFlatGanttKeys = new Set<string>();
583583
* Silence is what the precedence rule costs if it is not diagnosed: two
584584
* spellings of ONE vocabulary (objectui#6051 proved they are one — both derive
585585
* from `GanttConfig`) in a single schema, one of them inert. The ruling picks
586-
* the author's block over the flatten product deliberately — maintainer on
586+
* the author's block over the flat spelling deliberately — maintainer on
587587
* objectui#5018 (2026-08-17) for `plugin-map`, inherited here by objectui#6469 —
588588
* so the diagnostic names what was dropped instead of leaving the author to
589589
* infer it from a chart that renders the other spelling's values.

‎ui/packages/types/src/__tests__/calendar-flat-color-allday-8466.test.ts‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
* renderer READS the flat spelling, not that an author should write it. The
3030
* README row below pins the new teaching.
3131
*
32+
* ⚠️ Dated note, objectstack#25923 — superseded in part. The producers now hand
33+
* the binding off in the `calendar` block, the flat spelling is only a
34+
* stored-document fallback the renderer still reads, and the five flat
35+
* declarations DID move: off `ObjectCalendarSchema`, onto `plugin-calendar`'s
36+
* own hand-off type. This file now pins their absence.
37+
*
3238
* ⚠️ Dated note — objectstack#25923. The declarations this file pinned DID move
3339
* after all: the five left both published faces of `ObjectCalendarSchema`
3440
* (they are `plugin-calendar`'s package-local hand-off type now, where the one
@@ -141,8 +147,9 @@ const CALENDAR_REGISTRATION = 'packages/plugin-calendar/src/index.tsx';
141147
const CALENDAR_README = 'packages/plugin-calendar/README.md';
142148

143149
/**
144-
* The five field-name keys `getCalendarConfig` reads off the node FLAT (the
145-
* runtime handoff), and that the README authors inside the `calendar` block.
150+
* The five field-name keys `getCalendarConfig` reads off the node FLAT (a
151+
* stored-document fallback since objectstack#25923, when the producers moved to
152+
* the block), and that the README authors inside the `calendar` block.
146153
*/
147154
const FLAT_KEYS = ['titleField', 'startDateField', 'endDateField', 'allDayField', 'colorField'] as const;
148155
/** The three that were already declared — the precedent the two new ones join. */
@@ -469,10 +476,12 @@ describe('objectui#8466 — the renderer reads these keys, which is what the dec
469476
it('the README authors the five INSIDE the `calendar` block on `object-calendar`, never flat (objectui#8831)', () => {
470477
// This row used to pin the opposite — that the README taught the five flat,
471478
// "which is what makes them authorable". objectui#8831 ruled that spelling
472-
// the runtime handoff: `ComponentPropsMap['object-calendar']` refuses it and
479+
// the runtime handoff (since objectstack#25923 only a stored-document
480+
// fallback): `ComponentPropsMap['object-calendar']` refuses it and
473481
// its diagnostic prescribes the `calendar` block. So the README teaches the
474-
// block, and the declarations this file pins stay because the renderer
475-
// READS the flat spelling, not because an author should write it.
482+
// block. Since objectstack#25923 `ObjectCalendarSchema` no longer declares
483+
// the five flat at all: the renderer still READS the flat spelling, typed on
484+
// `plugin-calendar`'s own hand-off type, and no author should write it.
476485
//
477486
// Read off the authored nodes by brace matching, never by line or indent,
478487
// so a re-wrap or re-indent cannot move the verdict (objectui#8832).

‎ui/packages/types/src/__tests__/object-gantt-properties-bag-10859-b6.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* ## What is particular to this node
3434
*
3535
* - The flat mirror also declared the whole `GanttConfig` vocabulary flat on
36-
* the node (`startDateField`, `viewMode`, …, the flatten product
36+
* the node (`startDateField`, `viewMode`, …, the flat spelling
3737
* `getGanttConfig` reads when there is no `gantt` block) and the legacy
3838
* `dependencyField` alias. Each is refused by name and pointed at the
3939
* bag's `gantt` block, the home the row gives them.

‎ui/packages/types/src/objectql.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,10 @@ export type GanttConfig = SpecGanttConfig & {
315315
// The nine members below were declared ONLY in `plugin-gantt`'s package-private
316316
// `GanttConfigEx` intersection — the type `getGanttConfig` casts the `gantt`
317317
// block to. `ObjectGantt` honours every one of them on BOTH authoring faces
318-
// (the `gantt: { … }` block AND the flattened top-level spelling declared on
319-
// `ObjectGanttSchema`), and a type that lives inside the plugin can be
318+
// (the `gantt: { … }` block AND the flattened top-level spelling, declared
319+
// since objectstack#25923 on `plugin-gantt`'s own hand-off type
320+
// `ObjectGanttFlatFields`, not on `ObjectGanttSchema`), and a type that lives
321+
// inside the plugin can be
320322
// referenced by neither declaration — so the vocabulary is lifted here rather
321323
// than restated, and the two faces derive from ONE source that cannot fork.
322324
//

‎ui/packages/types/src/zod/objectql.zod.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,8 +1866,10 @@ const CALENDAR_DATE_ALIAS_STEM =
18661866
/**
18671867
* WHERE THE AUTHORED VALUE LANDS, which is what decides the consequence clause.
18681868
*
1869-
* - `'binding'` — the value reaches `ObjectCalendar` as a FLAT member of the
1870-
* node. Every producer-fed surface is this: the view-level `calendar` block
1869+
* - `'binding'` — the value reaches `ObjectCalendar` through a producer's
1870+
* hand-off (since objectstack#25923 in the node's own `calendar` block,
1871+
* before that as a FLAT member of the node). Every producer-fed surface is
1872+
* this: the view-level `calendar` block
18711873
* and its legacy `options.calendar` twin, a named view's two nestings, and
18721874
* the flat node face itself.
18731875
* - `'container'` — the `object-calendar` element's OWN `calendar` container,

0 commit comments

Comments
 (0)