-
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
Patterns: Update pattern inserter to show all categories regardless of sync status #54480
Patterns: Update pattern inserter to show all categories regardless of sync status #54480
Conversation
…lts if no patterns for category sync type combination
Warning: Type of PR label error To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. |
Size Change: +158 B (0%) Total Size: 1.53 MB
ℹ️ View Unchanged
|
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.
Thanks for iterating here @glendaviesnz 👍
After getting to play with the new UX it definitely feels better to me. I suspect we can improve the "no results" states in time but for now communicate things well.
While testing I noticed some weird behaviour that we might want to dig into before landing the overall feature.
If you select a sync type filter and navigate to a pattern where there are no results, wait a little while, then the panel suddenly updates to the "All" sync type option without any interaction from the user.
The time for this to happen appeared to vary as well and occurred regardless of whether the sync filter was for synced or unsynced patterns. It also exists in both the inserter panel and the pattern explorer.
Screen.Recording.2023-09-15.at.11.43.51.am.mp4
Screen.Recording.2023-09-15.at.11.41.40.am.mp4
This should be fixed now @aaronrobertshaw |
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.
Tests well for me now. Appreciate the quick fix! 🚀
There's only a tiny tweak to make then this will be ready to merge into the primary pattern categories PR.
packages/block-editor/src/components/inserter/block-patterns-tab.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Aaron Robertshaw <[email protected]>
…f sync status (#54480) Co-authored-by: Aaron Robertshaw <[email protected]>
Flaky tests detected in 51a0770. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6193919652
|
What?
Removes the sync type filter from the category list generation.
Why?
Currently in #53835 when the pattern sync status filter is changed the category list changes to show only the categories that have patterns of that sync status. This was to avoid showing categories that were in fact empty as generally only populated categories display, but it complicates the code, and the UX is a little odd in the way the sync filter in one panel affects categories in another.
How?
Removes the plumbing that was passing the sync status back through to the category hook, and also made sure 0 resutls messages were showing.
Testing Instructions
Screenshots or screencast
patterns-sync-fix.mp4