Release 2.7.0: executable handbooks and native user-site workflows

This commit is contained in:
cflmy committed 2026-11-10 17:03:06 +08:00
1 parent aa0c4d0f55
commit d9aef957f7
562 files changed
+21064 -20387

No files matched your search

@@ -0,0 +1,29 @@
---
markup: occlusion
title: Detail panel
import:
controls: ../controls.mq.md
component: ext/web/component/index.mq.md
table: lib/table.mq.md
---
Detail separates its changing text from the reusable Edit and Back action leaves.
## nodes
| 返回 | 类型 | 说明 |
|---|---|---|
| result | list | Initially hidden detail panel |
The body has id detail-body and receives plain text after selection. Edit retains the selected stable id; Back returns to the list. Neither action's behavior is embedded in markup. The panel starts hidden and the shared client paint function explicitly controls its hidden attribute, using the same ids as the other panels.
We **body = [Describe the selected record's text target](controls.text(id="detail-body"))** and **edit = [Describe the edit action](controls.button(id="btn-edit", label="Edit"))** and **back = [Describe the list action](controls.button(id="btn-back", label="Back"))**.
We **buttons = [Keep the action order](table.concat(a=`edit`, b=`back`))** and **actions = [Group only these detail actions](component.wrap(children=`buttons`, kind="row", slot="detail-actions"))** and **children = [Keep data before actions](table.concat(a=`body`, b=`actions`))**.
`attrs` =
| id | hidden |
|---|---|
| view-detail | True |
Return *[Describe the independent detail panel](component.wrap(children=`children`, kind="section", attrs=`attrs`, slot="detail-panel"))*.
@@ -0,0 +1,37 @@
---
markup: occlusion
title: Editor panel
import:
controls: ../controls.mq.md
component: ext/web/component/index.mq.md
table: lib/table.mq.md
---
The editor is a native input plus reusable action leaves. Saving remains a client transition, not an implicit HTTP form.
## nodes
| 返回 | 类型 | 说明 |
|---|---|---|
| result | list | Initially hidden editor with accessible label and native input |
The label's for attribute names edit-title, the same input read by the Save binding. The input keeps a plain text value. Save validates nonempty text in Marqdo before changing the record list; Cancel changes the route without calling that update. This component describes controls only and starts hidden. The parent keeps field content separate from the action row, allowing the existing responsive layout renderer to place them.
We **label_attrs = [Associate the label with its input](table.put(in=None, at="for", value="edit-title"))** and **label = [Describe the visible field label](component.element(kind="label", value="Title", attrs=`label_attrs`, slot="title-label"))**.
`input_attrs` =
| id | name | type |
|---|---|---|
| edit-title | title | text |
We **input = [Describe the native title input](component.element(kind="input", attrs=`input_attrs`, slot="title-input"))** and **field = [Keep label and input together](table.concat(a=`label`, b=`input`))**.
We **save = [Describe the save action](controls.button(id="btn-save", label="Save"))** and **cancel = [Describe the cancel action](controls.button(id="btn-cancel", label="Cancel"))** and **buttons = [Keep these editor actions ordered](table.concat(a=`save`, b=`cancel`))** and **actions = [Group the action row](component.wrap(children=`buttons`, kind="row", slot="editor-actions"))** and **children = [Place the field before its actions](table.concat(a=`field`, b=`actions`))**.
`attrs` =
| id | hidden |
|---|---|
| view-edit | True |
Return *[Describe the independent editor panel](component.wrap(children=`children`, kind="section", attrs=`attrs`, slot="editor-panel"))*.
@@ -0,0 +1,22 @@
---
markup: occlusion
title: SPA panel assembly
import:
listing: list.mq.md
detail: detail.mq.md
editor: edit.mq.md
table: lib/table.mq.md
---
This parent owns only the three sibling panel relationships.
## nodes
| 返回 | 类型 | 说明 |
|---|---|---|
| result | list | Ordered list, detail and editor panel rows |
Each child owns one panel and names its own native controls. This function retains their structured values and stable order; the client independently selects visibility using hidden attributes. It does not render a second page or concatenate HTML. Changes to editor fields therefore remain inside the editor component instead of growing a single application string.
We **list = [Assemble the listing component](listing.nodes())** and **view = [Assemble the detail component](detail.nodes())** and **edit = [Assemble the editor component](editor.nodes())** and **first = [Retain list and detail order](table.concat(a=`list`, b=`view`))**.
Return *[Keep the editor as the third sibling](table.concat(a=`first`, b=`edit`))*.
@@ -0,0 +1,28 @@
---
markup: occlusion
title: List panel
import:
component: ext/web/component/index.mq.md
table: lib/table.mq.md
---
The existing list container is populated by the official bridge's structured render_list effect.
## nodes
| 返回 | 类型 | 说明 |
|---|---|---|
| result | list | Initially visible list panel with its Markdown hint |
The empty native list provides id items for delegated clicks. Its actual entries come from native client records and use stable data-id attributes. The hint is ordinary Markdown and knows nothing about item data or routing. Only this parent sets the list panel's visibility; detail and editor remain separate components.
We **empty = [Start with no server-owned item rows](table.empty_list())** and **target = [Name the client-owned list container](table.put(in=None, at="id", value="items"))** and **list = [Describe the native unordered list](component.wrap(children=`empty`, kind="list", attrs=`target`, slot="items"))**.
We **hint = [Keep the instruction as ordinary Markdown](component.markdown(text="Click an item for detail.", slot="list-hint"))** and **children = [Place the hint after its list](table.concat(a=`list`, b=`hint`))**.
`attrs` =
| id | hidden |
|---|---|
| view-list | False |
Return *[Describe the visible list panel](component.wrap(children=`children`, kind="section", attrs=`attrs`, slot="list-panel"))*.