Skip to content

Commit b19b41e

Browse files
os-billclaude
andcommitted
docs(spec): regenerate the ui component reference; keep the issue id out of customer text
`check:doc-authoring` refuses an internal issue id in `.describe()` prose — it projects into `content/docs/references/**` and the generated skill artifacts, where `#NNNN` resolves to nothing. Both `sort` describes now cite the migration id instead, which a reader can act on. Claude-Session: https://claude.ai/code/session_01MkQhmuuJAVDjmeWNixwDDH Co-authored-by: Claude <noreply@anthropic.com>
1 parent 99097e8 commit b19b41e

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

content/docs/references/ui/component.mdx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ Sort field and direction pair
312312
| **calendar** | `any` | optional | Calendar field config: `{ startDateField, endDateField?, titleField?, colorField?, allDayField? }` |
313313
| **defaultView** | `Enum<'month' \| 'week' \| 'day'>` | optional | Initial view mode |
314314
| **filter** | `{ field: string; operator: Enum<'equals' \| 'not_equals' \| 'contains' \| 'not_contains' \| 'icontains' \| …>; value?: string \| number \| boolean \| null \| (string \| number)[] }[]` | optional | Base query filter — the ViewFilterRule array form `[{ field, operator, value }, ...]`, the one filter orthography every `filter` door in this map shares. The MongoDB-style record form is refused — see migration `element-data-source-and-object-block-filter-rule-array` |
315-
| **sort** | `any` | optional | Sort for the fetched events |
315+
| **sort** | `{ field: string; order: Enum<'asc' \| 'desc'> }[]` | optional | Row order for the fetched events — the SortItem array form `[{ field, order }, ...]`, the one sort orthography every declared `sort` door on this platform shares; lowered to the wire `$orderby`. The legacy string clause (`name desc`) is refused — see migration `object-block-sort-item-array` |
316316
| **data** | `any[]` | optional | Pre-fetched records — skips the internal fetch |
317317
| **staticData** | `any[]` | optional | Static inline records |
318318
| **locale** | `string` | optional | Locale override for the calendar chrome |
@@ -328,6 +328,15 @@ View filter rule
328328
| **operator** | `Enum<'equals' \| 'not_equals' \| 'contains' \| 'not_contains' \| 'icontains' \| …>` || Filter operator |
329329
| **value** | `string \| number \| boolean \| null \| (string \| number)[]` | optional | Filter value. The accepted SHAPE depends on the operator: `in` / `not_in` take an array (any length, including []), `between` takes exactly [min, max], every other operator takes a scalar. The unary operators (is_empty / is_not_empty / is_null / is_not_null) take their direction from the operator name and ignore this key. |
330330

331+
### Nested Shape: `ObjectCalendarProps.sort[number]`
332+
333+
Sort field and direction pair
334+
335+
| Property | Type | Required | Description |
336+
| :--- | :--- | :--- | :--- |
337+
| **field** | `string` || Field name to sort by |
338+
| **order** | `Enum<'asc' \| 'desc'>` || Sort direction |
339+
331340

332341
---
333342

@@ -393,7 +402,7 @@ View filter rule
393402
| **fields** | `any[]` | optional | Field list fallback used when `columns` is absent |
394403
| **filter** | `{ field: string; operator: Enum<'equals' \| 'not_equals' \| 'contains' \| 'not_contains' \| 'icontains' \| …>; value?: string \| number \| boolean \| null \| (string \| number)[] }[]` | optional | Base query filter — the ViewFilterRule array form `[{ field, operator, value }, ...]`, the one filter orthography every `filter` door in this map shares; lowered to the wire `$filter`. THE key, singular — not the plural misspelling. The MongoDB-style record form is refused — see migration `element-data-source-and-object-block-filter-rule-array` |
395404
| **defaultFilters** | `any` | optional | Legacy base-filter fallback, read only when `filter` is absent. Prefer `filter` |
396-
| **sort** | `any` | optional | Initial sort (array of `{ field, order }`) |
405+
| **sort** | `{ field: string; order: Enum<'asc' \| 'desc'> }[]` | optional | Initial row order — the SortItem array form `[{ field, order }, ...]`, the one sort orthography every declared `sort` door on this platform shares; lowered to the wire `$orderby`. The legacy string clause (`name desc`) is refused — see migration `object-block-sort-item-array` |
397406
| **defaultSort** | `never` | optional | [REMOVED] `object-grid` property `defaultSort` was removed in @objectstack/spec 17 (ADR-0049) — it was the legacy second spelling of `sort`: a single `{ field, order }` pair read only when `sort` was absent, so one intent had two spellings and a grid authoring both silently ignored this one. Rename the key to `sort` and wrap the value in an array (`defaultSort: { field, order }` becomes `sort: [{ field, order }]`); the pair itself is unchanged. Run `os migrate meta --from 17` to list the mechanical edits for existing sources; apply them by hand. |
398407
| **pagination** | `any` | optional | Pagination config (`{ pageSize, pageSizeOptions, … }`); its presence enables paging |
399408
| **pageSize** | `number` | optional | Flat page-size shorthand; `pagination.pageSize` wins when both are set |
@@ -434,6 +443,15 @@ View filter rule
434443
| **operator** | `Enum<'equals' \| 'not_equals' \| 'contains' \| 'not_contains' \| 'icontains' \| …>` || Filter operator |
435444
| **value** | `string \| number \| boolean \| null \| (string \| number)[]` | optional | Filter value. The accepted SHAPE depends on the operator: `in` / `not_in` take an array (any length, including []), `between` takes exactly [min, max], every other operator takes a scalar. The unary operators (is_empty / is_not_empty / is_null / is_not_null) take their direction from the operator name and ignore this key. |
436445

446+
### Nested Shape: `ObjectGridProps.sort[number]`
447+
448+
Sort field and direction pair
449+
450+
| Property | Type | Required | Description |
451+
| :--- | :--- | :--- | :--- |
452+
| **field** | `string` || Field name to sort by |
453+
| **order** | `Enum<'asc' \| 'desc'>` || Sort direction |
454+
437455
### Nested Shape: `ObjectGridProps.data[provider='object']`
438456

439457
| Property | Type | Required | Description |

packages/spec/src/ui/component.zod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2523,7 +2523,7 @@ export const ObjectGridPropsSchema = lazySchema(() => strictObject({
25232523
* array shape and not the string.
25242524
*/
25252525
sort: z.array(SortItemSchema).optional()
2526-
.describe('Initial row order — the SortItem array form `[{ field, order }, ...]`, the one sort orthography every declared `sort` door on this platform shares; lowered to the wire `$orderby`. The legacy string clause (`name desc`) is refused — objectui#8221 decision batch #77, option B, retired it'),
2526+
.describe('Initial row order — the SortItem array form `[{ field, order }, ...]`, the one sort orthography every declared `sort` door on this platform shares; lowered to the wire `$orderby`. The legacy string clause (`name desc`) is refused — see migration `object-block-sort-item-array`'),
25272527
/**
25282528
* REMOVED (#11805, maintainer ruling 2026-08-25, decision-inbox batch 4:
25292529
* 「#11805 退役 defaultSort,不需要major」 — the ADR-0049 enforce-or-remove
@@ -2892,7 +2892,7 @@ export const ObjectCalendarPropsSchema = lazySchema(() => strictObject({
28922892
* no `sort` input at all, so nothing on the registry side moves.
28932893
*/
28942894
sort: z.array(SortItemSchema).optional()
2895-
.describe('Row order for the fetched events — the SortItem array form `[{ field, order }, ...]`, the one sort orthography every declared `sort` door on this platform shares; lowered to the wire `$orderby`. The legacy string clause (`name desc`) is refused — objectui#8221 decision batch #77, option B, retired it'),
2895+
.describe('Row order for the fetched events — the SortItem array form `[{ field, order }, ...]`, the one sort orthography every declared `sort` door on this platform shares; lowered to the wire `$orderby`. The legacy string clause (`name desc`) is refused — see migration `object-block-sort-item-array`'),
28962896
data: z.array(z.unknown()).optional().describe('Pre-fetched records — skips the internal fetch'),
28972897
staticData: z.array(z.unknown()).optional().describe('Static inline records'),
28982898
locale: z.string().optional().describe('Locale override for the calendar chrome'),

0 commit comments

Comments
 (0)