Write a slot best practices how-to
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 55/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- markdown, typescript
調査の方向性
Start with ADR 0009 (docs/decisions/0009-slot-naming-and-lifecycle.rst), sections 2 and 3, then the existing files in docs/how_tos/, especially the slot section of the migration how-to. Create docs/how_tos/slot-props.md covering the classification of prop changes and the additive and breaking paths, with a @deprecated TypeScript example. Done when the guide is linked from the ADR's Consequences section and the migration how-to, and the three open questions are either answered or explicitly flagged for maintainers.
索引モデルが issue の本文から書いたものです。
説明
[!NOTE]
This issue was written by Claude (Claude Code) and reviewed before posting.
Goal: a how-to in docs/how_tos/ that walks an app maintainer through renaming or changing a slot prop: what the change does to the slot's contract, which path it takes, and what the plugin author sees along the way.
Why: ADR 0009 sets the rules but not the steps. Section 2 makes props the contract ("a given slot's API contract is comprised of: Its React props, with the notable exclusion of props.children") and says the version increments when a change means "existing widgets can be reasonably expected to break". Section 3 says the previous version is deprecated through the Open edX DEPR process and kept "for the duration of the deprecation process, which should include at least one Open edX release where it co-exists with the new version". Nothing in docs/how_tos/ (automatic-case-conversion, caching, i18n, migrate-frontend-app, permissions, theming) turns that into a procedure; the migration how-to's slot section covers only the move from <PluginSlot /> to <Slot /> and re-naming ids.
The gap shows in review. openedx/frontend-app-catalog#174 renames the catalog page's data layer and its internals but keeps the slot props courseDataResultsLength and totalCourses under their old names "so existing site plugins keep working", because there is no documented way to do otherwise. The additive path (add the new prop beside the old one, mark the old one deprecated, remove it at the next slot version) fits ADR 0009 as written, but a maintainer has to work that out from the ADR each time, and nothing says how to mark the deprecation so a plugin author notices.
Claude Plan
Written 2026-11-02 against ae5ec93 on main.
What the how-to would cover
- Classifying the change. A new optional prop: additive, no version change. A renamed prop: additive if the old name stays for a release, breaking if it goes at once. A prop whose type changes: breaking when existing widgets stop compiling or misbehave (the question of what a prop's type exposes is #339, which this guide defers to). A removed prop: breaking.
- The additive path for a rename. Add the new prop; keep the old one, forwarding to the new one in the slot's default content; mark the old one deprecated in the TypeScript (
@deprecatedon the interface member, naming the replacement and the version it goes away in) and in the slot's README; note it in the release notes (conventional-commits footer); remove it at the next slot version via the ADR 0009 section 3 process. - The breaking path. When the additive path is not possible:
v2slot id, both versions rendered for a release, DEPR ticket, the README documenting both. - What the plugin author sees. The
@deprecatedtag in their editor, the README's deprecation note, the release note; and the one place to look for the replacement. - A worked example, taken from a real slot once one has gone through the path.
Open questions
- Whether a deprecated prop needs a DEPR ticket of its own or rides on the slot version's DEPR when it is finally removed.
- Whether pre-release apps (frontend-app-catalog has published only
1.0.0-alpha.*) follow the same path or may rename outright. - Whether a lint rule or type-level check should enforce that a renamed prop keeps its old name for a release, or whether the how-to is enough.
Where it lives
docs/how_tos/slot-props.md (or a broader docs/how_tos/slots.md if the scope grows), linked from ADR 0009's Consequences section and from the migration how-to's slot section.
- 主要言語
- TypeScript
- スター
- 4
- フォーク
- 13
- 平均マージ
- 3日 5時間
- マージ済み PR(30日)
- 4
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openedx/frontend-base のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
openedx/frontend-base#330 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
openedx/frontend-base#327 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
openedx/frontend-base#210 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
openedx/frontend-base#350 ·
-
External routes ignore params対応中かも @arbrandes が今日担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
openedx/frontend-base#349 · 担当者 1 名 ·
openedx/frontend-base の issue をすべて見る
似ている issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openclaw/openclaw#200365 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
effort: small good first issue priority: medium testing
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
TMHSDigital/screencast-mcp#351 ·
メンテナーはふだん 1 日以内に返信
-
area-templates triage:bot-seen triage:needs-human
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
microsoft/aspire#22356 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Archiving an agent that is not loaded keeps its old updatedAt対応中かも @luoph が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
content triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信