-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Edit Site: Improve loading spinner colors #51800
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
Conversation
Thanks for the fast work, this is an interesting one. I appreciate you using the theme colors here, but my expectation was to use the wp-admin spot color blue for the track indicator, and a semitransparent black as the track. I think that's also still what I'm leaning towards, but CC: @WordPress/gutenberg-design for additional input. |
I think @jameskoster also suggested using that same blue for the indicator, but IMHO, it won't work very well with some backgrounds. By using the theme colors we ensure that this problem won't happen. I think using the wp-admin blue was fine before changing to the current global style background, but now that we're using the theme background, I believe we need to use the theme colors for the spinner as well. Also, in my testing, this proposed solution appears to look much better with the themes and style variations I've tested with. With that in mind, is there a good reason to still prefer the wp-admin blue? |
Size Change: +1.3 kB (0%) Total Size: 1.42 MB
ℹ️ View Unchanged
|
This solution works really well, but the tricky thing about using the theme color is that the user could easily mis-interpret the spinner to be part of their actual site, IE something they'd see on the frontend as it loads. For that reason I think those colors are best avoided. Joen's suggestion seems good to try. It might look a bit strange on a site with a blue background color but it's hard to say for sure without trying it. |
My gut reaction as well, although this PR is interesting.
Consistency. The loading UX should be the same throughout the interface; it's a learned and familiar affordance for helping folks know something is still happening. |
The black/transparent track should be enough to provide contrast with the blue highlight, even if it might look weird on a blue background. And yes, consistency is one thing. Another thing is that the spinner is part of the UI, and not the website itself. I think there's always wiggleroom in cases like these, but I still lean towards admin colors unless it's completely broken. |
If contrast was still an issue, we could add a border / box shadow? |
Thank you all for the great feedback! For the protocol, I personally still disagree, since the suggested colors don't look well in many of the style variations I've tried, but I'm happy to disagree and commit. I've gone with the default blue track indicator and the semi-transparent black in #51857 - I'd appreciate your feedback! I like that approach because it's way more straightforward and simple than the one here. |
I'd be open to that, although I'm not sure it will be consistent with the rest of the admin UI - what do you think, design folks? |
Closing in favor of #51857. |
What?
This PR improves how we handle the colors of the site editor loading spinner. In #51709 we already improved the loading background to work with the current background (gradients supported too), and to make things more natural, we started using the text color for the spinner indicator color, Here, we're improving the spinner colors, both of the indicator and the track.
Why?
This makes it a more natural experience as the site loading finishes and the editor canvas is presented.
How?
Previously, we were using the text color for the spinner indicator color, but now, we're getting more clever and using:
We're updating the Spinner component to support an additional prop for track styles.
We're also extracting the logic for the highlighted style preview colors to a hook so we can reuse it.
Testing Instructions
Testing Instructions for Keyboard
None.
Screenshots or screencast
Here are spinner previews with all default style variations of the
twentytwentythree
theme:Screen.Recording.2023-06-22.at.14.57.49.mov
Screen.Recording.2023-06-22.at.14.58.11.mov
Screen.Recording.2023-06-22.at.14.59.05.mov
Screen.Recording.2023-06-22.at.14.59.28.mov
Screen.Recording.2023-06-22.at.14.59.45.mov
Screen.Recording.2023-06-22.at.15.00.06.mov
Screen.Recording.2023-06-22.at.15.00.20.mov
Screen.Recording.2023-06-22.at.15.00.47.mov
Screen.Recording.2023-06-22.at.15.01.03.mov
Screen.Recording.2023-06-22.at.15.01.20.mov
Screen.Recording.2023-06-22.at.15.01.36.mov
Screen.Recording.2023-06-22.at.15.01.50.mov