Skip to content

spec(ui): ComponentPropsMap constrains the sort value of object-calendar and object-grid to the array shape — today it accepts an array, a string and a bare number alike #16553

Description

@os-zhuang

Filed by the director seat on the objectui#8221 ruling (decision batch #77, 2026-09-07 — option B: one sort spelling, the array; the legacy string form is retired from @object-ui/core).

Measured (objectui#8221, on @objectstack/spec 17.2.0)

  • element-record-picker's spec constrains sort to the array of { field, order } and refuses a string — the in-code comment at objectui record-picker.tsx:412-419 records that measurement.
  • object-calendar and object-grid: ComponentPropsMap does not constrain the value of sort at all — an array, a string and a bare number all return success: true, while bogusProp is refused by name on the same call (control). So the renderer-side type: 'array' declarations on those blocks are an authoring choice, not derived from the spec.

What this card does

Declare the sort value on object-calendar and object-grid in ComponentPropsMap as the same array-of-{ field, order } shape element-record-picker already uses (one shared schema, not three copies), so the spec, the seven objectui registrations and convertSortToQueryParams agree on one spelling. Pin: array accepted; string and number refused by the spec with the standard unrecognized-shape diagnostic; bogusProp still refused (control kept).

Clause-②: no — this narrows an accept set back to the declared contract (the string was never a declared sort shape on these blocks; it was an unconstrained value). Ordinary tier. @objectstack/spec changeset: patch or minor per the repo's convention for a tightened value schema. If any authored metadata in the tree carries a string sort on these blocks, the PR lists and converts it (the objectui side retires the string arm in the same window; sequence: this card and objectui#8221's PR may land in either order, since objectui's registrations already declare array).

Refs: objectui#8221 (ruling) · objectui#8171 · objectui#7712.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions