-
Notifications
You must be signed in to change notification settings - Fork 8
Block Refresh: Use Spinner when ProgressBar component unavailable
#989
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
…ock-refreshing` class
Different versions of WordPress will output CSS classes in a different order; therefore seeInSource isn’t reliable. This helper method checks the element’s class attribute for the provided array of classes to check they exist.
… paragraph/paragraph and paragraph, depending on WordPress version
WordPress Playground🚀 Your PR has been built and is ready for testing in WordPress Playground! |
noelherrick
left a comment
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 tried to figure out if there was a way to reuse some of this configuration from tests.yml, but it for now I don't think the juice is worth the squeeze since the reusable workflows really is more targeted to a workflow that can be parameterized with different env vars.
Summary
This PR replaced the spinner with the Gutenberg
ProgressBarcomponent, resulting in errors when clicking the refresh button within a block in WordPress < 6.3.This PR resolves by using a spinner when the
ProgressBarcomponent is unavailable:WordPress 6.2.8:

WordPress 6.9:

The refresh text within the button is also fixed:
Before:

After:

This PR also:
Testing
Existing tests pass.
Checklist