Skip to content

feat: Drop the legacy_studio.text_editor flag.#37453

Merged
feanil merged 5 commits intomasterfrom
feanil/drop_legacy_editor_config
Oct 17, 2025
Merged

feat: Drop the legacy_studio.text_editor flag.#37453
feanil merged 5 commits intomasterfrom
feanil/drop_legacy_editor_config

Conversation

@feanil
Copy link
Contributor

@feanil feanil commented Oct 9, 2025

Remove the flag and update the code paths as if it's always set to true.

I believe this resolves #34692

@feanil feanil force-pushed the feanil/drop_legacy_editor_config branch from 6bdb803 to 6dc1271 Compare October 9, 2025 17:49
@feanil feanil marked this pull request as ready for review October 10, 2025 13:38
@feanil feanil requested a review from kdmccormick October 10, 2025 13:38
Copy link
Member

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@feanil feanil requested a review from kdmccormick October 10, 2025 19:33
@feanil
Copy link
Contributor Author

feanil commented Oct 10, 2025

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

@feanil feanil force-pushed the feanil/drop_legacy_editor_config branch 2 times, most recently from 9f406cc to 227e818 Compare October 14, 2025 20:11
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")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

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

feanil and others added 5 commits October 16, 2025 15:01
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.
@feanil feanil force-pushed the feanil/drop_legacy_editor_config branch from 7c78f45 to 6ac4201 Compare October 16, 2025 19:01
Copy link
Member

@kdmccormick kdmccormick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@feanil feanil merged commit 69875c2 into master Oct 17, 2025
53 checks passed
@feanil feanil deleted the feanil/drop_legacy_editor_config branch October 17, 2025 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DEPR]: Legacy Text Editor

2 participants

Comments