Studio-frontend in-context image selection modal#17834
Conversation
e363546 to
f859d3b
Compare
|
Your PR has finished running tests. |
f859d3b to
d14ec65
Compare
|
Your PR has finished running tests. |
dsjen
left a comment
There was a problem hiding this comment.
Looking good! I left a few questions and also there's the baseURL and static link issues we ran into earlier today. Thanks!
cms/templates/container.html
Outdated
There was a problem hiding this comment.
Should this be dynamic instead?
There was a problem hiding this comment.
Should be wrapped in gettext for translations?
There was a problem hiding this comment.
Nit: might be a little cleaner by setting it all at once?
imgAttrs = {
src: img.attr('src'),
alt: img.attr('alt'),
...
}
There was a problem hiding this comment.
Because of the baseAssetUrl stuff, I'm now initializing imgAttr like this:
imgAttr =
baseAssetUrl: @base_asset_urlSo, I can't just initialize it in that if condition now. Unfortunately, the coffeescript compiler the platform is using doesn't seem to support the object spread syntax which would allow me to clean that code up. E.g.
imgAttr =
imgAttr...
src: img.attr('src')
... etc ...I get a syntax error if I try that.
package.json
Outdated
There was a problem hiding this comment.
I guess this will need to be updated when a new version of SFE is released!
0adc889 to
cd1aa68
Compare
|
Your PR has finished running tests. |
cd1aa68 to
90f3602
Compare
|
Your PR has finished running tests. |
2 similar comments
|
Your PR has finished running tests. |
|
Your PR has finished running tests. |
172bd5f to
45b4e0d
Compare
|
Your PR has finished running tests. |
Open edit image modal via a custom signal Send img tag attributes in open signal Send natural image dimensions if no attr specified Add new modal button in addition to old button Also load built CSS when waffle switch on Swap out TinyMCE toolbar button on waffle switch Pass LANGUAGE_CODE from Django to template to studio-frontend Define request.LANGUAGE_CODE in test_container_page.py
45b4e0d to
d31249b
Compare
|
Your PR has finished running tests. |
|
jenkins run lettuce |
|
jenkins run quality |
|
Your PR has finished running tests. |
|
HOORAY!!!!!!! |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Friday, April 06, 2018. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
|
EdX Release Notice: This PR has been rolled back from the production environment. |
This is only needed to make the legacy editor work on containers. Added originally via #17834 However, now that we use the new MFE text editor even on this legacy page, we don't need to load the old image modal in the old text editor.
This is only needed to make the legacy editor work on containers. Added originally via #17834 However, now that we use the new MFE text editor even on this legacy page, we don't need to load the old image modal in the old text editor.
This is only needed to make the legacy editor work on containers. Added originally via openedx#17834 However, now that we use the new MFE text editor even on this legacy page, we don't need to load the old image modal in the old text editor.
This is only needed to make the legacy editor work on containers. Added originally via openedx#17834 However, now that we use the new MFE text editor even on this legacy page, we don't need to load the old image modal in the old text editor.
Adds a new waffle switch:
studio.enable_in_context_image_selection. If on, Studio will load the studio-frontend code for the editImageModal component and inserts it into the DOM. The TinyMCE insert image toolbar button will send a signal to open up the modal when the waffle switch is on instead of opening the old modal.The studio-frontend PR should be merged and a new release should be made before this PR is merged.
Sandbox with this branch: https://studio-thallada.sandbox.edx.org/ Try editing an HTML component in a unit.
@edx/educator-dahlia