-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat: add markdown editor waffle flag #36512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add markdown editor waffle flag #36512
Conversation
|
Thanks for the pull request, @Anas12091101! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
kdmccormick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad to see this coming along!
| # .. toggle_name: contentstore.new_studio_mfe.use_markdown_editor | ||
| # .. toggle_implementation: CourseWaffleFlag | ||
| # .. toggle_default: False | ||
| # .. toggle_description: This flag enables the use of the Markdown editor when creating or editing problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since markdown editing is always enabled for the legacy problem editor, please clarify that this enables markdown specifically in the new Authoring MFE editor
| """ | ||
| return ENABLE_NEW_STUDIO_CUSTOM_PAGES.is_enabled(course_key) | ||
|
|
||
| # .. toggle_name: contentstore.new_studio_mfe.use_markdown_editor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are in the process of retiring the new_studio_mfe namespace as part of the legacy studio frontend DEPR. Could you name this contentstore.react_markdown_editor instead?
| # .. toggle_target_removal_date: 2025-8-31 | ||
| # .. toggle_tickets: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4517232656/Re-enable+Markdown+editing+of+CAPA+problems+to+meet+various+use+cases | ||
| # .. toggle_warning: | ||
| ENABLE_MARKDOWN_EDITOR = CourseWaffleFlag( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion to clarify that this is specifically for the React problem editor
| ENABLE_MARKDOWN_EDITOR = CourseWaffleFlag( | |
| ENABLE_REACT_MARKDOWN_EDITOR = CourseWaffleFlag( |
kdmccormick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please apply these changes, but otherwise this look good to merge 👍🏻
| use_new_textbooks_page = serializers.SerializerMethodField() | ||
| use_new_group_configurations_page = serializers.SerializerMethodField() | ||
| enable_course_optimizer = serializers.SerializerMethodField() | ||
| react_markdown_editor = serializers.SerializerMethodField() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| react_markdown_editor = serializers.SerializerMethodField() | |
| use_react_markdown_editor = serializers.SerializerMethodField() |
to clarify that this is a boolean, and for consistency with the other flags in this serializer
| # .. toggle_use_cases: temporary | ||
| # .. toggle_creation_date: 2025-4-10 | ||
| # .. toggle_target_removal_date: 2025-8-31 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # .. toggle_use_cases: temporary | |
| # .. toggle_creation_date: 2025-4-10 | |
| # .. toggle_target_removal_date: 2025-8-31 | |
| # .. toggle_use_cases: open_edx | |
| # .. toggle_creation_date: 2025-4-10 |
We might need this toggle forever, so let's not write that it's temporary
| f'{CONTENTSTORE_NAMESPACE}.react_markdown_editor', __name__) | ||
|
|
||
|
|
||
| def react_markdown_editor(course_key): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| def react_markdown_editor(course_key): | |
| def use_react_markdown_editor(course_key): |
for consistency with the other functions in this file
| expected_response["use_new_home_page"] = False | ||
|
|
||
| response = self.client.get(course_url) | ||
| print(expected_response, response.data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| print(expected_response, response.data) |
1c491b8 to
930dcb7
Compare
| # .. toggle_name: contentstore.use_react_markdown_editor | ||
| # .. toggle_implementation: CourseWaffleFlag | ||
| # .. toggle_default: False | ||
| # .. toggle_description: This flag enables the use of the Markdown editor when creating or editing problems in the authoring MFE | ||
| # .. toggle_tickets: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4517232656/Re-enable+Markdown+editing+of+CAPA+problems+to+meet+various+use+cases | ||
| # .. toggle_warning: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # .. toggle_name: contentstore.use_react_markdown_editor | |
| # .. toggle_implementation: CourseWaffleFlag | |
| # .. toggle_default: False | |
| # .. toggle_description: This flag enables the use of the Markdown editor when creating or editing problems in the authoring MFE | |
| # .. toggle_tickets: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4517232656/Re-enable+Markdown+editing+of+CAPA+problems+to+meet+various+use+cases | |
| # .. toggle_warning: | |
| # .. toggle_name: contentstore.use_react_markdown_editor | |
| # .. toggle_implementation: CourseWaffleFlag | |
| # .. toggle_default: False | |
| # .. toggles_use_cases: opt_in | |
| # .. toggle_description: This flag enables the use of the Markdown editor when creating or editing problems in the authoring MFE | |
| # .. toggle_tickets: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4517232656/Re-enable+Markdown+editing+of+CAPA+problems+to+meet+various+use+cases |
you will still need to declare a use case @Anas12091101 . I think "opt_in" is appropriate here.
kdmccormick
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Please fix the PR description.
Do you need me to merge this or are you working with another edx-platform core contributor who can merge it?
|
Thanks for the quick review, @kdmccormick! It would be great if you could merge it. I’m not currently coordinating with another core contributor for this one. |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
|
2U Release Notice: This PR has been deployed to the edX production environment. |
This PR adds contentstore.use_react_markdown_editor course waffle flag in cms. This flag helps in enabling the markdown editor in the authoring mfe. This PR also adds the markdown_edited field in the Problem Xblock to persist the user's choice of switching to the markdown editor on the authoring MFE. More details in the authoring MFE PR: openedx/frontend-app-authoring#1805
This PR adds contentstore.use_react_markdown_editor course waffle flag in cms. This flag helps in enabling the markdown editor in the authoring mfe. This PR also adds the markdown_edited field in the Problem Xblock to persist the user's choice of switching to the markdown editor on the authoring MFE. More details in the authoring MFE PR: openedx/frontend-app-authoring#1805
Description
This PR adds
contentstore.use_react_markdown_editorcourse waffle flag in cms. This flag helps in enabling the markdown editor in the authoring mfe.This PR also adds the
markdown_editedfield in the Problem Xblock to persist the user's choice of switching to the markdown editor on the authoring MFE.More details in the authoring MFE PR: openedx/frontend-app-authoring#1805
Useful information to include:
changes.
Supporting information
Link to other information about the change, such as Jira issues, GitHub issues, or Discourse discussions.
Be sure to check they are publicly readable, or if not, repeat the information here.
https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4517232656/Re-enable+Markdown+editing+of+CAPA+problems+to+meet+various+use+cases
https://github.com/mitodl/hq/issues/6812
Testing instructions
Please follow the instructions in the authoring PR:
Deadline
Before Teak's cut.
Other information
Include anything else that will help reviewers and consumers understand the change.