Skip to content

[Refactor] Slash-n-Burn HTML BuiltIn XBlock #536

@irfanuddinahmad

Description

@irfanuddinahmad

See parent epic: openedx/openedx-platform#37819


Rollout Position

Step 4 of 8 — Medium footprint (~1,650 LOC). The HTML block has multiple template variants (raw, iframe, LaTeX, zooming-image, announcement, anon_user_id) — confirm all variants are handled correctly in xblocks-contrib before removing.


Block Details

Toggle USE_EXTRACTED_HTML_BLOCK in openedx/envs/common.py
Shim class _BuiltInHtmlBlock in xmodule/html_block.py
Entrypoint html = "xmodule.html_block:HtmlBlock" in pyproject.toml

Checklist

Pre-condition

  • Review PRs merged into the built-in HTML XBlock code in edx-platform after the extraction work was done — port any bug fixes or improvements to xblocks-contrib if not already there.
  • Confirm all template variants (raw, iframe, LaTeX, zooming-image, announcement, anon_user_id) are supported in xblocks-contrib.

Steps (single PR)

  • Remove the toggle — delete USE_EXTRACTED_HTML_BLOCK from openedx/envs/common.py and all usages.
  • Remove the shim — delete _BuiltInHtmlBlock class and the from xblocks_contrib.html import HtmlBlock as _ExtractedHtmlBlock import from xmodule/html_block.py.
  • Remove the entrypoint — delete html = "xmodule.html_block:HtmlBlock" from pyproject.toml.
  • Remove remaining assets:
    • xmodule/html_block.py (Python class)
    • xmodule/html_checker.py
    • xmodule/js/src/html/ (display.js, edit.js, imageModal.js)
    • xmodule/templates/html/ (6 YAML template variants)
    • xmodule/static/css-builtin-blocks/HtmlBlockDisplay.css
    • xmodule/static/css-builtin-blocks/HtmlBlockEditor.css
    • Webpack entries HtmlBlockDisplay / HtmlBlockEditor in webpack.builtinblocks.config.js
  • Run smoke tests on the extracted HTML block to verify nothing is broken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions