Skip to content
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

Command Center: 'Manage all my patterns' leads to WP Admin #52491

Closed
jordesign opened this issue Jul 10, 2023 · 8 comments · Fixed by #52817
Closed

Command Center: 'Manage all my patterns' leads to WP Admin #52491

jordesign opened this issue Jul 10, 2023 · 8 comments · Fixed by #52817
Assignees
Labels
[Package] Commands /packages/commands [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@jordesign
Copy link
Contributor

Description

When using the 'Manage all my patterns' action in the command center I expect to end up in the Library/Patterns area of the Site Editor > Browser.
/wp-admin/site-editor.php?path=%2Fpatterns&categoryType=pattern&categoryId=featured

Instead I am directed to WP Admin.
/wp-admin/edit.php?post_type=wp_block

I not that this seems by design (as there is an icon to indicate an external link) but wonder if it would be better to link to the pattern management within the Site Editor.

Step-by-step reproduction instructions

  1. Open the Site Editor and edit a template
  2. Trigger the Command Center and type 'pattern'
  3. Select the 'Manage all my patterns' action.

Screenshots, screen recording, code snippet

No response

Environment info

  • WP 6.3beta3
  • Gutenberg 16.1

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

@jordesign jordesign added [Type] Enhancement A suggestion for improvement. [Package] Commands /packages/commands labels Jul 10, 2023
@annezazu
Copy link
Contributor

I have a feeling this will be covered by: #52403 @aaronrobertshaw can you confirm?

@richtabor
Copy link
Member

In trunk, the "Manage all my patterns" link opens up the admin page (previously reusable block admin). Perhaps that command should be adapted in action as well as copy — to not confuse with the existing manage admin links.

"Open Patterns" perhaps even.

It's technically the same link as this here, which is a remnant of reusable block UI:

CleanShot 2023-07-11 at 14 35 23

@aaronrobertshaw
Copy link
Contributor

I have a feeling this will be covered by: #52403 @aaronrobertshaw can you confirm?

Thanks for the question @annezazu, unfortunately, this command isn't covered by #52403.

I'm not sure whether the same approach taken in #52403 would extend to this command given the different package. If we can add the editor package as a dependency there we might be able to.

After a quick look, it appears the commands are separated into admin or site-editor navigation and this would need to straddle both so that might cause some wrinkles as well.

I've added this to the Patterns tracking issue.

@annezazu
Copy link
Contributor

Thanks for digging in and adding it to the tracking issue. On a related note since "Open Patterns" was thrown out there: #52741

@glendaviesnz
Copy link
Contributor

glendaviesnz commented Jul 20, 2023

Until the Manage all of my patterns button is removed/doesn't go to wp-admin any more I think the Manage all of my patterns command should continue to go to wp-admin in order to match that button behaviour, and the new "Open patterns" command is seen as the command to open the site editor patterns list for now. Which is what @richtabor was suggesting I think now that I reread his comment.

Do we want to leave this open or not now that Open patterns command is in place?

@richtabor
Copy link
Member

I would expect that "Manage patterns" and "Manage all my patterns" (either command, or via the toolbar more menu) would open My Patterns in the Site Editor. I don't think we should be forwarding folks to the older reusable blocks UI, but rather the much more capable Site Editor view.

The "Manage all of my patterns" in the Site Editor > Patterns footer is there as a remnant of the reusable blocks UI — I think it's fine to keep linking to the admin view (for now at least).

@glendaviesnz
Copy link
Contributor

I would expect that "Manage patterns" and "Manage all my patterns" (either command, or via the toolbar more menu) would open My Patterns in the Site Editor. I don't think we should be forwarding folks to the older reusable blocks UI

ok, thanks for clarifying, will try and get this implemented.

@glendaviesnz
Copy link
Contributor

PR added

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Commands /packages/commands [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
5 participants