Repository navigation
refactor: remove built-in HTML XBlock implementation (slash-n-burn #37819) - #38748
irfanuddinahmad wants to merge 6 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
998f59c to
c982ac4
Compare
c982ac4 to
fddf171
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 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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 <[email protected]>
xblocks-core 2.0.0 (#38473) removed the xblocks_contrib package. Point the platform entrypoint, imports and mock.patch targets at the new per-block packages (e.g. xblocks_contrib.html -> xblock_html). Co-Authored-By: Claude Opus 5.5 <[email protected]>
fddf171 to
5db9614
Compare
Summary
Removes the built-in HTML XBlock from
xmodule/html_block.py.xblock_html.HtmlBlockhas been the default sinceUSE_EXTRACTED_HTML_BLOCK = True, so the built-in code no longer runs. This is a partial removal: the About, Static Tab and Course Info blocks stay in the platform.Part of the Slash-n-Burn Built-In XBlocks epic. Closes openedx/public-engineering#536
Changes
Deleted:
_BuiltinHtmlBlockMixin(~330 LOC) and_BuiltInHtmlBlock, theHtmlBlockMixin = None/reset_Mixin()andHtmlBlock = None/reset_class()shims, now-unused imports inhtml_block.py,HtmlBlockDisplay.css, theHtmlBlockDisplaywebpack entry, the built-inhtmlentrypoint, and theUSE_EXTRACTED_HTML_BLOCKtoggle.Kept (still used):
AboutBlock,StaticTabBlockandCourseInfoBlockinhtml_block.py, which now inheritxblock_html.HtmlBlockMixindirectly.HtmlBlockEditorwebpack entry,xmodule/js/src/html/edit.jsandHtmlBlockEditor.css, used by the instructor dashboard.Tests:
xmodule/tests/test_html_block.py(13 tests)src/xblock_html/tests/: same names; 11 near-identical, 2 differ only in how the block class is referencedKept in the platform:
xmodule/tests/test_html_block.py:CourseInfoBlockTestCasestays, since that block stays.lms/djangoapps/courseware/tests/test_block_render.py: importsHtmlBlockfromxblock_html.Epic Step 1: Post-extraction commit review
Toggle flipped 2025-12-03 (
1fed4be5c9). Of the 6 later commits tohtml_block.py, theHtmlBlockMixinbase refactor (b2376c5f7c) was applied independently in xblocks-core (b277504); the rest are cosmetic (ruff suppression, import sorting, lint-amnesty). Nothing to port.Test plan
Tested on a local Tutor nightly (master
6f85d63c7f+ xblocks-core 2.0.0) through the REST APIs and a headless browser, because PR sandboxes aren't deploying (open-craft/pr-sandbox-automation#28). A box is ticked only if that flow actually ran.HtmlBlockEditor.jsbundle loads (200) on the legacy instructor dashboard, but the editor itself wasn't exercised (the Send Email tab needs bulk email).css/HtmlBlockEditor.cssreturns 404 locally; that template line is unchanged from masterpytest xmodule/tests/test_html_block.pyandlms/djangoapps/courseware/tests/test_block_render.py, plus locallytest_course_index.py,test_library_root.py,test_split_test_block.py,test_library_content.py(all passed),npm run buildV2 Library checklist: 11/13 pass (L10 export diff and H3 text override not done)
Content Libraries V2: smoke tests (historically the most fragile area for extracted blocks: openedx/xblocks-core#123, openedx/xblocks-core#132, openedx/xblocks-core#243, openedx/xblocks-core#274)
HTML-specific:
LibraryLocatorV2branch inxblock_html/block.py)Library checklist compiled from the Aximprovements manual test doc (Extracted Block Tests tab) and the Ulmo test sheet's library cases. Generated using Claude Code.
Screenshots
6 screenshots (LMS, Studio unit, V2 Library)
Local Tutor nightly, 2026-11-12
Captured automatically during the local smoke tests (the sandbox isn't reachable yet, see open-craft/pr-sandbox-automation#28). All images: irfanuddinahmad/edx-platform@snb-smoke-screenshots/38748.
HtmlBlockEditorbundle loads)🤖 Generated with Claude Code
Settings