-
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 the Manage all my patterns command to redirect to site editor patterns list #52817
Conversation
Size Change: +665 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
Flaky tests detected in e4a799f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5617365791
|
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 on this one 👍
Everything is testing as advertised and all the feedback is addressed.
My one question is whether we should be consolidating the "Manage all my patterns" and the "Open patterns" commands.
When filtering commands by "patterns", you see both, however, if your user doesn't have the capabilities to access the site editor or it's a non-block theme, you only get the "Sorry, you are not allowed to access this page" message when choosing "Open patterns".
Alternatively, if you do have a block theme and permissions, you're getting essentially a duplicate command option.
I don't think this has to be a blocker for this PR but is something we could address in a follow-up.
Do you have any thoughts on combining these commands @richtabor?
@aaronrobertshaw I just went ahead and removed the and is less confusing without this duplicate I think. I wonder though if to make it similar to the other commands we should rename the remaining command to |
I went ahead and renamed it - it matches other commands much better as @richtabor let us know if you have any opinions on this. |
What?
Updates the
Manage all my patterns
command to redirect the site editor patterns page when using a block-based theme.Why?
Fixes: #52491
How?
Checks for block based theme, or site editor context and redirects accordingly.
Testing Instructions
Manage all my patterns
command in site editor and post editor and make sure it redirects to the site editor patterns pageManage all my patterns
command in post editor make sure it redirects to the wp-admin patterns management pageauthor
level user check that the command in the post editor redirects to wp-admin patterns page and not the site editorScreenshots or screencast
Block-based theme:
command-block.mp4
Non block theme:
command-non-block.mp4