Skip to content

Commit ffbade1

Browse files
os-zhuangclaude
andauthored
docs(builder-ui): draft-vs-preview semantics for the Data Form view (#2523)
Codify the decision: 布局 renders the DRAFT at the metadata level (no data SQL — safe by construction while draft DDL hasn't landed); 预览 renders the PUBLISHED runtime ObjectForm on purpose (structural draft changes have no physical columns until publish; publishing stays a deliberate user action, and the UI says so when unpublished changes exist). Data-bound draft preview = deferred (DDL-timing decision, not a rendering feature). Also refresh the Data pillar's Built-so-far (Form view + package-level publish landed) and Still-to-build lists. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 60b0c87 commit ffbade1

1 file changed

Lines changed: 26 additions & 5 deletions

File tree

docs/design/builder-ui.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,32 @@ union of six declarative rule types (`packages/spec/src/data/validation.zod.ts`)
242242
name field / compact / search). Relationships via the `lookup` field type.
243243
- **Built so far** (2026-07): owned-objects rail · `Records` grid with inline data,
244244
add-column / add-field, drag-reorder columns, and the reused object/field inspector
245-
(field-level required · unique · options · default · help). Draft → publish wired.
246-
- **Still to build** (v1 gap — the facet tabs never landed): left-rail **search + New
247-
object** · the `Fields` **form-style layout designer** · the `Validations` **rules
248-
list + condition builder** · the object **`Settings`** facet. These are the
249-
Phase-B build (tracked against this doc); each reuses an existing Studio panel.
245+
(field-level required · unique · options · default · help) · the **Form view**
246+
**布局** (the WYSIWYG form-layout designer: sections = `fieldGroups`, drag within /
247+
across sections, click-to-inspect) ⇄ **预览** (the live runtime `ObjectForm`) ·
248+
**package-level publish** (drafts accumulate per item; the top bar reviews and
249+
publishes the whole package's drafts in one governed pass — no per-item publish).
250+
- **Still to build** (v1 gap): left-rail **search + New object** · the `Validations`
251+
**rules list + condition builder** · the object **`Settings`** facet. Each reuses
252+
an existing Studio panel.
253+
254+
### Draft vs. preview — what each Form sub-mode shows
255+
The two Form sub-modes intentionally read **different states**:
256+
257+
- **布局 = the draft-confirmation surface.** It renders from the **draft**
258+
(`fields` + `fieldGroups`, including unpublished changes) at the metadata level —
259+
faithful per-type control previews, no object-data SQL. That is what makes it safe
260+
*by construction*: a draft with structural changes has **no physical columns yet**
261+
(DDL lands at publish), so any data-bound rendering of the draft would break.
262+
- **预览 = the published runtime reference.** It renders the real `ObjectForm` from
263+
the **published** definition — deliberately *not* the draft, for the same physical
264+
reason. Publishing is a **deliberate user action** (nothing auto-publishes); when
265+
unpublished changes exist the preview says so ("有未发布改动 — 预览为已发布定义的
266+
效果"), pointing to 布局 for draft confirmation and to the top-bar publish for the
267+
post-publish effect.
268+
- **Deferred**: a data-bound *draft* preview requires the physical schema to exist
269+
pre-publish (a structural-authoring / DDL-timing decision, tracked separately) —
270+
it is not a rendering-layer feature and is intentionally out of scope here.
250271
- **Defer**: Extended objects (objectExtensions) · External objects (datasources) ·
251272
the ERD / model view · formal `Lifecycle` (v1 status = a select field) · `Indexes` ·
252273
seed-data UI · saved views / kanban / calendar (presentation → Interface).

0 commit comments

Comments
 (0)