refactor: remove built-in HTML XBlock implementation (slash-n-burn #37819) - #38748
refactor: remove built-in HTML XBlock implementation (slash-n-burn #37819)#38748irfanuddinahmad wants to merge 5 commits into
Conversation
|
Thanks for the pull request, @irfanuddinahmad! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
a524f10 to
90638b4
Compare
0ebcc95 to
998f59c
Compare
…7819) Removes the _BuiltinHtmlBlockMixin, _BuiltInHtmlBlock classes, the HtmlBlockMixin/HtmlBlock shims, and the USE_EXTRACTED_HTML_BLOCK toggle now that the extracted version in xblocks-contrib is the only implementation. AboutBlock, StaticTabBlock, and CourseInfoBlock remain in html_block.py and now inherit from xblocks_contrib.html.HtmlBlockMixin directly. HtmlBlockDisplay webpack entry removed; HtmlBlockEditor kept since the instructor dashboard loads it explicitly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
HtmlBlockDisplay (the only webpack entry including html/display.js and imageModal.js, other than AnnotatableBlockDisplay which is removed in the Annotatable PR) is deleted in this PR. Remove the now-dead imports-loader rules from webpack.common.config.js for consistency with how Poll, WordCloud, and LTI PRs handle their own cleanup. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
998f59c to
c982ac4
Compare
Summary
Removes the built-in HTML XBlock from
xmodule/html_block.pyas part of the Slash-n-Burn Built-In XBlocks epic (#37819). The extracted version inxblocks-contribhas been the active implementation sinceUSE_EXTRACTED_HTML_BLOCKwas set toTrue.Closes openedx/public-engineering#536
Deleted:
_BuiltinHtmlBlockMixinclass (~330 LOC) — built-in HTML mixin_BuiltInHtmlBlockclass — built-in HTML blockHtmlBlockMixin = None/reset_Mixin()— shim for the mixinHtmlBlock = None/reset_class()— shim for HtmlBlockxmodule/static/css-builtin-blocks/HtmlBlockDisplay.csshtml_block.pyKept:
AboutBlock,StaticTabBlock,CourseInfoBlock— still live inhtml_block.py; now inherit fromxblocks_contrib.html.HtmlBlockMixindirectlyHtmlBlockEditorwebpack entry — still loaded by the instructor dashboardxmodule/js/src/html/edit.js,HtmlBlockEditor.css— referenced by instructor dashboard templateModified:
openedx/envs/common.py— removedUSE_EXTRACTED_HTML_BLOCKtogglepyproject.toml— removed conflictinghtmlentrypointwebpack.builtinblocks.config.js— removedHtmlBlockDisplayentryxmodule/tests/test_html_block.py— removed toggle-conditional test classes; keptCourseInfoBlockTestCaselms/djangoapps/courseware/tests/test_block_render.py— importHtmlBlockfromxblocks_contrib.htmlNote:
xmodule/js/src/html/display.jsandimageModal.jsare still referenced byAnnotatableBlockDisplayin webpack (removed in PR #38746). After both #38746 and this PR merge, those two JS files become dead code. Their deletion is tracked in #38792.Epic Step 1: Post-extraction commit review
Reviewed commits to
xmodule/html_block.pyafterUSE_EXTRACTED_HTML_BLOCKwas set toTrue(2025-12-03 ·1fed4be5c9). All 6 post-toggle commits were cosmetic or independently mirrored: theHtmlBlockMixinbase refactor (b2376c5f7c, 2026-01-01) was independently applied in xblocks-contrib (b277504) with the same intent; remaining commits were ruff suppression, import sorting, and lint-amnesty removal. No functional bug fixes or features to port.Test plan
AboutBlockstill lives inhtml_block.py, now inheriting fromxblocks_contrib.html.HtmlBlockMixinStaticTabBlock)CourseInfoBlock)HtmlBlockEditorwebpack bundle was intentionally retainedAutomated checks (CI):
pytest xmodule/tests/test_html_block.py—CourseInfoBlockTestCaseshould passpytest lms/djangoapps/courseware/tests/test_block_render.py— no HtmlBlock import errors