Measured while fixing #4624 (PR #4630). Filed unassigned. Duplicate-searched (keyword + ToggleGroupItem + the renderer path): no open issue covers it.
The finding
packages/types/src/disclosure.ts:131 declares an icon slot on toggle-group items:
export interface ToggleGroupItem {
value: string;
label: string;
icon?: string;
disabled?: boolean;
}
The renderer never reads it. packages/components/src/renderers/disclosure/toggle-group.tsx:33-37 maps items to:
{schema.items?.map((item, idx) => (
{/* value and aria-label and label only */}
))}
Grepping icon across both that renderer and packages/components/src/ui/toggle-group.tsx returns nothing. disabled is declared and unread there too.
Impact
Dormant rather than breaking: an author who declares icon gets a correctly rendered toggle group with the icon silently dropped. Nothing goes red and nothing is misreported.
Concretely, examples/schema-catalog/src/schemas/components-disclosure-toggle-group/with-labels.json authors icon on all three items. PR #4630 fixes that entry's root type and deliberately KEEPS the icon keys, because they are declared fields rather than the entry inventing something — but the catalog is the corpus AI authoring tools retrieve from, so it is currently teaching a key that does nothing.
Options
- Implement it — render the icon alongside the label in
ToggleGroupItem.
- Retire the declaration if there is no business pull for icon-bearing toggle items.
Either resolves it; leaving a declared-but-unread field is the state worth not keeping. Related class: #4631.
Refs #4624, PR #4630.
Generated by Claude Code
Measured while fixing #4624 (PR #4630). Filed unassigned. Duplicate-searched (keyword +
ToggleGroupItem+ the renderer path): no open issue covers it.The finding
packages/types/src/disclosure.ts:131declares an icon slot on toggle-group items:The renderer never reads it.
packages/components/src/renderers/disclosure/toggle-group.tsx:33-37maps items to:Grepping
iconacross both that renderer andpackages/components/src/ui/toggle-group.tsxreturns nothing.disabledis declared and unread there too.Impact
Dormant rather than breaking: an author who declares
icongets a correctly rendered toggle group with the icon silently dropped. Nothing goes red and nothing is misreported.Concretely,
examples/schema-catalog/src/schemas/components-disclosure-toggle-group/with-labels.jsonauthorsiconon all three items. PR #4630 fixes that entry's root type and deliberately KEEPS theiconkeys, because they are declared fields rather than the entry inventing something — but the catalog is the corpus AI authoring tools retrieve from, so it is currently teaching a key that does nothing.Options
ToggleGroupItem.Either resolves it; leaving a declared-but-unread field is the state worth not keeping. Related class: #4631.
Refs #4624, PR #4630.
Generated by Claude Code