-
Notifications
You must be signed in to change notification settings - Fork 132
Html button in text component editor backport #2064
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
Html button in text component editor backport #2064
Conversation
Thanks for the pull request, @tonybusa! 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. |
@tonybusa: thank you so much! But I think we need to change the base from master to release/teak. Let me know! |
@tonybusa flagging Maria's comment above, thanks! |
I just tested this locally and it's working as expected (sorry for the cut view): Screencast.from.24-06-25.15.17.52.webmThe only thing I noticed with the editor was that when pressing "save" I had to manually close the modal view, not sure if that's the expected behavior. After noticing this, I went to the Teak sandbox to check whether this worked the same there, and couldn't replicate it. Also, in the teak sandbox, the HTML button is working correctly. I'm not sure if maybe this commit was backported already by tutor? |
@mariajgrimaldi You should not have to manually close the modal if you've already clicked save. That seems like a regression. And yeah, it seems like this was already backported in #2065 . I'm not sure why this PR was duplicated. Should we just close it? |
Oh, I didn't realize 🫣. Thank you! Yes, let's close it. I couldn't reproduce the modal issue on the teak sandbox, though. I'll update my teak branch and test again. |
It's working! So no regression :) Thank you all! |
Description
Backport: #1869 and #2043
Supporting information
Fixes: openedx/wg-build-test-release#466
Testing instructions
Go to Section > Subsection > Unit (Text)
Click on the "text" button in the Add Components panel
Text editor opens in a modal
Click on the text editor HTML functions
Other Information
The CodeEditor hook createCodeMirrorDomNode is doing a lookup on CODEMIRROR_LANGUAGES but we never set the lang on the component. Since this is referenced in the project to be specifically an HTML editor, I hardcoded the "html" string to the prop for the lookup to succeed. Otherwise, there is a new change on master that includes the default as xml() (this wasn't included in the current teak release).
See default here: https://github.com/tonybusa/frontend-app-authoring/blob/html-button-in-text-component-editor/src/editors/sharedComponents/CodeEditor/hooks.js#L103