-
Notifications
You must be signed in to change notification settings - Fork 37
Added CSS upload loader #219
Conversation
theme/imageuploadloader.css
Outdated
&::before { | ||
content: ''; | ||
position: relative; | ||
width: var(--ck-upload-placeholder-loader-size); |
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.
Styles like width
, height
, belong to Lark. position
, top
, content
, flex
should stay here.
@@ -1 +1 @@ | |||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 250"><g fill="none" fill-rule="evenodd"><rect width="700" height="250" fill="#FAFAFA" rx="4"/><text fill="#5F6F77" font-family="Arial,sans-serif" font-size="24"><tspan x="247.9" y="135">Uploading image…</tspan></text></g></svg> | |||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 250"><g fill="#FAFAFA" fill-rule="evenodd"><rect width="700" height="250" rx="4"/></g></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.
BTW, why do we need that SVG? It's displaying a gray area, that's what it does? Couldn't we use a CSS element instead?
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.
SVG file is still used as an image source while the upload is in progress because:
- image can't have an empty source
- svg file sets the size of the image and this size is scalable (e.g. when switching image to side image)
I can see 2 scenarios:
The first scenario looks great: But the later looks as follows and I find this double indicator an overkill. Too much movement, pure redundancy. Let's stick to the spinner in that situation, WDYT? |
☝️ Good catch! "Infinite progress top bar" should be removed if someone else is uploading image, I just completely forgot to get rid of it. |
I also did notice it and agree that 2 "spinners" (center and top) is redundancy. But it is not a big issue for me. |
The spinner is displayed during |
Suggested merge commit message (convention)
Feature: Added CSS upload loader. Closes ckeditor/ckeditor5#5150.
Additional information
Required ckeditor5-theme-lark/t/ckeditor5-image/207
Hardcoded text
Uploading image...
has been replaced by a nice looking CSS spinner.SVG file is still used as an image source while the upload is in progress because:
Preview