edx-platform icon indicating copy to clipboard operation
edx-platform copied to clipboard

[BD-13] refactor: Remove unused XModule classes

Open Cup0fCoffee opened this issue 3 years ago • 8 comments

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 editing
  • WordCloudBlock

Other notes

~How can we test CustomTagBlock?~ https://github.com/openedx/edx-platform/pull/31173#issuecomment-1293776439

Private-ref: BB-6732

Cup0fCoffee avatar Oct 19 '22 13:10 Cup0fCoffee

Thanks for the pull request, @Cup0fCoffee!

When this pull request is ready, tag your edX technical lead.

openedx-webhooks avatar Oct 19 '22 13:10 openedx-webhooks

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).

Agrendalath avatar Oct 27 '22 16:10 Agrendalath

@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.

Agrendalath avatar Oct 27 '22 16:10 Agrendalath

@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.

0x29a avatar Oct 27 '22 16:10 0x29a

@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?

ormsbee avatar Oct 28 '22 03:10 ormsbee

@0x29a Nice catch! Removing it.

Cup0fCoffee avatar Oct 28 '22 09:10 Cup0fCoffee

@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 avatar Oct 28 '22 15:10 Agrendalath

@Agrendalath: Sounds good, thank you for the detailed explanation.

ormsbee avatar Oct 28 '22 21:10 ormsbee

@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.

openedx-webhooks avatar Nov 07 '22 16:11 openedx-webhooks

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

edx-pipeline-bot avatar Nov 07 '22 18:11 edx-pipeline-bot

EdX Release Notice: This PR has been deployed to the production environment.

edx-pipeline-bot avatar Nov 07 '22 18:11 edx-pipeline-bot

EdX Release Notice: This PR has been deployed to the production environment.

edx-pipeline-bot avatar Nov 07 '22 18:11 edx-pipeline-bot