-
Notifications
You must be signed in to change notification settings - Fork 195
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
[BB-6151] Update TinyMCE Editor static file references to upgraded version 5.x #1869
[BB-6151] Update TinyMCE Editor static file references to upgraded version 5.x #1869
Conversation
Thanks for the pull request, @tecoholic! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
@natabene, would you mind approving the CI on this PR? |
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.
@tecoholic, while the LMS is working for me, I cannot use it with Studio on my devstack. When I switch the "Response Editor" to "WYSIWYG Editor", I'm getting the following warning:
Source map error: Error: request failed with status 404
Resource URL: http://localhost:18000/static/dist/openassessment-lms.d67e4d76d91bec14c4f5.js
Source Map URL: openassessment-lms.d67e4d76d91bec14c4f5.js.map
Then, I'm getting a 404 on http://localhost:18010/static/studio/bundles/js/factories/themes/silver/theme.js. The editor doesn't load at all there.
I'm running make dev.static.studio
after installing this version of XBlock. Restarting the Studio container doesn't help too. Am I doing something incorrectly?
Also, please bump the version in __init__.py
and in package.json
.
@Agrendalath The source file missing error seems to because of them being gitignored. So you will have to do a npm build locally if you want then to load I guess. However, the theme file missing is an issue. Let me figure that out and let you know. |
@Agrendalath The issue is now fixed with 2c3dea8. |
@tecoholic, the editor in the main Studio view is working now, but I'm getting the 404 on I don't know if this is only a devstack-specific issue - I have spawned a new sandbox to test it there. However, I believe we'll need to fix it anyway if it's broken in the devstack. |
@Agrendalath I see. I am guessing the theme is not getting properly set for the |
I found another file initializing the TinyMCE with its own configuration. Now the editor should work in:
|
|
|
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.
@tecoholic, please bump the version in __init__.py
and package.json
.
👍
- I tested this: tested the XBlock on the sandbox and locally
- I read through the code
- I checked for accessibility issues: n/a
- Includes documentation: n/a
- I made sure any change in configuration variables is reflected in the corresponding client's
configuration-secure
repository: n/a
@natabene, this is ready for your review. It's a dependency for openedx/edx-platform#30335. |
This is a Lilac backport of openedx#1869 Replaces the version 4.x references of TinyMCE static files with version 5.x and removes the workaround required for TMCE 4 from oa_editor_tinymce.js Related platform PR: openedx/edx-platform#30335
Version bumped to 4.5.0 |
@tecoholic Thank you for your contribution. @Agrendalath Got it, thanks. |
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.
👍 Works great @tecoholic ! And thank you for providing such complete testing instructions.
I noticed one issue which would warrant a follow-up ticket: Using the WYSIWYG editor + Allowing LaTeX responses doesn't work well -- there's no way to get a good LaTeX preview with the TinyMCE editor.
- I tested this on my devstack using the PR testing instructions.
- I read through the code.
- I checked for accessibility issues by following the TinyMCE accessibility instructions.
-
Includes documentationN/A - Commit structure follows OEP-0051
@tecoholic Could you resolve the conflicts here to prepare this for merge? Once that's done, I can merge and tag this if that's ok with you @Agrendalath ? |
@pomegranited Before you merge, can you please give heads up or coordinate in openedx-cc-core-applications Slack channel? |
@tecoholic Sure. I will resolve the conflicts and let you know. 👍 |
6d1beb5
to
ad1aec1
Compare
@pomegranited I have rebased the changes on to the master and resolved the conflicts. :) |
Thanks @tecoholic :) Hi @openedx/content-aurora -- does anyone have any objections to merging this change? |
@pomegranited @Agrendalath The CI tests are failing when installing JS dependencies as the @edx/paragon depends on React 16.x while
The current version of Edit: The |
Sorry @tecoholic, I wasn't aware of this build issue, but I do think that upgrading paragon to the latest possible version is the way to go here. You'll have to go through the paragon release notes to find out the impact of upgrading from 12.8.0 to 20.x.x. E.g., v20.0.0 has breaking changes, which look involved but well-documented. |
The upgrade of Paragon to 20.x is blocked by openedx/paragon#1559 |
Created PR #1889 to add a new command in |
HI @pomegranited,
I'm hoping that this'll resolve the issue with the translations failure but I'll be able to help further after knowing the result of these instructions. |
Thank you @UsamaSadiq ! |
@pomegranited I was getting the However I have run into another issue. All the files that are being pulled from transifex just has the following:
I was using the OC account and even created a new API token to double check it is not due to some invalid token. @UsamaSadiq Do you have any idea why this is happening? Also I had to change the Makefile command for pull_translations: ## pull translations from Transifex
- cd ./openassessment/ && tx pull -a -f --mode reviewed --minimum-perc=1
+ tx pull -a -f --mode reviewed --minimum-perc=1 |
@tecoholic, this is working correctly for me on your branch. Please make sure that your [https://www.transifex.com]
api_hostname = https://api.transifex.com
hostname = https://www.transifex.com
password = <TOKEN>
rest_hostname = https://rest.api.transifex.com
token = <TOKEN>
username = API I've shared the token with you through a different channel (though it's just a standard API token). I'm using |
@Agrendalath Thank you. I also have the same version of Transifex. And everything looks the same in my transifex file except the username which is in lowercase |
@Agrendalath I tried with the uppercase username and the API key you shared. I get the same results as before. Are you able to run
And when I open one of the mentioned files in the errors, I see this
|
@tecoholic, huh, that's odd. I tried this again and could reproduce it for some translations without an underscore ( There were some errors in the INFO:i18n.validate:
WARNING:i18n.validate:
it_IT/LC_MESSAGES/django.po:1411: 'msgid' and 'msgstr' entries do not both begin with '\n'
it_IT/LC_MESSAGES/django.po:1435: 'msgid' and 'msgstr' entries do not both begin with '\n'
it_IT/LC_MESSAGES/django.po:1499: 'msgid' and 'msgstr' entries do not both begin with '\n'
msgfmt: found 3 fatal errors I've added translation suggestions to Transifex, but I don't have permissions to accept them (cc: @UsamaSadiq). As a workaround, I've manually fixed these strings in the translation files. @UsamaSadiq, many languages appear to be duplicated in Transifex. E.g. in the resources we can see |
Update: since the CI was failing, I've also rebuilt statics (just in case) and updated source translations. However, I don't have permission to update them in Transifex, as tx push -s
# Getting info about resources
edx-platform.openassessment - Error while fetching stats, 404, not_found: No `Project` resource found with the identifier `o:open-edx:p:edx-platform`
edx-platform.openassessment-js - Error while fetching stats, 404, not_found: No `Project` resource found with the identifier `o:open-edx:p:edx-platform`
[##############################] (2 / 2)
Aborted
make: *** [Makefile:102: push_translations] Error 1 cc: @UsamaSadiq |
@Agrendalath Thanks you for finding the solution for this. Hopefully we will be able to wrap up this PR with this. |
@tecoholic @Agrendalath I don't have push rights on the Transifex projects either, but it looks like we have a bot to take care of that: https://github.com/openedx/edx-ora2/pulls?q=is%3Apr+author%3Aedx-transifex-bot+ @tecoholic There's a couple conflicts remaining, but once they're resolved, I can merge this. Can we aim for first thing UTC Thu 15 Sep? |
Replaces the version 4.x references of TinyMCE static files with version 5.x and removes the workaround required for TMCE 4 from oa_editor_tinymce.js Related platform PR: openedx/edx-platform#30335
1840e35
to
e968175
Compare
@pomegranited I have rebased the PR branch on master, resolved conflicts, rebuilt the static files and translations and pushed the changes. I have also run |
@tecoholic 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
…rsion 5.x (openedx#1869) * feat: replace references to tinymce v4 with v5 Replaces the version 4.x references of TinyMCE static files with version 5.x and removes the workaround required for TMCE 4 from oa_editor_tinymce.js Related platform PR: openedx/edx-platform#30335 Related changes: * fix: set tinymce base url so resources are loaded in studio * fix: theme files not loading on studio edit window * chore: bumped minor version to 4.5.0 * chore: update edx paragon to latest version, and fix failing tests due to paragon api change * fix: fix and update translations Co-authored-by: Agrendalath <[email protected]> (cherry picked from commit 6072196)
TL;DR - Replaces the version 4.x references of TinyMCE static files with version 5.x and removes the workaround required for TMCE 4 from oa_editor_tinymce.js
JIRA: - NA
What changed?
The edx-platform's TinyMCE is being upgraded from version 4.x to 5.x (v5.5.1) at openedx/edx-platform#30335. The upgrade breaks the ORA WYSIWYG editor as the TinyMCE files referenced in the oa_editor_tinymce.js are hard-coded to v4.x file paths.
make static
Developer Checklist
Testing Instructions
open-craft:tecoholic/BB-6151-upgrade-tinymce-to-v5
branch of the ORA in to lmsReviewer Checklist
Collectively, these should be completed by reviewers of this PR:
FYI: @openedx/content-aurora