-
Notifications
You must be signed in to change notification settings - Fork 384
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
Red loader at AMP menu, without validation errors #6765
Comments
@delawski please could you take a look at this and if reproducible, see if we can include a fix for the same in 2.2? |
This is because the error count starts out as a spinner until the REST API request returns with the counts to display in the menu items. See #5900. So this is working as expected, but I agree it's not ideal. Should the loading indicator be removed? Or should we show the loading indicator only if on a previous page the counts returned as non-zero? We could use |
I'm working on a slightly different solution. I'm thinking of using a preload middleware for If the AMP menu is not expanded (so for any non-AMP related admin page), we would use the existing loading approach as implemented in #5900. I think it's justified to show a loading spinner on hover. |
The approach taken in #5900 was to use |
In #6770 we preload data only if the AMP submenu is expanded, i.e. only if it's needed on page load. In #5900 an intersection observer is not even set if the submenu is expanded. The validation counts data is fetched via HTTP request right away. That's when we see the flicker of the loading spinner needlessly. With #6770 we still use an intersection observer for fetching the data but only if the AMP submenu is collapsed. This way we get the best of both approaches. I guess it will become clearer once you check out #6770 and try it out live. |
I've added a description to #6770 - it's now ready for review. |
Bug Description
When the users switch between amp plugin sections, there is a load with a red dot when the user has no errors:
AMP.Settings.amp-beta.WordPress.mp4
Steps to reproduce:
Expected Behaviour
If the users has no errors, it should not display the loader on red, because it creates a false alert
Screenshots
No response
PHP Version
7.3.5
Plugin Version
2.2 alpha
AMP plugin template mode
Standard
WordPress Version
5.8.2
Site Health
No response
Gutenberg Version
No response
OS(s) Affected
MacOS
Browser(s) Affected
Chrome 96
Device(s) Affected
No response
Acceptance Criteria
No response
Implementation Brief
No response
QA Testing Instructions
No response
Demo
No response
Changelog Entry
No response
The text was updated successfully, but these errors were encountered: