Skip to content

Docs gallery: the six components-form-calendar entries author the bare "calendar" keyword, which belongs to plugin-calendar's ObjectCalendar #4625

Description

@yinlianghui

Measured while implementing #4616 (the gallery registration widening). Filed unassigned; not fixed there — the ruling on that card scopes it to registration and has entry-shape defects censused and filed rather than rewritten. Duplicate-searched (keyword + ui:calendar / skipFallback / the category path): no open issue covers it.

The defect

All six entries under examples/schema-catalog/src/schemas/components-form-calendar/ author the date-picker primitive as the bare keyword:

{ "type": "calendar", "mode": "single", "className": "rounded-md border" }

But packages/components/src/renderers/form/calendar.tsx deliberately registers that primitive under ui:calendar onlyskipFallback: true, with the reason in the file:

// `calendar` collides with the plugin-calendar full CRUD calendar VIEW,
// which owns the bare `type: 'calendar'` schema keyword; this date-picker
// primitive is reached via `ui:calendar` only.

So the bare keyword resolves to @object-ui/plugin-calendar's ObjectCalendar, which is a data-bound event calendar. The entries carry no data source, so it throws its own guard (packages/plugin-calendar/src/ObjectCalendar.tsx:282).

Measured, rendering all 423 entries the way the gallery does

One red tile for another — the registration widening cannot help this category, which is why these six are named as an explicit exclusion, with this issue number, in examples/schema-catalog/test/catalog-gallery-render.test.tsx.

Affected: custom-style, date-range, form-integration, multiple-dates, simple-calendar, single-date. (form-integration is a div whose child is the offending node, so its root type resolves and only the nested one does not.)

Fix shape (not prescriptive — there is a real question here)

Mechanically the fix is "type": "ui:calendar" in six files. The question worth answering first is whether this category should demo the primitive at all: the catalog is the corpus AI authoring tools retrieve from, and an entry teaching the namespaced spelling of a keyword whose bare form means something else is a different teaching decision from dropping the category. Related: whether the bare/namespaced split is discoverable enough at authoring time, given that the only signal today is a comment in the renderer.

Refs #4616, PR #4615.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions