-
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
Components: Introduce a basic ProgressBar component #53030
Conversation
Size Change: +619 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
Flaky tests detected in 664a4de. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5714030435
|
Thanks, I appreciate your help, @alexstine! Sorry about it, but this PR intends only to introduce the component and not introduce any usage. I'll make sure to ping you at #53032 for an accessibility review - that PR introduces an actual production usage for that component. |
Good point, @jasmussen! I've added some |
Thanks, everyone, for the reviews! I've pushed some changes to accommodate the latest feedback, so I'd appreciate one final look before I land it. Regarding accessibility testing, I'm hoping to make it easier for testing once this new component is utilized in the site editor loading experience in #53032. |
@mirka thanks, your feedback has been very helpful - I've now addressed it all! I think the component is in a really good state for merging now, but I'd love to get your eyes on it before that. Let me know what you think. |
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.
Looks great, thank you for all the polish! 🚀
Digging the indeterminate animation — great job! |
What are your thoughts on the standard https://html.spec.whatwg.org/multipage/form-elements.html#the-progress-element |
We're using an underlying |
In preparation for WP 6.4, I've added a dev note in the PR description. |
Sorry I came here via the Dev Note which I am surprised included this since it is a Private API. Never mind my concerns |
What?
This PR introduces a basic horizontal
ProgressBar
component.I'd love to get some design feedback since this is done from scratch and is using some component package colors by default, for consistency with the rest of the components. We're introducing some props to allow easier changing of the colors.
Why?
While it can be useful in various places, we're aiming to use this new component to replace the
Spinner
component that is currently utilized in the site editor loading experience. I've started work on this in #53032.How?
We're introducing a basic component with tests, stories, and README - all the basic pieces for a new component.
Testing Instructions
npm run storybook:dev
Testing Instructions for Keyboard
None
Screenshots or screencast
Indeterminate:
Screen.Recording.2023-07-27.at.15.02.37.mov
Determinate:
Screen.Recording.2023-07-27.at.15.03.37.mov
✍️ Dev Note
Introducing a new experimental
ProgressBar
componentA new experimental
ProgressBar
component has been introduced to the@wordpress/components
package.The
ProgressBar
component supports two modes:The component is capable of switching between modes depending on the progress
value
prop that's passed to it.The primary need and motivation for creating this new component is currently in the Site Editor, where it's already utilized for displaying the loading progress of the editor.