Skip to content

fix:remove duplicate markdown_edited save request - #2112

Merged
kdmccormick merged 1 commit into
openedx:masterfrom
mitodl:anas/fix-library-markdown-warning
Jun 10, 2025
Merged

fix:remove duplicate markdown_edited save request#2112
kdmccormick merged 1 commit into
openedx:masterfrom
mitodl:anas/fix-library-markdown-warning

Conversation

@Anas12091101

@Anas12091101 Anas12091101 commented Jun 10, 2025

Copy link
Copy Markdown
Contributor

Description

This PR fixes the issue in #2099 by removing the unnecessary duplicate save request of markdown_edited value to the backend.

Useful information to include:

  • Which edX user roles will this change impact? "Course Author", "Developer" and "Operator".
  • 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

#2099

Testing instructions

Course Testing:

  • Enable markdown editor for a course
  • Create a problem block using the markdown editor
  • Verify markdown editor opens when editing the problem

Library Testing:

  • Switch to Teak release
  • Cherry-pick commits:
  • Create a problem using markdown editor - verify no warnings appear
  • Edit the problem - verify no warnings appear during editing

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.

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

Copy link
Copy Markdown

Thanks for the pull request, @Anas12091101!

This repository is currently maintained by @bradenmacdonald.

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.

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

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Jun 10, 2025
@Anas12091101
Anas12091101 force-pushed the anas/fix-library-markdown-warning branch from 8453c82 to 1cdc974 Compare June 10, 2025 10:41
@Anas12091101
Anas12091101 force-pushed the anas/fix-library-markdown-warning branch from 1cdc974 to f07648a Compare June 10, 2025 10:45
@codecov

codecov Bot commented Jun 10, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.03%. Comparing base (0e2cab2) to head (f07648a).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2112      +/-   ##
==========================================
- Coverage   94.03%   94.03%   -0.01%     
==========================================
  Files        1163     1163              
  Lines       24424    24423       -1     
  Branches     5294     5180     -114     
==========================================
- Hits        22968    22967       -1     
  Misses       1388     1388              
  Partials       68       68              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

dispatch(actions.problem.updateField({ isMarkdownEditorEnabled: true }));
const { blockValue } = state.app;
const olx = get(blockValue, 'data.data', '');
const content = { settings: { markdown_edited: true }, olx };

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just confirming... it is not necessary to set markdown_editor: true? Does something else take care of this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, we’re also setting the markdown_edited value in the parseState function. That’s what returns the payload used when saving a problem.

@kdmccormick
kdmccormick merged commit d440394 into openedx:master Jun 10, 2025
@github-project-automation github-project-automation Bot moved this from Needs Triage to Done in Contributions Jun 10, 2025
Anas12091101 added a commit to mitodl/frontend-app-course-authoring that referenced this pull request Jun 10, 2025
Removes the unnecessary duplicate save  request of markdown_edited
value to the backend.

Part of: openedx#2099
Will be backported to Teak.
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.

3 participants