docs: align toolbar button layout with host (no more-menu)
All checks were successful
技能自动化发布 / release (push) Successful in 7s
All checks were successful
技能自动化发布 / release (push) Successful in 7s
This commit is contained in:
@@ -9,6 +9,12 @@
|
|||||||
- 小节正文写用户能看懂的变化(新能力、修复、注意事项),避免堆砌内部实现细节
|
- 小节正文写用户能看懂的变化(新能力、修复、注意事项),避免堆砌内部实现细节
|
||||||
- 打 tag 前**必须**为即将发布的版本新增一节;找不到匹配小节时,本次发布不会更新 changelog 字段
|
- 打 tag 前**必须**为即将发布的版本新增一节;找不到匹配小节时,本次发布不会更新 changelog 字段
|
||||||
|
|
||||||
|
## 1.0.70
|
||||||
|
|
||||||
|
- 对齐宿主:数据管理表顶栏技能按钮全部直接展示,取消「更多操作」溢出菜单
|
||||||
|
- 补充宽窄布局说明:够宽左右横排一行;不够宽左右分栏、栏内竖排
|
||||||
|
- 更新 ACTIONS.md 与 skill-actions.schema.json
|
||||||
|
|
||||||
## 1.0.69
|
## 1.0.69
|
||||||
|
|
||||||
- 用户数据目录收敛为上行 `input/` 与下行 `output/`(取代 downloads / imports / exports 三分法)
|
- 用户数据目录收敛为上行 `input/` 与下行 `output/`(取代 downloads / imports / exports 三分法)
|
||||||
|
|||||||
2
SKILL.md
2
SKILL.md
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: 技能开发模板(通用业务版)
|
name: 技能开发模板(通用业务版)
|
||||||
description: "OpenClaw 通用业务技能开发模板,供复制后定制新业务 skill。定制步骤见 development/DEVELOPMENT.md。"
|
description: "OpenClaw 通用业务技能开发模板,供复制后定制新业务 skill。定制步骤见 development/DEVELOPMENT.md。"
|
||||||
version: 1.0.69
|
version: 1.0.70
|
||||||
author: 深圳匠厂科技有限公司
|
author: 深圳匠厂科技有限公司
|
||||||
metadata:
|
metadata:
|
||||||
openclaw:
|
openclaw:
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"type": "array",
|
"type": "array",
|
||||||
"minItems": 1,
|
"minItems": 1,
|
||||||
"items": { "$ref": "#/$defs/action" },
|
"items": { "$ref": "#/$defs/action" },
|
||||||
"description": "Action 列表。同一 placement(toolbar/row/batch)下,宿主按本数组中匹配项的相对顺序渲染技能按钮;调整顺序即调整数组先后。无独立 sortOrder 字段。宿主内置刷新/导出/查看等不参与本顺序。"
|
"description": "Action 列表。同一 placement(toolbar/row/batch)下,宿主按本数组中匹配项的相对顺序全部直接渲染技能按钮(无「更多操作」溢出);调整顺序即调整数组先后。无独立 sortOrder 字段。宿主内置刷新/导出/查看等不参与本顺序。表顶栏宽时左右横排,窄时左右分栏且栏内竖排。"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"$defs": {
|
"$defs": {
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
"type": "array",
|
"type": "array",
|
||||||
"minItems": 0,
|
"minItems": 0,
|
||||||
"items": { "$ref": "#/$defs/placement" },
|
"items": { "$ref": "#/$defs/placement" },
|
||||||
"description": "决定 Action 出现在哪里;与 executionProfile 正交。仅 replaces 接管默认 CRUD 时可为空数组。数据管理 toolbar/row/batch 的按钮顺序由顶层 actions 数组相对顺序决定,不在本字段配置排序。"
|
"description": "决定 Action 出现在哪里;与 executionProfile 正交。仅 replaces 接管默认 CRUD 时可为空数组。数据管理 toolbar/row/batch 的按钮顺序由顶层 actions 数组相对顺序决定;表顶栏全部直接展示(无溢出菜单),不在本字段配置排序或截断。"
|
||||||
},
|
},
|
||||||
"replaces": { "$ref": "#/$defs/mutationKind" },
|
"replaces": { "$ref": "#/$defs/mutationKind" },
|
||||||
"entrypoint": { "$ref": "#/$defs/entrypoint" },
|
"entrypoint": { "$ref": "#/$defs/entrypoint" },
|
||||||
|
|||||||
@@ -368,13 +368,17 @@ HINT: <next step>
|
|||||||
2. 无关 placement 的 Action(如仅 `skill-detail` 的 `health`)夹在中间**不影响** toolbar/row 的相对顺序;宿主按匹配子集保序渲染。
|
2. 无关 placement 的 Action(如仅 `skill-detail` 的 `health`)夹在中间**不影响** toolbar/row 的相对顺序;宿主按匹配子集保序渲染。
|
||||||
3. 同一 Action 可同时挂多个 placement;它在各入口的位置,分别是该入口匹配子集里的相对位置。
|
3. 同一 Action 可同时挂多个 placement;它在各入口的位置,分别是该入口匹配子集里的相对位置。
|
||||||
4. **宿主内置按钮不参与本契约、位置固定**:
|
4. **宿主内置按钮不参与本契约、位置固定**:
|
||||||
- 表顶栏右侧:删除(有勾选时)/ 刷新 / 新增 / 导入 / 导出 —— 技能 toolbar/batch 按钮在左侧(或「更多操作」溢出菜单中),不能与右侧内置按钮混排。
|
- 表顶栏右侧:删除(有勾选时)/ 刷新 / 新增 / 导入 / 导出 —— 技能 toolbar/batch 按钮在左侧,不能与右侧内置按钮混排。
|
||||||
- 行内「操作」列:技能 `row` 按钮在前;其后固定为宿主「查看」→(非只读)「编辑」→「删除」。
|
- 行内「操作」列:技能 `row` 按钮在前;其后固定为宿主「查看」→(非只读)「编辑」→「删除」。
|
||||||
5. 表顶栏技能按钮过多时,宿主可能只常驻前若干个,其余进「更多操作」;**溢出菜单仍遵循同一数组相对顺序**。
|
5. **表顶栏全部直接展示,无「更多操作」溢出菜单**:匹配到的 toolbar/batch 技能按钮一律渲染(顺序仍按本契约)。
|
||||||
|
6. **表顶栏宽窄布局(宿主行为,技能无需配置)**:
|
||||||
|
- 够宽:左右各横排一行(左技能按钮 + 右宿主工具)。
|
||||||
|
- 不够宽:保持左右分栏,栏内按钮上下竖排(左栏技能、右栏刷新/导出等)。
|
||||||
|
|
||||||
禁止:
|
禁止:
|
||||||
|
|
||||||
- 臆造 `sortOrder` / `order` / `priority` 等字段指望宿主排序(模板 Schema `additionalProperties: false` 会拒收)。
|
- 臆造 `sortOrder` / `order` / `priority` 等字段指望宿主排序(模板 Schema `additionalProperties: false` 会拒收)。
|
||||||
|
- 依赖或宣传「更多操作」溢出菜单(宿主已取消该能力)。
|
||||||
- 把「表格行数据默认排序」与按钮顺序混淆——行排序见 [`SCHEMA.md`](SCHEMA.md) 的 `default_sort_json`。
|
- 把「表格行数据默认排序」与按钮顺序混淆——行排序见 [`SCHEMA.md`](SCHEMA.md) 的 `default_sort_json`。
|
||||||
|
|
||||||
### Action 类型 × placements(常见示例,不是限制)
|
### Action 类型 × placements(常见示例,不是限制)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"""技能标识、版本与平台公共库约束(复制后请修改 slug/version/logger)。"""
|
"""技能标识、版本与平台公共库约束(复制后请修改 slug/version/logger)。"""
|
||||||
|
|
||||||
SKILL_SLUG = "your-skill-slug"
|
SKILL_SLUG = "your-skill-slug"
|
||||||
SKILL_VERSION = "1.0.69"
|
SKILL_VERSION = "1.0.70"
|
||||||
LOG_LOGGER_NAME = "openclaw.skill.your_skill_slug"
|
LOG_LOGGER_NAME = "openclaw.skill.your_skill_slug"
|
||||||
PLATFORM_KIT_MIN_VERSION = "1.2.2"
|
PLATFORM_KIT_MIN_VERSION = "1.2.2"
|
||||||
|
|||||||
@@ -512,8 +512,15 @@ class TestActionsManifest(unittest.TestCase):
|
|||||||
"confirmation",
|
"confirmation",
|
||||||
"数据管理技能按钮顺序",
|
"数据管理技能按钮顺序",
|
||||||
"数组相对顺序",
|
"数组相对顺序",
|
||||||
|
"全部直接展示",
|
||||||
|
"左右分栏",
|
||||||
):
|
):
|
||||||
self.assertIn(marker, text, msg=f"ACTIONS.md missing {marker!r}")
|
self.assertIn(marker, text, msg=f"ACTIONS.md missing {marker!r}")
|
||||||
|
self.assertNotIn(
|
||||||
|
"其余进「更多操作」",
|
||||||
|
text,
|
||||||
|
msg="ACTIONS.md must not document removed overflow more-menu truncation",
|
||||||
|
)
|
||||||
for forbidden in (
|
for forbidden in (
|
||||||
"数据管理 toolbar " + "只挂",
|
"数据管理 toolbar " + "只挂",
|
||||||
"toolbar " + "只放 async",
|
"toolbar " + "只放 async",
|
||||||
|
|||||||
Reference in New Issue
Block a user