Skip to content

Commit 25a73f4

Browse files
committed
fix(plugin-calendar,plugin-gantt): grade the fallback retirement patch, name the item-1 sentences it supersedes, drop an unused import
Metadata-protocol none takes patch under ruling A. This PR's changeset now names the sentences of the item-1 changeset that the retirement makes false, in the same release, instead of editing that note. One calendar test title now matches its block-authored body, and ObjectCalendar.tsx no longer imports ObjectCalendarBlockConfig, which only the removed hand-off types used (the Lint UI error). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzevL8Q6rTfGz2XHXGT
1 parent 6001470 commit 25a73f4

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎.changeset/25923-calendar-gantt-flat-fallback-retired.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
'@object-ui/plugin-calendar': minor
3-
'@object-ui/plugin-gantt': minor
2+
'@object-ui/plugin-calendar': patch
3+
'@object-ui/plugin-gantt': patch
44
'@objectstack/spec': patch
55
---
66

@@ -17,6 +17,8 @@ Metadata-protocol: none
1717
- **`@object-ui/plugin-gantt`**: `getGanttConfig` reads the `gantt` block only. A node that writes its `GanttConfig` keys flat, with no block, shows the "Gantt configuration required" screen, which now names the `gantt` block, and in development a warning names every flat key the chart did not read, with or without a block beside it. The legacy singular `dependencyField` is read nowhere (the spec spells it `dependenciesField`, inside the block). The package-local `ObjectGanttFlatFields` type is gone; `ObjectGanttProps['schema']` keeps the two search keys `ListView` writes at runtime, now on `ObjectGanttSearchFields`.
1818
- **`@objectstack/spec`**: the `object-calendar` and `object-gantt` flat-key refusals no longer say the renderer still reads the flat spelling. The prescription is unchanged: write the keys in the `calendar` / `gantt` block.
1919

20+
**Supersedes, in the same release:** `25923-calendar-gantt-flat-keys-handoff.md` (the earlier slice of #25923) says the calendar and gantt renderers are unchanged and still read the flat spelling a host hands them, that `ObjectCalendarProps['schema']` and `ObjectGanttProps['schema']` carry the flat keys, and that the spec refusals call the flat spelling a fallback the renderer still reads. This change retires that read, so those sentences no longer hold: the renderers read the block only, the props types carry no flat binding key, and the refusals no longer say it.
21+
2022
**BREAKING** for code that mounts `<ObjectCalendar>` or `<ObjectGantt>` with a flat node.
2123

2224
- **Before.** `<ObjectGantt schema={{ type: 'object-gantt', objectName: 'task', startDateField: 's', endDateField: 'e' }} />` drew a chart, and the flat keys compiled against `ObjectGanttProps['schema']`.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*/
2424

2525
import React, { useEffect, useState, useCallback, useMemo, useRef } from 'react';
26-
import type { ObjectCalendarSchema, ObjectCalendarBlockConfig, DataSource, CalendarConfig } from '@object-ui/types';
26+
import type { ObjectCalendarSchema, DataSource, CalendarConfig } from '@object-ui/types';
2727
import { CalendarView, type CalendarViewEvent } from './CalendarView';
2828
import { getVisibleDateRange } from './visibleDays';
2929
import { usePullToRefresh } from '@object-ui/mobile';

‎ui/packages/plugin-calendar/src/__tests__/objectCalendarConfigMembers-8071.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ describe('object-calendar.calendar — member shape (objectui#8071 slice 5)', ()
169169
expect(event.end).toBeUndefined();
170170
});
171171

172-
it('CONTROL: with no `calendar` object authored, the flat legacy spelling is read instead', async () => {
172+
it('CONTROL: a `calendar` object with no flat sibling is read as authored', async () => {
173173
const [event] = await eventsFor({
174174
calendar: {
175175
startDateField: 'other_start',

0 commit comments

Comments
 (0)