-
Notifications
You must be signed in to change notification settings - Fork 38
Added loading svg prior to init #71
base: master
Are you sure you want to change the base?
Conversation
|
||
loadingSpinner = document.createElement('img'); | ||
loadingSpinner.setAttribute('class', 'loading-spinner'); | ||
loadingSpinner.setAttribute('src', 'PopcornEditor/resources/ring-alt.svg'); |
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.
Sanity check here: is this the proper way we should read resources from the library outside of the iframe?
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.
Yeah, I'm a bit confused. This is how I see it atm:
- PopcornEditor loads an
iframe
- In the
iframe
is the actual editor, which includesPopcornEditor/resources/ring-alt.svg
. - This code reaches into the src that's meant for the content inside the
iframe
to get an image.
If the stuff inside src
is meant to be its own beast, I'd put this image outside in the context of PopcornEditor.js
.
Otherwise, ¯_(ツ)_/¯ sure! This makes sense.
not sure on the outside an iframe question. ').attr({'id','loading'}).css({width:"100%", display:"flex", ..})...
|
@secretrobotron can you review and merge? |
loadingDiv.style.height = '100%'; | ||
loadingDiv.style.backgroundColor = 'white'; | ||
loadingDiv.style.display = 'flex'; | ||
loadingDiv.style.justifyContent = 'center'; |
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.
If it meshes with the architecture you're thinking here, I'd put this in index.html
or some css file, just to be clean.
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.
index.html
is just meant to be a an example though correct?
loadingSpinner.style.width = '30%'; | ||
|
||
loadingDiv.appendChild(loadingSpinner); | ||
editor.appendChild(loadingDiv); |
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.
Same comment about putting this in index.html
as above. Could probably go within the html there, no?
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.
Same goes for above. PopcornEditor.js
can be included in anyone's web page so I assume that while they would use index.html
as a reference, they shouldn't necessarily have to copy over the css and stuff in it.
@Nolski can you have a look and let us know how to proceed? We want to deploy this before Monday—that's when we expect a relative surge of traffic until the election |
Sure thing! I'll try to take a look tonight or tomorrow. |
How's this looking? I pushed back on a couple of the comments but am happy to discuss either way |
Resolves #70