Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Document the locations on GET {component}/usage

クローズ 初心者向け
#265 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
79/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
活発
領域
documentation

調査の方向性

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, pageDataCount and total, and adds locations for ROLE_ADMIN only. Anyone else who may read the component still gets the counts, without the locations key.
  • Each location is one counted use: componentPosition (a position IRI) or pageData + property (a page data property holding the component). A dynamic position whose fallback is the component is listed with pageDataProperty set. total - locations.length is the number of uses not listed.
  • layout is {iri, reference} for a use in a layout (directly or through components in the layout); renderedOn is then empty for the layout, since every page using it shows the component.
  • renderedOn lists each page or page data the use renders on: {iri, title, routePath}, where routePath is 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. renderedOn is ordered by route path, then unrouted by title.
  • Caps: 50 locations and 20 renderedOn per location; total and renderedOnCount are 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分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

components-web-app/docs のほかの issue

components-web-app/docs の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。