Skip to content

Commit d3595d9

Browse files
os-zhuangclaude
andauthored
docs(spec): scrub stale compactLayout teachings + orphaned defaultDetailForm JSDoc (ADR-0085 remnants) (#2530)
Follow-up to the ADR-0085 hand-written docs sweep (#2529) — these two remnants live in code and regenerate into docs: - RecordDetailsProps layout/fields descriptions taught the deprecated compactLayout name; now teach the canonical highlightFields (compactLayout remains a supported alias). Regenerated react-blocks contract + reference md. - Removed an orphaned JSDoc block for defaultDetailForm in object.zod.ts — the prop was never implemented and was removed from the spec in #2402. Doc-text only; no schema shape or behavior change. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 53d491a commit d3595d9

5 files changed

Lines changed: 20 additions & 17 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/spec': patch
3+
---
4+
5+
Clean up two stale code-side doc remnants found during the ADR-0085 docs sweep (#2529):
6+
7+
- `RecordDetailsProps` (ui/component.zod.ts) `layout`/`fields` descriptions taught the
8+
deprecated `compactLayout` name — now teach the ADR-0085 canonical `highlightFields`
9+
(`compactLayout` remains a supported alias). Regenerated
10+
`skills/objectstack-ui/{contracts/react-blocks.contract.json,references/react-blocks.md}`.
11+
- Removed an orphaned JSDoc block in data/object.zod.ts describing `defaultDetailForm`,
12+
a prop that was never implemented and was removed from the spec in #2402.
13+
14+
Doc-text only; no schema shape or behavior change.

packages/spec/src/data/object.zod.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -650,17 +650,6 @@ const ObjectSchemaBase = z.object({
650650
listViews: z.record(z.string(), ListViewSchema).optional().describe('Built-in named list views (segmented tabs) shipped with the object schema'),
651651

652652
/**
653-
* Default FormView used when displaying a single record's detail page.
654-
*
655-
* Matches the named FormView under the same object's `ViewSchema.formViews`.
656-
* When unset, the runtime falls back to the unnamed `form` view, then to
657-
* an auto-generated layout. This is the Airtable-style "Interface form"
658-
* binding — every record-detail screen renders through a FormView, so the
659-
* same metadata drives both the public collection form and the operator's
660-
* edit panel.
661-
*/
662-
663-
/**
664653
* Search Engine Config
665654
*/
666655
searchableFields: z.array(z.string()).optional().describe('Fields the `$search` query matches against (ADR-0061). Canonical default for the record picker, list quick-search and global search; views may narrow it. When unset, search auto-defaults to the name/title field plus short-text fields.'),

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ export const PageCardProps = z.object({
6161

6262
export const RecordDetailsProps = z.object({
6363
columns: z.enum(['1', '2', '3', '4']).default('2').describe('Number of columns for field layout (1-4)'),
64-
layout: z.enum(['auto', 'custom']).default('auto').describe('Layout mode: auto uses object compactLayout, custom uses explicit sections'),
64+
layout: z.enum(['auto', 'custom']).default('auto').describe('Layout mode: auto uses object highlightFields, custom uses explicit sections'),
6565
sections: z.array(z.string()).optional().describe('Section IDs to show (required when layout is "custom")'),
66-
fields: z.array(z.string()).optional().describe('Explicit field list to display (optional, overrides compactLayout)'),
66+
fields: z.array(z.string()).optional().describe('Explicit field list to display (optional, overrides highlightFields)'),
6767
/** ARIA accessibility */
6868
aria: AriaPropsSchema.optional().describe('ARIA accessibility attributes'),
6969
});

skills/objectstack-ui/contracts/react-blocks.contract.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@
396396
"type": "'auto' | 'custom'",
397397
"kind": "data",
398398
"required": true,
399-
"description": "Layout mode: auto uses object compactLayout, custom uses explicit sections"
399+
"description": "Layout mode: auto uses object highlightFields, custom uses explicit sections"
400400
},
401401
{
402402
"name": "sections",
@@ -410,7 +410,7 @@
410410
"type": "string[]",
411411
"kind": "data",
412412
"required": false,
413-
"description": "Explicit field list to display (optional, overrides compactLayout)"
413+
"description": "Explicit field list to display (optional, overrides highlightFields)"
414414
}
415415
]
416416
},

skills/objectstack-ui/references/react-blocks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ Field-detail panel for the bound record. Config props from the spec RecordDetail
8989
| `objectName` | `string` | binding | | The record’s object. |
9090
| `recordId` | `string \| number` | controlled | | The record to show. |
9191
| `columns` | `'1' \| '2' \| '3' \| '4'` | data || Number of columns for field layout (1-4) |
92-
| `layout` | `'auto' \| 'custom'` | data || Layout mode: auto uses object compactLayout, custom uses explicit sections |
92+
| `layout` | `'auto' \| 'custom'` | data || Layout mode: auto uses object highlightFields, custom uses explicit sections |
9393
| `sections` | `string[]` | data | | Section IDs to show (required when layout is "custom") |
94-
| `fields` | `string[]` | data | | Explicit field list to display (optional, overrides compactLayout) |
94+
| `fields` | `string[]` | data | | Explicit field list to display (optional, overrides highlightFields) |
9595

9696
## `<RecordHighlights>``record:highlights`
9797

0 commit comments

Comments
 (0)