Skip to content

[Refactor] Slash-n-Burn Annotatable BuiltIn XBlock #535

Open
openedx/openedx-platform
#38746

Description

@irfanuddinahmad

See parent epic: openedx/openedx-platform#37819


Rollout Position

Step 3 of 8 — Small-medium footprint (~924 LOC core + vendored annotator.js files). Before removing, verify that xmodule/annotator_mixin.py is not used by any other remaining block.


Block Details

Toggle USE_EXTRACTED_ANNOTATABLE_BLOCK in openedx/envs/common.py
Shim class _BuiltInAnnotatableBlock in xmodule/annotatable_block.py
Entrypoint annotatable = "xmodule.annotatable_block:AnnotatableBlock" in pyproject.toml

Checklist

Pre-condition

  • Review PRs merged into the built-in Annotatable 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 xmodule/annotator_mixin.py is not referenced by any other remaining block.

Steps (single PR)

  • Remove the toggle — delete USE_EXTRACTED_ANNOTATABLE_BLOCK from openedx/envs/common.py and all usages.
  • Remove the shim — delete _BuiltInAnnotatableBlock class and the from xblocks_contrib.annotatable import AnnotatableBlock as _ExtractedAnnotatableBlock import from xmodule/annotatable_block.py.
  • Re-point the entrypoint — change annotatable = "xmodule.annotatable_block:AnnotatableBlock" in pyproject.toml to annotatable = "xblock_annotatable:AnnotatableBlock". The name annotatable stays in the platform, because xblocks-core only registers _annotatable_extracted (for testing).
  • Remove remaining assets:
    • xmodule/annotatable_block.py (Python class)
    • xmodule/annotator_mixin.py (mixin — only if no other block depends on it)
    • xmodule/js/src/annotatable/display.js (JavaScript)
    • common/static/js/vendor/annotator.*.js files (7 vendored Annotator.js files)
    • common/static/css/vendor/edxnotes/annotator.min.css
    • lms/templates/annotatable.html (template)
    • xmodule/static/css-builtin-blocks/AnnotatableBlockDisplay.css
    • xmodule/static/css-builtin-blocks/AnnotatableBlockEditor.css
    • Webpack entries AnnotatableBlockDisplay / AnnotatableBlockEditor in webpack.builtinblocks.config.js
  • Run smoke tests on the extracted Annotatable block to verify nothing is broken.

Activity

  1. irfanuddinahmad commented on Jun 11, 2026

    @irfanuddinahmad
    Author
  2. added 3 commits that reference this issue on Jun 11, 2026
    4755121
    70cf28d
    d514f74
  3. added 2 commits that reference this issue on Nov 4, 2026
    86f5ee6
    c7f7109
  4. added a commit that references this issue on Nov 25, 2026
    049be43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions