Repository navigation
refactor: slash-and-burn Annotatable BuiltIn XBlock - #38746
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. |
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 <noreply@anthropic.com>
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 |
3c80cb5 to
b870db3
Compare
67b7063 to
11d38bb
Compare
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 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
…ack examples This PR deletes xmodule/annotatable_block.py, so the README example linked to a missing file. SequenceBlock still uses the builtin-webpack setup (SequenceBlockDisplay), so it stays a valid example once the Problem and HTML removals have also dropped their entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11d38bb to
e8a7b5c
Compare
Summary
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
Removed
xmodule/annotatable_block.py,xmodule/js/src/annotatable/display.jsandlms/templates/annotatable.html.AnnotatableBlock{Display,Editor}.cssand theAnnotatableBlockDisplay/AnnotatableBlockEditorwebpack entries.USE_EXTRACTED_ANNOTATABLE_BLOCKtoggle.Changed
annotatableentrypoint inpyproject.tomlpoints atxblock_annotatable:AnnotatableBlock. The name stays because existing content uses it.AnnotatableBlockreference in thexblock_serializer/utils.pydocstring, and thexmodule/assets/README.rstexample that linked to the deleted file (it now showsSequenceBlock).Kept (still used)
xmodule/annotator_mixin.py:courseware_index.pyandxmodule/util/misc.pyuse itshtml_to_text.common/static/css/vendor/edxnotes/annotator.min.css: Student Notes (edxnotes) still loads it, although [Refactor] Slash-n-Burn Annotatable BuiltIn XBlock public-engineering#535 lists it.jquery.qtipglobal: the extracted Annotatable JS calls.qtip().Tests
xmodule/tests/test_annotatable_block.py(9)src/xblock_annotatable/tests/test_annotatable.py: same names, near-identical bodies (compared one by one)xmodule/js/spec/annotatable/display_spec.js+ fixturexmodule/tests/test_annotator_mixin.py::test_html_to_textRelease notes: covered by the single Willow dev/op entry for all 8 blocks (Willow - Operator Dev Notes).
Epic Step 1: Post-extraction commit review
24cb3cf9f5). The 4 later commits are cosmetic: deprecation markers (Mark the built-in blocks deprecated #38174), import sorting, lint-amnesty, and the xblocks-core 2.0.0 repoint (feat!: replace xblocks-contrib with xblocks-core 2.0.0 #38473).Test plan
Local Tutor nightly, because PR sandboxes aren't reachable (open-craft/pr-sandbox-automation#28). Last re-verified on 2026-12-02 on this head with the xblocks-core it pins (4.0.3); the library UI checklist last ran on 2026-11-11/12. A box is ticked only if that flow actually ran.
pytest xmodule/tests/(710 passed, 2026-12-02; the 1 failure is a Video test that needs a local MongoDB and fails on master too),npm run buildTesting notes and edge cases
<annotatable/>returns 500 in the LMS. The built-in block renders a bare block in Studio (verified 2026-12-02), because itsRawMixinkeeps<annotatable/>. The fix (Jonahstanley/fix component test #324) was verified live (500 → 200).xmodule/annotator_mixin.pystays forhtml_to_text, and its test passes.USE_EXTRACTED_*_BLOCK = False(built-in) and on this branch. Theannotatablefiles and its unit are identical.pull_xblock_translations+compile_xblock_translationsgivexblock_annotatableits own catalog (ar,es_419andfrfully translated), and the block's i18n service loads it at runtime. The JS strings use it since fix: use each block's own translations for its JS and other strings xblocks-core#336 (in xblocks-core 4.0.0); i18n: strings that bypass the block catalog (JS namespace, remote_exec, lti_form) xblocks-core#332 is closed.6f85d63c7f+ xblocks-core 2.0.0, through the REST APIs and a headless browser.V2 Library checklist: 9/11 pass (L1: empty-block 500; A1: popups on library copies not checked)
Content libraries have historically been the most fragile area for extracted blocks (openedx/xblocks-core#123, #132, #243, #274).
Compiled from the Aximprovements manual test doc (Extracted Block Tests tab) and the Ulmo test sheet's library cases.
Re-verification screenshots (2026-12-02, this PR's head)
Screenshots (LMS, Studio unit, V2 Library; local Tutor, 2026-11-12)
Captured automatically during the local smoke tests. All images: irfanuddinahmad/edx-platform@snb-smoke-screenshots/38746.
Settings
🤖 Generated with Claude Code