Skip to content
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

fix: do not open mfe editors automatically on block paste [FC-0062] #35728

Merged

Conversation

navinkarkera
Copy link
Contributor

Description

Fix for: openedx/frontend-app-authoring#1436

Testing instructions

  • Disable contentstore.new_studio_mfe.use_new_unit_page waffle flag to open legacy unit page.
  • Enable new_core_editors.use_new_problem_editor, new_core_editors.use_new_video_editor & new_core_editors.use_new_text_editor waffle flags to use new mfe editors.
  • Copy any text, video or problem block and paste it, without the changes in this PR, it will automatically open mfe editor on paste.
  • Checkout this PR and try pasting again, it should directly paste the component without opening the editor.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 25, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Oct 25, 2024

Thanks for the pull request, @navinkarkera!

What's next?

Please work through the following steps to get your changes 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.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/wg-maintenance-edx-platform. Tag them in a comment and let them know that your changes are ready for review.

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
Contributor

@rpenido rpenido left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Thank you for your work, @navinkarkera!

  • I tested this using the instructions from the PR
  • I read through the code
  • I checked for accessibility issues N/A
  • Includes documentation

@@ -558,6 +558,7 @@ def _create_block(request):
"locator": str(created_xblock.location),
"courseKey": str(created_xblock.location.course_key),
"static_file_notices": asdict(notices),
"upstreamRef": str(created_xblock.upstream),
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, seems like we have been inconsistent about snake_case vs. camelCase in this JSON response.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, majorly camelCase at least in this file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, generally we use snake case for JSON though.

Copy link
Contributor

@bradenmacdonald bradenmacdonald 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. But how does this fix it?

@navinkarkera
Copy link
Contributor Author

@bradenmacdonald I had updated container.js in a PR before to check for upstreamRef before redirecting users to mfe editors.

https://github.com/open-craft/edx-platform/blob/c432a8f05091fb1f7f707ccb4c06ad0fd8b989e4/cms/static/js/views/pages/container.js#L815-L829

@bradenmacdonald bradenmacdonald merged commit 949378f into openedx:master Oct 28, 2024
49 checks passed
@bradenmacdonald bradenmacdonald deleted the navin/fix-editor-open-on-paste branch October 28, 2024 18:34
@bradenmacdonald
Copy link
Contributor

Thanks @navinkarkera. Please backport to Sumac as well.

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

@navinkarkera
Copy link
Contributor Author

@bradenmacdonald Sumac backport PR: #35729

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.

5 participants