diff --git a/.changeset/stale-gantt-viewmode-doc.md b/.changeset/stale-gantt-viewmode-doc.md new file mode 100644 index 0000000000..c70b661cc2 --- /dev/null +++ b/.changeset/stale-gantt-viewmode-doc.md @@ -0,0 +1,11 @@ +--- +'@object-ui/plugin-gantt': patch +--- + +Fix the `GanttViewMode` JSDoc to name all five granularities (objectui#5132). + +The comment above `export type GanttViewMode` said "one column per day, week, +month, or quarter" while the type itself, `VIEW_MODES`, `NOMINAL_DAYS` +(`year: 365.25`), the column builder, the toolbar and the header-band logic +have honored a fifth member, `'year'`, all along — `'year'` was fully live, +just undocumented. Doc-only change, no behavior difference. diff --git a/packages/plugin-gantt/src/GanttView.tsx b/packages/plugin-gantt/src/GanttView.tsx index 5ddb9f1f6b..6bd4c4cc0d 100644 --- a/packages/plugin-gantt/src/GanttView.tsx +++ b/packages/plugin-gantt/src/GanttView.tsx @@ -193,7 +193,7 @@ export interface GanttTask { hasOwnDates?: boolean } -/** Timeline granularity — one column per day, week, month, or quarter. */ +/** Timeline granularity — one column per day, week, month, quarter, or year. */ export type GanttViewMode = 'day' | 'week' | 'month' | 'quarter' | 'year'; const VIEW_MODES: GanttViewMode[] = ['day', 'week', 'month', 'quarter', 'year']; diff --git a/scripts/check-doc-component-types.mjs b/scripts/check-doc-component-types.mjs index 4363e46942..2a88fdf458 100644 --- a/scripts/check-doc-component-types.mjs +++ b/scripts/check-doc-component-types.mjs @@ -326,8 +326,8 @@ const DOC_TYPE_EXEMPTIONS = { 'vocabulary (`SelectionConfigSchema`, @objectstack/spec/ui), not a node type.', }, 'content/docs/plugins/plugin-report.mdx': { - matrix: 'ReportInput kind — a report definition\'s shape, sibling of `joined` / `summary`.', - joined: 'ReportInput kind — a report definition\'s shape, sibling of `matrix` / `summary`.', + matrix: 'ReportSchema.type kind — a report definition\'s shape, sibling of `joined` / `summary`.', + joined: 'ReportSchema.type kind — a report definition\'s shape, sibling of `matrix` / `summary`.', }, 'content/docs/utilities/runner.mdx': { 'my-component':