Document the atomic component move (POST {component}/move)
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 78/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
阅读content/4.api/下现有的组件位置和页面数据文档,然后在这些端点旁边记录POST {component IRI}/move。涵盖请求变体、原子移动行为、响应、验证和授权错误,以及 issue 中描述的草稿处理。完成标准是端点和示例说明如何移动或重新排序组件,以及如何重新读取最终状态。
由索引模型根据 Issue 内容生成。
描述
The API bundle now has an atomic component move (components-web-app/api-components-bundle#526, PR components-web-app/api-components-bundle#533), which the Nuxt module will use (cwa-nuxt-module #415). Please document it in content/4.api/ (component positions / page data):
Endpoint: POST {component IRI}/move (e.g. /component/html_contents/{id}/move, under the route import prefix), application/ld+json, available on every component resource like {component IRI}/usage.
Body:
{ "from": { "componentPosition": "<iri>" } | { "pageData": "<iri>", "property": "<name>" },
"to": { "componentGroup": "<iri>", "after": "<position iri>"?, "before": "<position iri>"? } | { "pageData": "<iri>", "property": "<name>" } }
What happens (one request, one database flush, so a component is never left in two places or deleted by a dropped connection):
- position → group: the same position is moved (its IRI is kept) and placed by
after/before, or at the end, exactly asPATCH <position> {componentGroup, after|before}; within the same group it is a reorder. - position → page data property: the property is set and the position removed; the component is not deleted even if that was its only use.
- page data property → group: a new static position is created and placed; the property is nulled.
- property → property: one is set and the other nulled, across two page data resources too. Dynamic (
pageDataProperty) positions are never changed.
Response: 200 with componentPosition (the moved or created position's IRI, null for a property target) and from/to echoed. Re-read the groups' /order and the page data for the new state.
Errors: 422 with violations at from, to, from.componentPosition, from.pageData, from.property, to.componentGroup, to.after, to.before, to.pageData, to.property: the same checks as the separate writes (allowedComponents, maxComponents, explicitAllowOnly, a component placed inside itself, anchors in the target group, the property's component class), plus the target being the source property, a dynamic or empty source position, an empty source property, a from that does not hold the component (a draft and its published component count as one), and a target property that already holds a component (refused rather than replaced). 403 when the caller is not granted one of the underlying writes (the position write and each page data PATCH, e.g. routable_security on unreachable page data); 401 for anonymous callers.
Drafts: moving by a draft's IRI moves the published component, and the published component is what is stored.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- 平均合并
- 1 小时 20 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
components-web-app/docs 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 67/100
components-web-app/docs#294 · 1 条评论 ·
-
documentation
难度 4/5 3-5 天 新手友好度 45/100
components-web-app/docs#290 ·
-
难度 5/5 一周以上 新手友好度 35/100
components-web-app/docs#289 · 2 条评论 ·
-
documentation
难度 4/5 3-5 天 新手友好度 43/100
components-web-app/docs#285 ·
-
documentation
难度 4/5 1-2 天 新手友好度 35/100
components-web-app/docs#284 ·
查看 components-web-app/docs 的全部 Issue
相似的 Issue
-
agent/scanner help wanted hive/claimed-by-scanner kind/bug stage/020-claimed
难度 2/5 1-3 小时 新手友好度 90/100
hivecommons/rationguard#315 ·
维护者通常 1 天内回复
-
agent-ready area: ui-sdk priority: p3 type: chore
难度 2/5 1-3 小时 新手友好度 76/100
schlessera/brain-kit#2534 ·
维护者通常 1 天内回复
-
bug lane:gh-5
难度 2/5 1-3 小时 新手友好度 72/100
LLM-4-People/bridlewise-testing#122 ·
维护者通常 1 天内回复
-
bug priority: P2
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
enhancement priority:low ready-for-dev
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复