Skip to content

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

@irfanuddinahmad

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.
  • Remove the entrypoint — delete annotatable = "xmodule.annotatable_block:AnnotatableBlock" from pyproject.toml.
  • 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.

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