Skip to content

Commit a98bd13

Browse files
os-zhuangclaude
andauthored
docs(skills): teach adaptive record presentation in objectstack-ui skill (#2578) (#2599)
Add a "Record Presentation — surface, width & columns are auto-derived" section to the objectstack-ui authoring skill. Nothing in the docs taught the deprecated primitives, but the new model (all metadata is AI-authored) was untaught: surface (page vs drawer), overlay width and column count are runtime-derived, so authors write fields + fieldGroups and never author presentation. Teaches span over colSpan, the size bucket over pixel width, and navigation.mode / a Page only as an override. Empty changeset (docs-only, no package release). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent d13dc5c commit a98bd13

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
docs(skills): teach adaptive record presentation (surface/width/columns auto-derived) in the objectstack-ui skill (#2578)

skills/objectstack-ui/SKILL.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,38 @@ export const TaskWorkbenchPage = definePage({
614614

615615
---
616616

617+
## Record Presentation — surface, width & columns are auto-derived
618+
619+
A record's create / edit / detail **presents itself adaptively**. You do **not**
620+
author the surface, the overlay width, or the column count — all three are derived
621+
at runtime from how heavy the record is + the client viewport, because an author
622+
(especially an AI) cannot know the client's screen. **Write the data (fields,
623+
`fieldGroups`); let the platform lay it out.**
624+
625+
- **Surface (page vs drawer).** Derived from field count: a field-heavy object
626+
opens create/edit/detail as a **full page**; a light one as a **drawer**. Mobile
627+
always pages. Don't set it. To force it for a specific object, set
628+
`navigation.mode` (`page` | `drawer` | `modal`) on the list view (or object) — or,
629+
for bespoke layout, assign a record `Page` (below).
630+
- **Field width.** Use the relative **`span: 'full'`** to make a field take the
631+
whole row; otherwise **omit it** (`auto` sizes by widget type × current columns —
632+
textarea / rich-text / file take the row automatically). Do **not** use the
633+
absolute `colSpan` — it only lines up at one width and is deprecated.
634+
- **Overlay width.** Never author pixels. If you must nudge, use the **`size`**
635+
bucket (`sm` | `md` | `lg` | `xl` | `full`) on `navigation`; the pixel
636+
`width` / `drawerWidth` are deprecated (they can't be chosen without knowing the
637+
client viewport).
638+
- **Column count.** Not authored. The form grid follows its **real rendered width**
639+
via container queries — the same form is 1 column in a narrow drawer and up to 4
640+
on a wide page. Author *grouping* with `fieldGroups` + `Field.group`; the columns
641+
adapt themselves.
642+
643+
> **Rule of thumb: presentation (surface / width / columns) is not metadata.**
644+
> Write fields + semantic roles; the renderer decides the pixels. Reach for
645+
> `navigation.mode` / `size` / a `Page` only to *override* — never as the default.
646+
647+
---
648+
617649
## Pages — Lightning-Style Page Layouts
618650

619651
A **Page** is a Salesforce-Lightning-style layout composed of **regions**

0 commit comments

Comments
 (0)