-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Pattern Explorer Modal: Select the first category as the initial category #47661
Conversation
… the pattern explorer modal.
Size Change: +223 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Flaky tests detected in d078387. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4074247106
|
packages/block-editor/src/components/inserter/block-patterns-tab.js
Outdated
Show resolved
Hide resolved
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.
It works as expected ✅
PR will require a rebase to restart Playwright tests. See #47629.
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 have followed the testing instructions and the PR solves the problem 👍
…ab.js Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
Thanks for the reviews! 👍 |
…gory (#47661) * Pass the first pattern category as the initially selected category in the pattern explorer modal. * If there is a selected category, make sure we use that instead. * Update packages/block-editor/src/components/inserter/block-patterns-tab.js Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com> --------- Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
I just cherry-picked this PR to the release/15.1 branch to get it included in the next release: 8a15ceb |
Fixes #47657
What?
If no inserter sidebar pattern category has been selected, make sure the first pattern category is selected as the initially selected category in the pattern explorer modal.
Why?
This seems to be a regression, where there's no pattern category selected when the modal first opens so the whole thing is empty. This is only if no pattern category has been selected in the inserter sidebar.
How?
Take the first category object in the
categories
array and pass that asinitialCategory
.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Before:
After: