Refactor or deprecate parent-child relationships between XBlocks
@kdmccormick 已经在做这个了。
开始于 2025年11月10日。
评估
这个 Issue 还没有评估数据。
描述
This would be a long-term initiative. It probably belongs on the platform-roadmap.
Context
We have decided that parent-child relationships should only exist at/below the VerticalBlock: https://github.com/openedx/edx-platform/blob/master/docs/decisions/0006-role-of-xblock.rst
We have further discussed that parent-child relationships in their entirety should be removed; I'm not sure if we came to a consensus on that.
TODO -- Add more context ( @ormsbee , @kdmccormick , and @bradenmacdonald ).
Tasks
Off the top of my head...
- File a DEPR encompassing our plan to:
- Remove parent-child relationships on the base XBlock class. Delete the _HasChildrenMetaclass. Move all parent-child logic to a new subclass, XBlockWithChildren. Make it
XBlock.has_childrena read-only class property. Some details. - Raise an exception if
get_parentis called at or above the VerticalBlock level. - For all XBlockWithChildren subclasses above the VerticalBlock (so, CourseBlock, SectionBlock, and SequenceBlock): Move their implementations to either Learning Core or edx-platform djangoapps.
- Remove parent-child relationships on the base XBlock class. Delete the _HasChildrenMetaclass. Move all parent-child logic to a new subclass, XBlockWithChildren. Make it
- Decide: Should parent-child relationships still exist at/below the Vertical block?
- Either way -> ADR it.
- Yes -> We're done.
- No -> File another DEPR encompassing our plan to:
- Raise deprecation warnings on the XBlockWithChildren class.
- For all remaining XBlockWithChildren subclasses in edx-platform (eg, LibraryContentBlock, SplitTestBlock):
Move their implementations to either Learning Core or edx-platform djangoapps. - Write guidance on how custom XBlockWithChildren subclasses can be similarly migrated. Ensure that, for example, OpenCraft's ProblemBuilder block can be migrated using this guide.
- Delete the XBlockWithChildren class, and delete all parent-child logic from the XBlock repository.
- Delete all parent-child logic from modulestore and edx-platform's XBlock runtimes.
- 主要语言
- Python
- 星标
- 470
- 派生
- 231
- 平均合并
- 2 天 14 小时
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
openedx/XBlock 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 72/100
-
performance
难度 5/5 一周以上 新手友好度 35/100
-
难度 2/5 1-3 小时 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
[DEPR]: Support for XBlock Runtimes with raw string scope IDs可能已有人在做 @salman2013 于 211 天前认领。 未关闭depr
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
Deepak3699/Ai_Mentor#244 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
btclib-org/btclib-node#1880 ·
维护者通常 1 天内回复
-
CONTRIBUTING.md: say how ticketless bug fixes and feature PRs are handled可能已有人在做 @khuisman 今天认领。 未关闭v0.9.2
难度 1/5 1 小时以内 新手友好度 84/100
khuisman/mcp-gee-sweet#941 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
pyjanitor-devs/pyjanitor#1758 ·
维护者通常 1 天内回复
-
bug ready for review
难度 2/5 1-3 小时 新手友好度 86/100
odysseus-dev/odysseus#6641 ·
维护者通常 1 天内回复