Skip to content

Conversation

@Anas12091101
Copy link
Contributor

@Anas12091101 Anas12091101 commented Apr 10, 2025

Description

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

Useful information to include:

  • Which edX user roles will this change impact? "Course Author"
  • Include screenshots for changes to the UI (ideally, both "before" and "after" screenshots, if applicable).
  • Provide links to the description of corresponding configuration changes. Remember to correctly annotate these
    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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 10, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented Apr 10, 2025

Thanks for the pull request, @Anas12091101!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If 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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

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.

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

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

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

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

Suggested change
ENABLE_MARKDOWN_EDITOR = CourseWaffleFlag(
ENABLE_REACT_MARKDOWN_EDITOR = CourseWaffleFlag(

@Anas12091101 Anas12091101 marked this pull request as ready for review April 11, 2025 01: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.

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

Choose a reason for hiding this comment

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

Suggested change
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

Comment on lines 226 to 228
# .. toggle_use_cases: temporary
# .. toggle_creation_date: 2025-4-10
# .. toggle_target_removal_date: 2025-8-31
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# .. 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):
Copy link
Member

Choose a reason for hiding this comment

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

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

Choose a reason for hiding this comment

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

Suggested change
print(expected_response, response.data)

@Anas12091101 Anas12091101 force-pushed the anas/add-markdown-waffle-flag branch from 1c491b8 to 930dcb7 Compare April 11, 2025 15:28
Comment on lines 222 to 227
# .. 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:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# .. 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.

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.

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?

@Anas12091101
Copy link
Contributor Author

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.

@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Apr 14, 2025
@mphilbrick211 mphilbrick211 moved this from Ready for Review to Ready to Merge in Contributions Apr 14, 2025
@kdmccormick kdmccormick merged commit 2930214 into openedx:master Apr 15, 2025
49 checks passed
@github-project-automation github-project-automation bot moved this from Ready to Merge to Done in Contributions Apr 15, 2025
@edx-pipeline-bot
Copy link
Contributor

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

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

@edx-pipeline-bot
Copy link
Contributor

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

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

@edx-pipeline-bot
Copy link
Contributor

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

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

tonybusa pushed a commit to tonybusa/edx-platform that referenced this pull request Apr 23, 2025
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
UsamaSadiq pushed a commit that referenced this pull request May 14, 2025
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants