feat: Drop the legacy_studio.text_editor flag.#37453
Conversation
6bdb803 to
6dc1271
Compare
kdmccormick
left a comment
There was a problem hiding this comment.
Nice. To close the DEPR, we should also replace the HtmlBlock's studio_view method with raise NotImplemented, and removing its editor-specific templates, JS, and CSS.
|
I dropped the template but couldn't drop the JS and CSS because it's still being used by the old instructor dash for bulk email related editing. So we'll have to wait till that's all cleaned up before we can remove the JS/CSS. See lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html and lms/djangoapps/instructor/views/instructor_dashboard.py |
9f406cc to
227e818
Compare
| create_date = datetime(2024, 6, 6, 6, 6, 6, tzinfo=timezone.utc) | ||
| with freeze_time(create_date): | ||
| block_data = self._add_block_to_library(lib_id, "html", "html1") | ||
| block_data = self._add_block_to_library(lib_id, "problem", "problem1") |
There was a problem hiding this comment.
@kdmccormick just want to confirm the approach I took here. The html block was being used to test content libraries. So I just want to make sure, that switching it to use the problem block instead should be fine?
There was a problem hiding this comment.
Yup, looks good. We will eventually remove the old problem editor too, so if you wanted to be more future-proof, you could use a block like drag-and-drop-v2 which will probably have a legacy editor for a long time. Consider that optional for the sake of this PR though.
Either way, make sure to update the docstring for this test function.
kdmccormick
left a comment
There was a problem hiding this comment.
A couple optional suggestions. Also, I'd merge with a BREAKING CHANGE message in one of those commits.
Thanks! 🪓 🔥
| create_date = datetime(2024, 6, 6, 6, 6, 6, tzinfo=timezone.utc) | ||
| with freeze_time(create_date): | ||
| block_data = self._add_block_to_library(lib_id, "html", "html1") | ||
| block_data = self._add_block_to_library(lib_id, "problem", "problem1") |
There was a problem hiding this comment.
Yup, looks good. We will eventually remove the old problem editor too, so if you wanted to be more future-proof, you could use a block like drag-and-drop-v2 which will probably have a legacy editor for a long time. Consider that optional for the sake of this PR though.
Either way, make sure to update the docstring for this test function.
|
quick reminder that we talked about removing the studiofrontend edit-image-modal div from container.html, as it was only used by the legacy text editor. That could be done in this PR, but also could be done in a followup, either way this is still a ✅ from me |
Remove the flag and update the code paths as if it's always set to true.
And update the studio-view function to raise a NotImplementedError since we now rely on the authoring environment to provide the edit view of this block. Unfortunately, a copy of the template lives in the lms and relies on the the underlying JS and CSS to render a tiny-mce editor in the instructor dashboard. This means we can't remove the CSS and JS until we've dropped the usage of it in the instructor dash. The good news is, that the work to replace the instructor dash is in progress so those assets should get cleaned up soon. The places where the JS and CSS is still being used are: * lms/templates/instructor/instructor_dashboard_2/instructor_dashboard_2.html * lms/djangoapps/instructor/views/instructor_dashboard.py
Since we're removing the studio implementation of the html block, update the library test that was using it to use the problem block instead.
Co-authored-by: Kyle McCormick <kyle@axim.org>
This is only needed to make the legacy editor work on containers. Added originally via #17834 However, now that we use the new MFE text editor even on this legacy page, we don't need to load the old image modal in the old text editor.
7c78f45 to
6ac4201
Compare
Remove the flag and update the code paths as if it's always set to true.
I believe this resolves #34692