refactor: slash-and-burn Word Cloud BuiltIn XBlock#38745
refactor: slash-and-burn Word Cloud BuiltIn XBlock#38745irfanuddinahmad wants to merge 2 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. |
db987da to
ed55494
Compare
19618f9 to
3313f57
Compare
3313f57 to
4a47320
Compare
|
@irfanuddinahmad I have rebased the branch with Adding screenshots of testing word cloud block of |
|
Test coverage gap for the extracted Word Cloud block After the extraction of the Word Cloud block into xblocks-contrib (openedx/xblocks-core#4), #36199 was merged in this repo, adding Studio editing support ( The extracted block was never updated with this change — it uses The following scenarios from #36199 should be thoroughly tested against the extracted block before removing the built-in one:
-- Comment has been written assisted with @claude |
There was a problem hiding this comment.
I think it shouldn't be removed and test should run testing xblocks-core word cloud block.
It can also be moved to xblocks-core here if feasible.
There was a problem hiding this comment.
Confirmed — the extracted block's tests (xblocks_contrib/word_cloud/tests/test_word_cloud.py) didn't have equivalent coverage for the scenarios this file exercises against the extracted block. Ported them in openedx/xblocks-core#273 (OLX import/export, indexibility, AJAX handler dispatch, submit_studio_edits). See the summary comment above for the full analysis.
There was a problem hiding this comment.
It should be moved to xblocks-core here before removing from here.
There was a problem hiding this comment.
Same here — ported the missing scenarios (OLX import/export, indexibility, AJAX handler dispatch, submit_studio_edits incl. boolean handling) into xblocks_contrib/word_cloud/tests/test_word_cloud.py via openedx/xblocks-core#273 before this deletion lands. See the summary comment above for details.
Removes the built-in Word Cloud XBlock and all associated assets now that USE_EXTRACTED_WORD_CLOUD_BLOCK has been True, making xblocks_contrib the active implementation. - Remove USE_EXTRACTED_WORD_CLOUD_BLOCK toggle from common.py - Remove word_cloud entrypoint from pyproject.toml - Delete xmodule/word_cloud_block.py (built-in class + shim) - Delete xmodule/assets/word_cloud/ (JS assets including D3 vendor libs and custom webpack config) - Delete lms/templates/word_cloud.html - Delete xmodule/static/css-builtin-blocks/WordCloudBlockDisplay.css - Remove WordCloudBlockDisplay/WordCloudBlockEditor webpack entries from webpack.builtinblocks.config.js and webpack.common.config.js - Delete xmodule/tests/test_word_cloud.py and lms/djangoapps/courseware/tests/test_word_cloud.py Closes openedx/public-engineering#534 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4a47320 to
e5ec0e9
Compare
|
Thanks for the detailed write-up, @farhan — really useful. I dug into this and wanted to share what I found before we decide what (if anything) still needs to change here. Why no source-code port is needed The The extracted The other half of #36199 — the RequireJS/baseURL fix in But the test-coverage gap was real You're right that this repo's
I opened openedx/xblocks-core#273 to port those scenarios into this repo's own suite before they're lost. All 13 tests (8 existing + 5 new) pass, and the full Manual verification (scenarios 1 and 4) Editor rendering in a Library v2 context and the Save/Cancel buttons were never covered by automated tests even in the original #36199 fix — they were verified manually, which lines up with your screenshot request from 2026-07-03. I did that manual pass in a local Tutor devstack:
Screenshots of each step: (full gist: https://gist.github.com/irfanuddinahmad/df358e2dc74bdf7b6c73db1d99b4abaf) Given all of the above, I think this is safe to merge once #273 lands. Let me know if you'd like anything else checked. |








Summary
Removes the built-in Word Cloud XBlock and all associated assets. The extracted
xblocks_contrib.word_cloud.WordCloudBlockhas been the active implementation sinceUSE_EXTRACTED_WORD_CLOUD_BLOCK = True.Step 2 of 8 in the Slash-n-Burn Built-In XBlocks epic.
Changes
USE_EXTRACTED_WORD_CLOUD_BLOCKtoggle fromopenedx/envs/common.pyword_cloudentrypoint frompyproject.toml(the xblocks-contrib entrypoint remains active)xmodule/word_cloud_block.pyxmodule/assets/word_cloud/(JS, D3 vendor libs, and customwebpack.config.js)lms/templates/word_cloud.htmlxmodule/static/css-builtin-blocks/WordCloudBlockDisplay.cssWordCloudBlockDisplay/WordCloudBlockEditorwebpack entries fromwebpack.builtinblocks.config.jsandwebpack.common.config.jsxmodule/tests/test_word_cloud.pyandlms/djangoapps/courseware/tests/test_word_cloud.pyEpic Step 1: Post-extraction commit review
Reviewed commits to
xmodule/word_cloud_block.pyafterUSE_EXTRACTED_WORD_CLOUD_BLOCKwas set toTrue(2025-12-16 ·e662394398). All 3 post-toggle commits were cosmetic: deprecation markers (#38174), import sorting, and lint-amnesty removal. No functional bug fixes or features to port.Test plan
Automated checks (CI):
xmoduleunit tests:pytest xmodule/tests/npm run build