Document the locations on GET {component}/usage
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 79/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
调研方向
阅读 content/4.api/ 下的 API 文档,并找到 GET {component}/usage 对应的组件部分。根据 issue 记录特定角色的 locations 字段、位置和渲染细节、排序、上限、精确计数,以及 private, no-store 缓存行为。端点文档涵盖所列的每项行为,并区分 admin 响应与不含 locations 的响应后,即为完成。
由索引模型根据 Issue 内容生成。
描述
The bundle's GET {component}/usage now lists where a component is used, for admins (components-web-app/api-components-bundle#531, PR components-web-app/api-components-bundle#535). The module uses it for the "Shared · N places" badge and its list of places.
Please document, in the API section on components (content/4.api/):
- The response keeps
positionCount,pageDataCountandtotal, and addslocationsforROLE_ADMINonly. Anyone else who may read the component still gets the counts, without thelocationskey. - Each location is one counted use:
componentPosition(a position IRI) orpageData+property(a page data property holding the component). A dynamic position whose fallback is the component is listed withpageDataPropertyset.total - locations.lengthis the number of uses not listed. layoutis{iri, reference}for a use in a layout (directly or through components in the layout);renderedOnis then empty for the layout, since every page using it shows the component.renderedOnlists each page or page data the use renders on:{iri, title, routePath}, whereroutePathis the route's own path without the import prefix, or null when unrouted. A template position renders on the template and every page data using it; a position inside a component renders wherever that component is placed, up the chain.- Order: layout uses first, then routed uses by route path, then unrouted uses by title.
renderedOnis ordered by route path, then unrouted by title. - Caps: 50 locations and 20
renderedOnper location;totalandrenderedOnCountare exact. - The response is
private, no-store: a shared cache never stores it, since nothing purges it when a placement changes.
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 0
- 平均合并
- 1 小时 20 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
components-web-app/docs 的其他 Issue
-
Browser Tests page: the template's tests no longer use the sample content (components-web-app#177)未关闭
难度 1/5 1-3 小时 新手友好度 88/100
components-web-app/docs#267 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
components-web-app/docs#266 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
components-web-app/docs#264 ·
-
documentation
难度 2/5 1-3 小时 新手友好度 79/100
components-web-app/docs#263 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
components-web-app/docs#262 ·
查看 components-web-app/docs 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 66/100
getsentry/sentry-conventions#732 · 1 条评论 ·
维护者通常 1 天内回复
-
status:in-linear status:team-assigned team:nodes
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
motiondivision/motion#3955 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
equinor/prisma-decision-web#919 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 83/100