-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[SE-3381] Allows adding new tinymce plugins through platform configuration #25695
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
[SE-3381] Allows adding new tinymce plugins through platform configuration #25695
Conversation
|
Thanks for the pull request, @nizarmah! I've created OSPR-5264 to keep track of it in JIRA, where we prioritize reviews. 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:
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. |
|
@nizarmah Thank you for your contribution. Please let me know once it is ready for a review. |
|
@natabene small note by the way, I know I have a bunch of pull requests open at the moment. I just wanted to let you know that even if I haven't made any changes on a pull request, I haven't abandoned any of them. I'm keeping good track of them, and switching between them depending on the work's priority internally. 👍 |
1b56061 to
e6fc4de
Compare
|
Apparently, all it took to fix the python build was 2 commits, rasied to the power of 3 🙂 |
pkulkark
left a comment
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.
LGTM 👍
- I tested this: verified the new tinymce plugin is installed correctly as described in the testing instructions
- I read through the code
|
@nizarmah Could you please include documentation about this new extension point in |
|
Alright, so what has been addressed is the following:
|
|
@bradenmacdonald sorry, I'll need you to hold slightly on reviewing this ticket. There's something that I should've checked for, and if this PR would break Multiple App Servers. The reason is, that we're doing changes to So I'll be building multiple app servers to verify that the hash is identical 👍🏼 |
|
@bradenmacdonald Sure. |
|
@bradenmacdonald thanks a lot for being patient with me 😄 I ended up creating 5 different servers and made sure that the bundled So now that I've verified the change doesn't affect multiple app server support, this is ready for your review again 👍🏼 |
|
@nizarmah Unfortunately there seems to be an error on the sandbox - the visual editor is not displaying: |
pavelib/assets.py
Outdated
| static_root_lms=static_root_lms, | ||
| static_root_cms=static_root_cms | ||
| static_root_cms=static_root_cms, | ||
| js_env_extra_config=js_env_extra_config |
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.
Nit: please add a trailing comma, to get nicer diffs in the future.
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.
Yeap, sorry about missing that 👍🏼 This should be addressed now 😃
|
@bradenmacdonald this is ready for your review again. Sorry about the problem you faced earlier! I added some explanation about it in the changes you requested 👍🏼 Please note that there seems to be a problem with one of the builds on the whole edX platform, so the currently failing python test isn't a result of the changes I did in this pull request. |
1aca766 to
6360185
Compare
pavelib/utils/envs.py
Outdated
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.
Does this return a string or a decoded JSON object?
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.
This returns a string, since it changes the True values to true which would be invalid in a Python object.
I'll update the docstring to mention it in a better way. 👍🏼
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.
Addressed 👍🏼
Updated to
:return: json string value of the django setting
pavelib/assets.py
Outdated
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.
I think that here js_env_extra_config_setting is a string right? So "string" or {} seems like inconsistent typing - should it be js_env_extra_config_setting or "{}" ? Or is js_env_extra_config_setting an object already?
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.
js_env_extra_config_setting is a string, yes.
You're right, it is inconsistent. I'll update this to js_env_extra_config_setting or "{}". In addition, I'll update the tests too, I added comments to address those changes 👍🏼
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.
Addressed 👍🏼
bradenmacdonald
left a comment
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.
Thanks for your patience and diligence here, refining this approach and documenting it!
👍 if you address these last questions, rebase and squash into a single commit with a clear commit message.
Please also do a quick test to make sure that this doesn't introduce any problems when the setting is not set (i.e. default values everywhere).
- I tested this: on the sandbox
- I read through the code
- I checked for accessibility issues
- Includes documentation
pavelib/utils/envs.py
Outdated
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.
This returns a string, since it changes the True values to true which would be invalid in a Python object.
I'll update the docstring to mention it in a better way. 👍🏼
pavelib/assets.py
Outdated
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.
js_env_extra_config_setting is a string, yes.
You're right, it is inconsistent. I'll update this to js_env_extra_config_setting or "{}". In addition, I'll update the tests too, I added comments to address those changes 👍🏼
6360185 to
1c3b8bf
Compare
|
Your PR has finished running tests. There were no failures. |
|
@bradenmacdonald It's my pleasure! Your comments are something I look forward to, because I always end up learning something new, whether about the edX platform or on a personal level 😃 I addressed the comments you raised, and I also squashed the commits. Regarding testings, I deployed two new sandboxes:
I have tested both sandboxes, and the TinyMCE editors are running great on both 👍🏼
|
|
@nizarmah 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
…tor (openedx#25695) (cherry picked from commit 1e872d4)
…tor (openedx#25695) (cherry picked from commit 1e872d4)
…tor (openedx#25695) (cherry picked from commit 1e872d4)

This makes it possible to install new tinymce plugins through the environment settings.
This PR is responsible for adding the tinymce plugin settings to the tinymce javascript configuration.
JIRA tickets: SE-3381, SE-3247, OSPR-5263, OSPR-5264
Dependencies:
Sandbox URL:
Testing instructions:
staff@example.com/edxAuthor Notes and Concerns:
Reviewers
Settings