Skip to content
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

Consider changing image upload placeholder #5150

Closed
dkonopka opened this issue May 15, 2018 · 5 comments · Fixed by ckeditor/ckeditor5-image#219
Closed

Consider changing image upload placeholder #5150

dkonopka opened this issue May 15, 2018 · 5 comments · Fixed by ckeditor/ckeditor5-image#219
Assignees
Labels
package:image type:improvement This issue reports a possible enhancement of an existing feature.
Milestone

Comments

@dkonopka
Copy link
Contributor

At this moment we are using svg as placeholder with plain text Uploading image... and progress bar animation. The problem is there is no way to translate this text, because it's hardcoded in the svg file.

upload-placeholder

We should think about something like centered spinner instead of plain text.

cc @oleq @Reinmar

@dkonopka
Copy link
Contributor Author

dkonopka commented May 21, 2018

I've made research and there is no perfect solution to change current placeholder. I was thinking about two possibilities:

1. Inline SVG animation

It is so simple and perfect solution to display inline SVG animations (SMIL), but sadly there is no Edge support 😠

2. CSS Animation

That was also a solution, but in our case where svg is transformed to base64 in img[src] we can't control it via CSS.

3. New element inside <figure>

I don't know if it is ok to create new element inside figure while uploading.

Proposal

Let's use animated SVG and create nice-looking first frame of loader (which will be displayed as static on Edge). Note: placeholder has grey background, it's about screencast quality and it's not final proposal, we just need to decide about loader.

Every browser (Chrome, Safari, FF)

loader-v1

...and Edge 😢

edge-loader

Question

If we'll decide to go with animated, centered loader, should we remove infinite progress bar for the user?

@oleq
Copy link
Member

oleq commented May 22, 2018

I don't know if it is ok to create new element inside figure while uploading.

I think that would be the easiest way because it allows CSS animations to create some beautiful placeholders. What about the engine side, though? cc @scofalik

@oskarwrobel
Copy link
Contributor

oskarwrobel commented May 22, 2018

I think that would be the easiest way because it allows CSS animations to create some beautiful placeholders. What about the engine side, though? cc @scofalik

We already do it to show upload progress bar or upload complete icon. ez.
See https://github.com/ckeditor/ckeditor5-engine/blob/master/src/view/uielement.js.

@oleq
Copy link
Member

oleq commented May 23, 2018

Let's switch to CSS then. You can create awesome animated stuff with it.

@dkonopka can you come up with the right, subtle style for us, maybe (?) together with some text (which will be localizable in that situation) and propose something?

@dkonopka
Copy link
Contributor Author

So, you can find here proposals of loaders based on single div or span (except text container).
https://codepen.io/k0n0pka/full/KeKdbd/

By the way, exists a lot of beautiful CSS-only loaders, but based on plenty of spans, I'm not so sure about performance in that case.

WDYT guys, should we go with default "spinner" or choose something modern like moving balls?

@oskarwrobel oskarwrobel self-assigned this Jul 4, 2018
oleq referenced this issue in ckeditor/ckeditor5-image Jul 10, 2018
Feature: Implemented a CSS–styled image upload loader. Closes #207.
oleq referenced this issue in ckeditor/ckeditor5-theme-lark Jul 10, 2018
Feature: Implemented a CSS–styled image upload loader (see ckeditor/ckeditor5-image#207).
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-image Oct 9, 2019
@mlewand mlewand added this to the iteration 19 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:improvement This issue reports a possible enhancement of an existing feature. package:image labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:image type:improvement This issue reports a possible enhancement of an existing feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants