Repository navigation
refactor: slash-and-burn Annotatable BuiltIn XBlock - #38746
irfanuddinahmad 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. |
cdd06dc to
4755121
Compare
f7e929e to
92d60da
Compare
279fc61 to
4384a6f
Compare
Adds a karma/jasmine setup for the Annotatable XBlock (mirroring the existing Problem/Discussion/Video setups) and ports xmodule/js/spec/annotatable/display_spec.js with its fixture, which openedx/openedx-platform#38746 removes along with the built-in block. The test name, fixture and logic are unchanged; only the initializer call is adapted to the extracted block's Annotatable(runtime, element), and a no-op $.fn.qtip stub replaces the globally loaded qTip vendor plugin. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Removes the built-in Annotatable XBlock and all associated assets now
that USE_EXTRACTED_ANNOTATABLE_BLOCK has been True. Keeps
xmodule/annotator_mixin.py as it is still used by
cms/djangoapps/contentstore/courseware_index.py and xmodule/util/misc.py.
- Remove USE_EXTRACTED_ANNOTATABLE_BLOCK toggle from common.py
- Remove annotatable entrypoint from pyproject.toml
- Delete xmodule/annotatable_block.py (built-in class + shim)
- Delete xmodule/js/src/annotatable/display.js
- Delete xmodule/js/spec/annotatable/display_spec.js and fixture
- Delete lms/templates/annotatable.html
- Delete xmodule/static/css-builtin-blocks/AnnotatableBlock{Display,Editor}.css
- Remove AnnotatableBlockDisplay/AnnotatableBlockEditor webpack entries
- Delete xmodule/tests/test_annotatable_block.py
- Update docstring in xblock_serializer/utils.py to remove stale reference
Closes openedx/public-engineering#535
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The AnnotatableBlockDisplay webpack entry (and the annotatable/display.js file itself) are deleted in this PR. The corresponding imports-loader rule in webpack.common.config.js was left behind; remove it for consistency with how Poll, WordCloud, and LTI PRs handle their own rule 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.video.video -> xblock_video.block). Co-Authored-By: Claude Opus 5.5 <[email protected]>
4384a6f to
a1b21a3
Compare
|
Holding this PR until openedx/xblocks-core#323 is fixed (fix PR: openedx/xblocks-core#324). While smoke-testing on a local Tutor nightly (platform master + xblocks-core 2.0.0) I found that a newly created, empty Annotatable in a Content Library V2 returns HTTP 500 on preview:
Master already defaults to the extracted block, so master has this bug today. Everything else in the test plan passed locally:
I'll remove the hold once #324 is merged and released into the platform requirements. | Generated using Claude Code |
Summary
Removes the built-in Annotatable XBlock.
xblock_annotatable.AnnotatableBlockhas been the default sinceUSE_EXTRACTED_ANNOTATABLE_BLOCK = True, so the built-in code no longer runs.Step 3 of 8 of the Slash-n-Burn Built-In XBlocks epic. Closes openedx/public-engineering#535
Changes
Deleted:
xmodule/annotatable_block.py,xmodule/js/src/annotatable/display.js,lms/templates/annotatable.html,AnnotatableBlock{Display,Editor}.css, theAnnotatableBlockDisplay/AnnotatableBlockEditorwebpack entries, the built-inannotatableentrypoint, and theUSE_EXTRACTED_ANNOTATABLE_BLOCKtoggle.Kept:
xmodule/annotator_mixin.py, becausecms/djangoapps/contentstore/courseware_index.pyandxmodule/util/misc.pystill use itshtml_to_text.Modified: a stale
AnnotatableBlockreference in thexblock_serializer/utils.pydocstring.Tests:
xmodule/tests/test_annotatable_block.py(9 tests)src/xblock_annotatable/tests/test_annotatable.py: same names, near-identical bodies (compared one by one)xmodule/js/spec/annotatable/display_spec.js+ fixture (Annotatable › constructor › works)Kept in the platform: none needed (no platform-integration tests for this block).
Epic Step 1: Post-extraction commit review
Toggle flipped 2025-12-16 (
24cb3cf9f5). All 4 later commits toannotatable_block.pyare cosmetic (deprecation markers #38174, 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.pytest xmodule/tests/(719 passed locally, includingtest_annotator_mixin.py::test_html_to_text),npm run buildV2 Library checklist: 8/11 pass (L1 empty-block 500, L10 export diff not done, A1 popups not checked)
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)
Annotatable-specific:
html/display.js/imageModal.js) — not ticked: annotation spans and bodies render in the LMS; the popups (JS) on the library preview and reused copy weren't checkedLibrary 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
5 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/38746.
🤖 Generated with Claude Code
Settings