-
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
update empty patterns #54642
update empty patterns #54642
Conversation
Size Change: +150 B (0%) Total Size: 1.69 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.
Nice work @SaxonF 👍
This PR tests well for me and is a drastic improvement over the simple "no patterns" message.
✅ Creating patterns from dropdown still works
✅ Triggering pattern creation from new empty state works
✅ Empty pattern state displays well when reached via dodgy URL, unmatched filters etc
My one question is should we update this to trigger creating a template part when you are in an empty template part category (e.g. via searching)?
I'm happy to approve this now though as we could refine the template part aspect in a follow-up.
Flaky tests detected in 2e9f032. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6387120723
|
555412d
to
2e9f032
Compare
After some constants were refactored, a regression was introduced causing the filters not to show. This was fixed in #54721. I could replicate that issue on this branch, which was resolved after rebasing this PR. |
Now #54906 has merged we'll need to update the e2e tests that currently check for |
@SaxonF This is now looking good to me with that fix. There's one potential convenience feature for users that came to mind, it might be good for the new pattern modal to be pre-filled with the selected category and sync status. What do you think? |
There's a draft PR for an alternate duplication flow that reuses the create pattern modal and pre-populates some fields. So it has some overlap with this suggestion. Could it be a separate follow-up? |
Absolutely 👍 |
<Icon icon={ symbol } /> | ||
<VStack spacing={ 3 } alignment="center"> | ||
<Heading level={ 4 } as="h2"> | ||
{ __( 'Create a pattern' ) } |
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 wonder if we should still show text suggesting no patterns for accessibility reasons?
I believe this screen is being replaced by an admin view, so is this update still planned to be included in WordPress 6.5? |
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.
To prevent unintentional merging
With 58482 merged, should this be closed? |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
pattern-empty.mp4
What?
Updates the empty state when no patterns exist.
Why?
Direct people to create their first pattern.
#53287
How?
Updates the no-patterns component and adds a renderTrigger prop to the AddNewPattern component.
Testing Instructions