-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Edit Site: Use progress bar for loading screen #53032
Conversation
Size Change: +240 B (0%) Total Size: 1.51 MB
ℹ️ View Unchanged
|
9c91c36
to
d160f69
Compare
f40abc7
to
177066e
Compare
e2aa008
to
ba664c6
Compare
@alexstine I think all your feedback has been addressed - let me know what you think when you get a chance! I'd love to be able to proceed with shipping this one, which seems to be pending only accessibility feedback at this time. |
@tyxla It is still not working for me and I'm not sure why. Exactly where in the editor has Thanks. |
Thanks for your review, @alexstine! That's correct - I've added the I've fully followed the instructions you suggested and inspecting the accessibility tree in Chrome's web tools proves that the region element properly captures the loading state coming from the progress bar element that describes it. So I'm not really sure what else can be done to help test this. In #53671 I've opened a PR that enforces a constant loading state, so you wouldn't have to slow your browser down; the loading state will just be infinitely displayed. Feel free to test with that PR if that helps. Let me know what else I can do to help you test this. |
@tyxla In your testing PR, I do not see those ARIA attributes. Can you verify they exist? I can verify the page does not load, but those attributes are not there. Thanks. |
Sorry for the trouble! I'm not sure what's the issue, but I can verify they exist, as demonstrated by the following explanation and screenshots. There's the
which has the following accessibility tree:
and there's the corresponding
which has the following accessibility tree:
On top of the fact that all the elements are there, the provided accessibility trees demonstrates that the canvas wrapper Let me know if that helps! |
52e7767
to
ddc0096
Compare
@tyxla Seems to be working now, sorry about this. I was forgetting to do the famous |
@alexstine that's great news, thanks for confirming 🙌 Thanks, everyone for the thorough feedback 🚀 |
Work to change the progress bar to a determinate one happens in #53399. |
What?
This PR attempts to use the progress bar component from #53030 for the site editor loading screen.
This is still using the indeterminate progress bar, but ideally, we're aiming to implement a determinate one.
Ready for review
but currently blocked by:Theme
via private APIs #53262tabIndex
to make focusable #53383and needs to be rebased once it lands.cc @andrewhayward @alexstine for accessibility feedback, as discussed previously in #53030.
Why?
We believe that using a progress bar instead of a spinner will be a better loading experience for the user. Especially if we provide better feedback on the loading progress, which we're ultimately aiming to get to.
How?
We're extracting the highlighted colors from global styles previews to the
useStylesPreviewColors()
hook so we'd be able to reuse them for the loading experience.We're replacing the
Spinner
with aProgressBar
for the site editor loading experience.For theming/colors, we're using the
@wordpress/components
Theme system, using the first highlighted color as an accent color (falling back to the text color if none), and the background color as a background. Then we rely on the theming system to generate the gray for us, and we use the accent color as-is. I could use some feedback for that particular part, and whether anyone has a good idea for what colors to use so they'd work best in all scenarios.Furthermore, this PR still includes a couple of improvements to the
ProgressBar
component that we're aiming to discuss and land separately in #53347 and #53349.The next step after this PR will be to experiment with making the progress determinate.
Testing Instructions
Testing Instructions for Keyboard
Similar to the above.
Screenshots or screencast
Site editor loading experience with the progress bar:
Screen.Recording.2023-08-04.at.15.57.02.mov
Demo with all theme style variations of the
twentytwentythree
theme:Screen.Recording.2023-08-04.at.15.54.21.mov