-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Cover Block: Show spinner while uploading #25401
Cover Block: Show spinner while uploading #25401
Conversation
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 working on this @cpapazoglou 👍
I haven't checked the changes, but If I recall correctly there have been discussions about inner spinners
, that could make the UI 'weird/confusing' if there are lots of them.
Probably not the case here since it's shown on Image block as well, but..
@jasmussen @mapk - can you share your thoughts here? Thanks.
Thank you for the PR! The spinner conflicts a little bit with the text in the cover block, but given it's the same behavior for the image block when uploading, this may be an acceptable interim step towards a better spinner/upload design overall (such as showing an upload progressbar as a blue line at the top of the block). Question, though: does #25171 conflict with this? |
@jasmussen Since we have included the global |
I agree the visual conflict with the text placeholder makes this a bit odd. Is there any CSS positioning that can be done to move the spinner 12px down without adding to the complexity too much? |
Hey @mapk, since we don't know whether the user has added some text, would you prefer positioning the spinner to the top of the image? This seems to be the safest position. |
In the shipping product right now you can upload an image and it just stays in the placeholder state until it's uploaded. To address Mark's point, perhaps we could stay in that placeholder state, in a dimmed fashion (perhaps fully white overlay) with a spinner in the center, and then only invoke the actual Cover block once the image is uploaded? I'm not sure if that would be an onerous amount of work. |
@jasmussen In that case we would need to account for image replacements too, in which case showing the placeholder and thus hiding all the text editing being already done might confuse the user and lead them to abandon / cancel? Showing the image with a spinner:
How would you feel placing the spinner in the top? Personally, I prefer it behind the text because the user can perceive it easily ;-)! |
Good point. Though the spinner is barely visible in that case. The preview of the image is less important in the transient state, what happens if you increase the opacity of the scrim radically? I.e. what if the white layer above is 80% opaque? (Or, if you'r making the image transparent, what if the image in the transient state is only 20% visible)? |
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 tested this using both image and video and using a variety of backgrounds and opacity settings. Overall it's a better experience than what's currently in master
so I'm all for merging it and iterating.
Obviously there will be instances where the spinner won't show up (eg: if you set the overlay color to white and the opacity to 100%) but on the whole it covers most use cases.
Screenshot (Image)
Screencapture (Video)
It would be good to get a 👍 from @jasmussen on the Design side before this merges however.
Thanks a lot @getdave for the review!
That is what I believe too! |
This is what I see: This is okay, and it does not preclude further iteration. As a larger undertaking, I would very much like to see an entirely new loading experience, perhaps a progressbar at the top in the spot color of wp-admin, moving from the left of the block all the way to the right, unified across all blocks that let you upload. And perhaps a similar progress-bar inspired "spinner" replacement that works with that, for when the state is just transient without any defined temporal end. But in the mean time, this makes it the same as the image block, which is fine. Thanks so much for the PR. Ship it! |
Description
Fixes #23206
How has this been tested?
Image
Video
Screenshots
Types of changes
Checklist: