edx-platform
edx-platform copied to clipboard
[BD-13] refactor: Remove unused XModule classes
Description
This PR removes XModule classes that are no longer being used after the conversion of all the XModules to standard XBlocks.
Testing instructions
Test that when editing in studio the following XBlock work that same as before these changes:
VideoBlock- especially tabs when editingWordCloudBlock
Other notes
~How can we test CustomTagBlock?~ https://github.com/openedx/edx-platform/pull/31173#issuecomment-1293776439
Private-ref: BB-6732
Thanks for the pull request, @Cup0fCoffee!
When this pull request is ready, tag your edX technical lead.
How can we test
CustomTagBlock?
This one is a bit tricky. We can import course-xmodules.tar.gz, as it cannot be created directly in Studio (source: https://github.com/openedx/edx-platform/pull/26873).
@ormsbee, I just left one small suggestion on the PR, but it's good to go from my end. Would you like to take a look?
Edit: my message got duplicated somehow, so I deleted the other one.
@Cup0fCoffee, I guess xmodule/tests/test_files/test_tabseditingdescriptor.css and xmodule/tests/test_files/test_tabseditingdescriptor.scss can be removed too, as they're used only in xmodule/tests/test_editing_module.py, which is being removed here.
@Agrendalath: Just one quick sanity check–after these class removals, will we still have the ability to edit the raw OLX of unknown XBlock types in Studio? If the answer to that is yes, I don't have anything to add here.
Is the primary regression risk area going to be Studio authoring?
@0x29a Nice catch! Removing it.
@ormsbee,
Just one quick sanity check–after these class removals, will we still have the ability to edit the raw OLX of unknown XBlock types in Studio? If the answer to that is yes, I don't have anything to add here.
By "unknown XBlock types" do you mean "XBlocks that are not (and were not) installed in the platform but are imported in a course"? If yes, then it is not working for me on the devstack using the current master version (it hasn't been working for me for at least a few months). When load_error_modules is False, the XBlock is just skipped (it doesn't appear in the export too). When load_error_modules is True, I'm getting an ErrorBlock, which has an empty editor in Studio. I can verify this in environments if this is something that is expected to work.
This PR should not alter this behavior in any way, though, as it's removing unused code that was left after converting old built-in XModules to XBlocks.
If you mean editing raw OLX of blocks like CustomTagBlock and AnnotatableBlock (that are using the XMLEditingDescriptor JS class in Studio), then this part works correctly.
Is the primary regression risk area going to be Studio authoring?
That's right.
@Agrendalath: Sounds good, thank you for the detailed explanation.
@Cup0fCoffee 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.
EdX Release Notice: This PR has been deployed to the production environment.
EdX Release Notice: This PR has been deployed to the production environment.