From f8f9bc7742b74ee0a26e008ba75f392580e052b3 Mon Sep 17 00:00:00 2001 From: os-litant Date: Wed, 2 Sep 2026 12:25:04 +0000 Subject: [PATCH] docs(components): stop teaching #6124's retired handler keys as authorable props MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit objectui#6124 (PR #7339) split the `on*` handler keys in two: 36 runtime slots keep their function type, and 22 keys nothing reads became `?: never` tombstones with named refusal arms on the zod mirror. Ten rows across eight `content/docs` pages went on listing some of the retired 22 as callable props — a key that is now a `tsc` error to assign and a refusal by name at authoring time. The card named three pages (`api/schema-reference.md`, `data-display/tree-view.mdx`, `form/input-otp.mdx`, five rows); a whole-docs census resolving each row's `(interface, key)` pair against the shipped declaration found five more rows on five more pages — `basic/button-group.mdx` (`ButtonGroupButton.onClick`), and `.onChange` on `form/calendar.mdx`, `form/combobox.mdx`, `form/command.mdx`, `form/radio-group.mdx`. A key NAME cannot decide this: `onChange` is retired on 8 schemas and live on 14, and `input-otp.mdx` carries both dispositions one line apart. Seven pages have the retired rows REMOVED. `basic/button-group.mdx` is the one "marked retired" page and not by taste: `button-group-doc-surface-6347` asserts set equality between that page's `ButtonGroupButton` block and the mirror's `.shape`, and a refusal arm is still a key of that shape, so the row must stay — spelled `never`, with the node-type pointer the tombstone JSDoc uses. That sibling pin's `onClick` case is updated to read the mirror's refusal instead of restating the now-stale `() => void`. The new pin measures the retired population off `packages/types/src` rather than hand-listing it, flags rows (not prose), and carries six runtime-slot rows as the blanket-sweep control — two of them on pages this change edits. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01NRRumy89BYdW9ogbcdHTho --- .changeset/7340-docs-retired-handler-keys.md | 17 + content/docs/api/schema-reference.md | 2 - .../docs/components/basic/button-group.mdx | 3 +- .../components/data-display/tree-view.mdx | 4 +- content/docs/components/form/calendar.mdx | 3 - content/docs/components/form/combobox.mdx | 3 - content/docs/components/form/command.mdx | 3 - content/docs/components/form/input-otp.mdx | 1 - content/docs/components/form/radio-group.mdx | 3 - .../button-group-doc-surface-6347.test.ts | 28 +- ...ent-docs-retired-handler-keys-7340.test.ts | 383 ++++++++++++++++++ 11 files changed, 426 insertions(+), 24 deletions(-) create mode 100644 .changeset/7340-docs-retired-handler-keys.md create mode 100644 packages/types/src/__tests__/component-docs-retired-handler-keys-7340.test.ts diff --git a/.changeset/7340-docs-retired-handler-keys.md b/.changeset/7340-docs-retired-handler-keys.md new file mode 100644 index 0000000000..565c5caa64 --- /dev/null +++ b/.changeset/7340-docs-retired-handler-keys.md @@ -0,0 +1,17 @@ +--- +--- + +Docs-only: ten rows across eight `content/docs` pages still listed one of +objectui#6124's 22 RETIRED `on*` handler keys as a callable prop, after PR +#7339 turned those keys into `?: never` tombstones with named refusal arms on +the zod mirror. Seven pages have the rows removed; +`components/basic/button-group.mdx` keeps its `ButtonGroupButton.onClick` row +spelled `never` with the node-type pointer, because +`button-group-doc-surface-6347.test.ts` asserts set equality between that block +and the mirror's `.shape` and a refusal arm is still a key of that shape. A new +test-only pin +(`packages/types/src/__tests__/component-docs-retired-handler-keys-7340.test.ts`) +measures the retired population off `packages/types/src` and holds every doc row +whose `(interface, key)` pair resolves to a tombstone to the `never` spelling, +with six runtime-slot rows as the blanket-sweep control (objectui#7340). No +published package behaviour changes. diff --git a/content/docs/api/schema-reference.md b/content/docs/api/schema-reference.md index d4207cb9ca..7dd7b7d638 100644 --- a/content/docs/api/schema-reference.md +++ b/content/docs/api/schema-reference.md @@ -923,8 +923,6 @@ A drag-and-drop Kanban board with columns and cards. | `draggable` | `boolean` | Enable drag-and-drop between columns. | | `onCardMove` | `function` | Callback when a card is moved: `(cardId, fromColumn, toColumn, position)`. | | `onCardClick` | `function` | Callback when a card is clicked. | -| `onColumnAdd` | `function` | Callback when a new column is added. | -| `onCardAdd` | `function` | Callback when a new card is added to a column. | **Related:** [ObjectViewSchema](#objectviewschema), [ObjectGridSchema](#objectgridschema) diff --git a/content/docs/components/basic/button-group.mdx b/content/docs/components/basic/button-group.mdx index 71de2f2eb4..77d2f9bcc0 100644 --- a/content/docs/components/basic/button-group.mdx +++ b/content/docs/components/basic/button-group.mdx @@ -26,7 +26,8 @@ interface ButtonGroupButton { variant?: 'default' | 'secondary' | 'destructive' | 'outline' | 'ghost' | 'link'; size?: 'default' | 'sm' | 'lg' | 'icon'; disabled?: boolean; // Whether this button is disabled - onClick?: () => void; // Runtime handler; not authorable in JSON + onClick?: never; // RETIRED (objectui#6124) — author behaviour + // as a node type, e.g. an action:button node className?: string; // Per-button CSS class } diff --git a/content/docs/components/data-display/tree-view.mdx b/content/docs/components/data-display/tree-view.mdx index 91b90a055d..6d3b17cc91 100644 --- a/content/docs/components/data-display/tree-view.mdx +++ b/content/docs/components/data-display/tree-view.mdx @@ -43,9 +43,7 @@ interface TreeViewSchema { showLines?: boolean; // Show connecting lines (default: true) // Events - onSelectChange?: (selectedIds: string[]) => void; // Selection change handler - onExpandChange?: (expandedIds: string[]) => void; // Expand change handler - onNodeClick?: (node: TreeNode) => void; // Node click handler + onNodeClick?: (node: TreeNode) => void; // Node click handler // Styling className?: string; // Tailwind CSS classes diff --git a/content/docs/components/form/calendar.mdx b/content/docs/components/form/calendar.mdx index b86f54454a..c0e0213976 100644 --- a/content/docs/components/form/calendar.mdx +++ b/content/docs/components/form/calendar.mdx @@ -38,9 +38,6 @@ interface CalendarSchema { maxDate?: Date | string; // Maximum selectable date disabled?: boolean | string; // boolean, or a predicate expression - // Events - onChange?: (date: Date | Date[] | undefined) => void; // Date change handler - // Styling className?: string; // Tailwind CSS classes diff --git a/content/docs/components/form/combobox.mdx b/content/docs/components/form/combobox.mdx index a792335541..ac3713b0fb 100644 --- a/content/docs/components/form/combobox.mdx +++ b/content/docs/components/form/combobox.mdx @@ -38,9 +38,6 @@ interface ComboboxSchema { // Text placeholder?: string; // Button placeholder - // Events - onChange?: (value: string) => void; - // States disabled?: boolean | string; // boolean, or a predicate expression diff --git a/content/docs/components/form/command.mdx b/content/docs/components/form/command.mdx index 818d001722..b9ee3ed166 100644 --- a/content/docs/components/form/command.mdx +++ b/content/docs/components/form/command.mdx @@ -37,9 +37,6 @@ interface CommandSchema { groups: CommandGroup[]; // Command groups emptyText?: string; // Text when no results - // Events - onChange?: (value: string) => void; - // Styling className?: string; } diff --git a/content/docs/components/form/input-otp.mdx b/content/docs/components/form/input-otp.mdx index 0598b05721..d68079ad04 100644 --- a/content/docs/components/form/input-otp.mdx +++ b/content/docs/components/form/input-otp.mdx @@ -33,7 +33,6 @@ interface InputOTPSchema { // Events onChange?: (value: string) => void; - onComplete?: (value: string) => void; // States disabled?: boolean | string; // boolean, or a predicate expression diff --git a/content/docs/components/form/radio-group.mdx b/content/docs/components/form/radio-group.mdx index dab355e15c..2b28b631f7 100644 --- a/content/docs/components/form/radio-group.mdx +++ b/content/docs/components/form/radio-group.mdx @@ -46,9 +46,6 @@ interface RadioGroupSchema { // Layout orientation?: 'horizontal' | 'vertical'; - // Events - onChange?: (value: string | number) => void; - // States disabled?: boolean | string; // boolean, or a predicate expression diff --git a/packages/types/src/__tests__/button-group-doc-surface-6347.test.ts b/packages/types/src/__tests__/button-group-doc-surface-6347.test.ts index 684c9b6478..a77366b3b5 100644 --- a/packages/types/src/__tests__/button-group-doc-surface-6347.test.ts +++ b/packages/types/src/__tests__/button-group-doc-surface-6347.test.ts @@ -39,6 +39,17 @@ * subset the card enumerated. A one-directional pin is what let the omissions * sit beside the corrections through two earlier passes over these pages. * + * ⚠️ `.onClick` is in that UNDER-stated list as HISTORY. objectui#6124 (PR + * #7339, ruling of 2026-08-30) RETIRED the key: the `button-group` renderer + * renders each `