|
978 | 978 | "fixtures": { |
979 | 979 | "app": "showcase", |
980 | 980 | "requires": [ |
981 | | - "showcase_task's default form (type simple — the `form` key) and its formViews tabbed / wizard / split / quick — examples/app-showcase/src/ui/views/task.view.ts. Since spec 18.3.0 a form view's `type` is its layout only, simple | tabbed | wizard (ADR-0050, packages/spec/src/ui/view.zod.ts#FormViewSchema): the showcase's `split` entry is now a two-section tabbed form and `quick` a simple one, and the type values split, drawer and modal are refused by name (FORM_VIEW_TYPE_RETIRED). The console reads ONLY the default (objectDef.form ?? formViews.default — RecordFormPage through selectRecordFormView), so a named formViews entry is reachable from no console door: each page-level variant is reached by overlaying the object's default form with that variant's type + sections (view is org-overridable, ADR-0005) and reverting afterwards. The overlay recipe goes through the customization pair (ADR-0146 D11; the package-less overlay PUT is the older shape): POST /api/v1/packages/com.example.showcase/ensure-customization, then PUT /api/v1/meta/view/showcase_task.form?package=com.example.showcase.custom&mode=draft with the ViewItem {name:'showcase_task.form', object:'showcase_task', viewKind:'form', isDefault:true, config:{type:<variant>, sections:<that variant's sections>}} carrying overrides: { package: 'com.example.showcase', basedOn: <the showcase's version> }, then POST /api/v1/packages/com.example.showcase.custom/publish-drafts; revert with DELETE on the pair (DELETE /api/v1/meta/view/showcase_task.form?state=draft&package=com.example.showcase.custom, then the same without state). Once the pair exists, Studio Publish on the showcase leaves its read-only posture (#28562), so ux-conventions.disabled-control-reason variants[1] runs before this item creates it, or on a boot without it. Each variant's sections can be read from its own served view item — the container serves formViews as showcase_task.tabbed / .wizard / .split / .quick (GET /api/v1/meta/view/showcase_task.<variant>, QA run #24572). ⚠ Item-level isDefault:true is REQUIRED: the console takes an object's default form — what /new and /edit render — ONLY from a form ViewItem that carries it (objectui packages/app-shell/src/providers/MetadataProvider.tsx applyViewItem, objectui#11539). Without it the publish succeeds, the flag is gone from the served row, and the page falls back to the all-fields layout, which reads like 'the variant does not render'", |
| 981 | + "showcase_task's default form (type simple — the `form` key) and its formViews tabbed / wizard / split / quick — examples/app-showcase/src/ui/views/task.view.ts. Since spec 18.3.0 a form view's `type` is its layout only, simple | tabbed | wizard (ADR-0050, packages/spec/src/ui/view.zod.ts#FormViewSchema): the showcase's `split` entry is now a two-section tabbed form and `quick` a simple one, and the type values split, drawer and modal are refused by name (FORM_VIEW_TYPE_RETIRED). STALE since #36425 (PR #36543): the console's record create and edit surfaces (RecordFormPage at /new and /record/:id/edit, the New / Edit dialog, an action-opened create or edit) load no form view at all, and lay the record out by the object's fieldGroups; selectRecordFormView is deleted. So overlaying the default form no longer reaches any of them, and the default-form overlay recipe below no longer stages a variant on those routes: this item awaits a re-audit (the steps that overlay the default form cannot pass as written). A form view still loads where it is opened by name (FormPage at /forms/NAME, which a type 'form' action opens). The retired recipe, kept for that re-audit: each page-level variant was reached by overlaying the object's default form with that variant's type + sections (view is org-overridable, ADR-0005) and reverting afterwards. The overlay recipe goes through the customization pair (ADR-0146 D11; the package-less overlay PUT is the older shape): POST /api/v1/packages/com.example.showcase/ensure-customization, then PUT /api/v1/meta/view/showcase_task.form?package=com.example.showcase.custom&mode=draft with the ViewItem {name:'showcase_task.form', object:'showcase_task', viewKind:'form', isDefault:true, config:{type:<variant>, sections:<that variant's sections>}} carrying overrides: { package: 'com.example.showcase', basedOn: <the showcase's version> }, then POST /api/v1/packages/com.example.showcase.custom/publish-drafts; revert with DELETE on the pair (DELETE /api/v1/meta/view/showcase_task.form?state=draft&package=com.example.showcase.custom, then the same without state). Once the pair exists, Studio Publish on the showcase leaves its read-only posture (#28562), so ux-conventions.disabled-control-reason variants[1] runs before this item creates it, or on a boot without it. Each variant's sections can be read from its own served view item — the container serves formViews as showcase_task.tabbed / .wizard / .split / .quick (GET /api/v1/meta/view/showcase_task.<variant>, QA run #24572). ⚠ Item-level isDefault:true is REQUIRED: the console takes an object's default form — what /new and /edit render — ONLY from a form ViewItem that carries it (objectui packages/app-shell/src/providers/MetadataProvider.tsx applyViewItem, objectui#11539). Without it the publish succeeds, the flag is gone from the served row, and the page falls back to the all-fields layout, which reads like 'the variant does not render'", |
982 | 982 | "examples/app-showcase/src/ui/pages/task-desk.page.ts — the presentation surface: a JSX page whose ObjectForm opens with formType=\"drawer\" (edit, a side panel) and formType=\"modal\" (create, a dialog) over the task list" |
983 | 983 | ], |
984 | 984 | "knownGaps": [ |
985 | 985 | "the drawer and modal PRESENTATIONS have one stock surface, task-desk.page.ts (ObjectForm formType=\"drawer\" to edit a task, formType=\"modal\" to create one). No form view can declare either any more: ADR-0050 took drawer and modal out of FormView.type in spec 18.3.0, and examples/app-showcase/src/coverage.ts#FORM_VIEW_TYPES lists the three layouts. If that page cannot be reached, record the presentation variant blocked(fixture) rather than ticking or silently skipping it", |
986 | | - "drawer and modal are presentation modes and split a list-beside-record mode, not page layouts (ADR-0050). Since spec 18.3.0 FormViewSchema refuses all three type values at parse, each with its prescription (packages/spec/src/ui/view.zod.ts FORM_VIEW_TYPE_RETIRED), so a default-form overlay carrying one is refused at the metadata door instead of rendering anything (QA run #27441 measured 422). The New/Edit modal maps only tabbed (resolveFormViewLayout — a wizard degrades to a stacked section list there). So the page-level layouts are walked on the page routes (/new and /record/:id/edit, both RecordFormPage), the presentations on task-desk.page.ts, and the three retired values are scored as the refusal (steps[3], acceptance[5])" |
| 986 | + "drawer and modal are presentation modes and split a list-beside-record mode, not page layouts (ADR-0050). Since spec 18.3.0 FormViewSchema refuses all three type values at parse, each with its prescription (packages/spec/src/ui/view.zod.ts FORM_VIEW_TYPE_RETIRED), so a default-form overlay carrying one is refused at the metadata door instead of rendering anything (QA run #27441 measured 422). Since #36425 the New/Edit modal loads no form view at all (before it, the modal mapped only tabbed and a wizard degraded to a stacked section list there). So the page-level layouts are walked on the page routes (/new and /record/:id/edit, both RecordFormPage), the presentations on task-desk.page.ts, and the three retired values are scored as the refusal (steps[3], acceptance[5])" |
987 | 987 | ] |
988 | 988 | }, |
989 | 989 | "variants": [ |
|
996 | 996 | "steps": [ |
997 | 997 | "open a task record's full-page edit form (…/showcase_task/record/<id>/edit — RecordFormPage) on the stock default form (type simple); screenshot; verify the declared section ('Task', 2 columns) and its field order", |
998 | 998 | "overlay the default form with the tabbed variant (type tabbed + the sections of formViews.tabbed, through the fixtures.requires[0] recipe with item-level isDefault:true); reopen the page form; verify the three tabs (Overview / Schedule / Details) and that switching tabs preserves entered values", |
999 | | - "overlay the default form with the wizard variant; open the PAGE form (…/showcase_task/new, or the record's /edit route — RecordFormPage passes the type in both modes); walk Basics → Assignment → Schedule with next/back; verify back preserves values and submit happens ONCE at the end. The New/Edit MODAL renders a wizard as a stacked section list by design (resolveFormViewLayout), so the steps are walked on the page route", |
| 999 | + "overlay the default form with the wizard variant; open the PAGE form (…/showcase_task/new, or the record's /edit route — RecordFormPage passes the type in both modes); walk Basics → Assignment → Schedule with next/back; verify back preserves values and submit happens ONCE at the end. The New/Edit MODAL rendered a wizard as a stacked section list by design, so the steps were walked on the page route; since #36425 neither the modal nor the page route loads the default form (fixtures.requires[0])", |
1000 | 1000 | "RETIRED-TYPE refusal: put the default-form overlay of fixtures.requires[0] with type 'split', then 'drawer', then 'modal' (any sections), and capture each refusal: a 422 whose message names the retired value with its prescription (FORM_VIEW_TYPE_RETIRED). Record whether the draft PUT or its publish answered it. Then re-read GET /api/v1/meta/view/showcase_task.form and confirm none of the three landed. There is no split pane to look for: the showcase's formViews.split is now a two-tab tabbed form", |
1001 | 1001 | "drawer and modal: open task-desk.page.ts; click a task's title (or select one of its cells and press Space) — ObjectForm formType=\"drawer\" opens as a side panel over the list with the task's fields; click New task — ObjectForm formType=\"modal\" opens as a dialog. These are the React block's containers, which ADR-0050 keeps (the block is the caller that opens the form); a form view can no longer name either (steps[3])", |
1002 | 1002 | "on the simple form, set priority to 'urgent' and verify the notes field appears (FormField.visibleWhen CEL); set it back and verify notes hides", |
|
1053 | 1053 | "packages/spec/src/ui/view.zod.ts#FormViewSchema (FormViewSchema type enum: simple|tabbed|wizard; split, drawer and modal refused by name since 18.3.0, FORM_VIEW_TYPE_RETIRED)", |
1054 | 1054 | "examples/app-showcase/src/coverage.ts#FORM_VIEW_TYPES (FORM_VIEW_TYPES — the 3 layouts)", |
1055 | 1055 | "examples/app-showcase/src/ui/views/task.view.ts#formViews (formViews incl. visibleWhen on notes)", |
1056 | | - "objectui packages/app-shell/src/views/RecordFormPage.tsx (reads objectDef.form ?? formViews.default through selectRecordFormView; page-level layouts only) + packages/app-shell/src/utils/recordFormNavigation.ts (resolveFormViewLayout — the New/Edit modal maps only tabbed)", |
| 1056 | + "ui/packages/app-shell/src/views/RecordFormPage.tsx (since #36425 loads no form view: lays the record out by the object's fieldGroups) + ui/apps/console/src/components/FormPage.tsx (a form view opened by name at /forms/NAME)", |
1057 | 1057 | "docs/adr/0050-form-layout-vs-presentation.md (drawer/modal leave FormView.type and split is removed, enacted in spec 18.3.0; where a form opens is the caller's open mode) + examples/app-showcase/src/ui/pages/task-desk.page.ts (ObjectForm formType drawer + modal)" |
1058 | 1058 | ], |
1059 | 1059 | "history": [ |
|
1066 | 1066 | { |
1067 | 1067 | "revision": 2, |
1068 | 1068 | "date": "2026-10-05", |
1069 | | - "change": "clause 1 (drawer variant), steps 1-5, the fixtures, a new revert step, negative 2 and the sources re-pointed (assertion defect, #21782 VF3; VF3 gave no verbatim wording, so the clause is derived). RecordFormPage renders drawer/modal as simple by design ('presentation/open-modes, not record-page layouts', objectstack#1890), and resolveFormViewLayout maps only tabbed. The modelling decision is ADR-0050 (Proposed): drawer/modal leave FormView.type, and presentation belongs to NavigationMode / addRecord.mode / action type 'modal'. Named formViews are reachable from no console door, because every consumer reads objectDef.form ?? formViews.default, so the steps now overlay the default form. Measured differently from the card in two places. (1) The card has the wizard rendering as steps only on /new; RecordFormPage passes the type on the /edit page route as well, and only the New/Edit modal degrades it. (2) task-desk.page.ts hosts BOTH a formType=\"drawer\" and a formType=\"modal\" ObjectForm, so the modal presentation is scorable there, and blocked(fixture) stays only as the fallback. Re-read at objectui 9dfaca6543: unchanged", |
| 1069 | + "change": "clause 1 (drawer variant), steps 1-5, the fixtures, a new revert step, negative 2 and the sources re-pointed (assertion defect, #21782 VF3; VF3 gave no verbatim wording, so the clause is derived). RecordFormPage renders drawer/modal as simple by design ('presentation/open-modes, not record-page layouts', objectstack#1890), and the New/Edit modal's form-view layout step (deleted by #36425) mapped only tabbed. The modelling decision is ADR-0050 (Proposed): drawer/modal leave FormView.type, and presentation belongs to NavigationMode / addRecord.mode / action type 'modal'. Named formViews are reachable from no console door, because every consumer reads objectDef.form ?? formViews.default, so the steps now overlay the default form. Measured differently from the card in two places. (1) The card has the wizard rendering as steps only on /new; RecordFormPage passes the type on the /edit page route as well, and only the New/Edit modal degrades it. (2) task-desk.page.ts hosts BOTH a formType=\"drawer\" and a formType=\"modal\" ObjectForm, so the modal presentation is scorable there, and blocked(fixture) stays only as the fallback. Re-read at objectui 9dfaca6543: unchanged", |
1070 | 1070 | "ref": "#21797" |
1071 | 1071 | }, |
1072 | 1072 | { |
|
0 commit comments