From 9df9fae930b2a27f55eae91295e73f36e73e8c5e Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Tue, 29 Sep 2026 02:10:18 +0200 Subject: [PATCH] feat(10.1-02): render header and form partials through an allowlisted node renderer - partialNodes rebuilds the server node tree with h() under the server's tag, attribute and URL lists - PartialHost owns the skeleton, empty and failure states and keeps nodes visible on refetch - type: partial is a valueless group-labelled field rendered on create and update - ListView shows headerPartial above the list card and refetches it after bulk delete - summer-partial and summer-stats style kit in main.css, documented in the cabana README; dist rebuilt --- admin/src/api/types.ts | 4 + admin/src/components/form/FormField.vue | 6 +- .../components/form/fields/PartialField.vue | 31 +++ .../components/form/fields/WidgetField.vue | 2 +- admin/src/components/form/registry.ts | 15 +- admin/src/components/partial/PartialHost.vue | 82 ++++++ admin/src/components/partial/partialNodes.ts | 131 ++++++++++ admin/src/styles/main.css | 66 +++++ admin/src/views/ListView.vue | 13 + .../tests/fixtures/extension.form-schema.json | 6 + .../tests/fixtures/extension.list-schema.json | 106 ++++++++ admin/tests/fixtures/extension.partial.json | 151 +++++++++++ admin/tests/fixtures/typed.ts | 11 + admin/tests/smoke/extension.smoke.test.ts | 238 +++++++++++++++++- .../boardwalk/dist/assets/index-CfeX_snf.css | 1 + .../boardwalk/dist/assets/index-CnkxaoJL.js | 4 - .../boardwalk/dist/assets/index-D9vrCBt0.js | 4 + .../boardwalk/dist/assets/index-DQRkkGSM.css | 1 - modules/boardwalk/dist/index.html | 4 +- modules/cabana/README.md | 16 ++ 20 files changed, 870 insertions(+), 22 deletions(-) create mode 100644 admin/src/components/form/fields/PartialField.vue create mode 100644 admin/src/components/partial/PartialHost.vue create mode 100644 admin/src/components/partial/partialNodes.ts create mode 100644 admin/tests/fixtures/extension.list-schema.json create mode 100644 admin/tests/fixtures/extension.partial.json create mode 100644 modules/boardwalk/dist/assets/index-CfeX_snf.css delete mode 100644 modules/boardwalk/dist/assets/index-CnkxaoJL.js create mode 100644 modules/boardwalk/dist/assets/index-D9vrCBt0.js delete mode 100644 modules/boardwalk/dist/assets/index-DQRkkGSM.css diff --git a/admin/src/api/types.ts b/admin/src/api/types.ts index 1907a4f..5da4ba1 100644 --- a/admin/src/api/types.ts +++ b/admin/src/api/types.ts @@ -40,6 +40,10 @@ export type AdminActionRequest = Schemas['cabana.AdminActionRequest'] export type AdminActionResult = Schemas['cabana.AdminActionResult'] /** A controller's plugin script and stylesheet URLs under {base}/assets/. */ export type ControllerAssets = Schemas['cabana.ControllerAssets'] +/** One node of a rendered partial: an allowlisted element or a text node. */ +export type PartialNode = Schemas['cabana.PartialNode'] +/** A rendered header or form partial. */ +export type PartialView = Schemas['cabana.PartialView'] /** One message as CLDR plural forms; "other" is always present (D-13). */ export type MessageForms = Schemas['cabana.MessageForms'] /** The public backend::lang bundle: full key to CLDR forms (D-20). */ diff --git a/admin/src/components/form/FormField.vue b/admin/src/components/form/FormField.vue index 2011fbc..499b750 100644 --- a/admin/src/components/form/FormField.vue +++ b/admin/src/components/form/FormField.vue @@ -39,10 +39,10 @@ const describedBy = computed(() =>