Always show the total number of patterns even with only one page#54813
Always show the total number of patterns even with only one page#54813kevin940726 merged 3 commits intotrunkfrom
Conversation
|
Size Change: +1 B (0%) Total Size: 1.62 MB
ℹ️ View Unchanged
|
aaronrobertshaw
left a comment
There was a problem hiding this comment.
Thanks for continuing to polish the patterns explorer and inserter @kevin940726 👍
Works as advertised.
✅ Pattern explorer and inserter both consistently display the number of items
✅ Item count doesn't show when there are no results
✅ Count appears when there is one or more pages
In a future follow-up, it might be worth considering changing the working from "item" to "pattern".
|
It would be nice to get backported as it incrases the consistency with little to no compatibility concerns. The code change is also fairly straightforward. However, I would also fully understand if we should punt it to the next release ❤️. |
b4f78e4 to
7e6e0b2
Compare
|
I just cherry-picked this PR to the release/16.7 branch to get it included in the next release: 45ca6c5 |
* use the wporg cdn (#54795) * core-data: Fix nested property access with undefined name (#54790) * core-data: Fix nested property access with undefined name * Add a unit test * Social Links: add X (#54092) * Social Links: add X Fixes #53223 * Add Twitter keyword to variation This will allow people to find the new icon when searching for Twitter. See #53223 (comment) * Reorder links alphabetically Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> * No need for a capital letter Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> * Fix svg attributes See #54092 (comment) Co-authored-by: Rich Tabor <hi@richtabor.com> * Remove "icon" Co-authored-by: Nick Diego <nickmdiego@gmail.com> * Update X icon path See #54092 (comment) See #54092 (comment) --------- Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Co-authored-by: Rich Tabor <hi@richtabor.com> Co-authored-by: Nick Diego <nickmdiego@gmail.com> * remove font files created by tests after tests run (#54771) * Check that new pattern is synced before replacing existing blocks with a synced pattern (#54804) * Patterns: Improve sentence case consistency of labels and notices (#54807) * Navigation block: fix padding on mobile overlay when global padding is 0 (#53725) * force min value for padding to be 2rem * fallback for when the css variables are not defined * Allow the padding to be smaller than 2rem * Add fix to avoid trigger hover state on links when overlay opens --------- Co-authored-by: scruffian <ben@scruffian.com> Co-authored-by: Dave Smith <getdavemail@gmail.com> * Always show the total number of patterns even with only one page (#54813) * Always show the total number of patterns even with only one page * Add to explorer too * Hide total number of 0 * Font Library: Avoid rendering Font Library UI outside Gutenberg plugin (#54830) * Remove action to fix tests. (#54806) * Conditionally remove deprecated 'print_emoji_styles' (#54828) * Fix Performance tests * Fix global styles revision --------- Co-authored-by: Matias Benedetto <matias.benedetto@gmail.com> Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Co-authored-by: Jeremy Herve <jeremy@jeremy.hu> Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Co-authored-by: Rich Tabor <hi@richtabor.com> Co-authored-by: Nick Diego <nickmdiego@gmail.com> Co-authored-by: Glen Davies <glendaviesnz@users.noreply.github.com> Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> Co-authored-by: Maggie <maggie.cabrera@automattic.com> Co-authored-by: scruffian <ben@scruffian.com> Co-authored-by: Dave Smith <getdavemail@gmail.com> Co-authored-by: Kai Hao <kevin830726@gmail.com> Co-authored-by: Jonny Harris <spacedmonkey@users.noreply.github.com> Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
What?
Add "%d items" to the patterns list even when there is only one page.
Why?
Consistency with the multi-page list.
How?
Move the condition to the paging component instead.
Testing Instructions for Keyboard
Screenshots or screencast