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

Add link to gutenberg reusable blocks to admin sidebar #15549

Closed
frogdesk opened this issue May 9, 2019 · 7 comments
Closed

Add link to gutenberg reusable blocks to admin sidebar #15549

frogdesk opened this issue May 9, 2019 · 7 comments
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Enhancement A suggestion for improvement.

Comments

@frogdesk
Copy link

frogdesk commented May 9, 2019

Is your feature request related to a problem? Please describe.
Gutenberg reusable blocks are one of the coolest features that came with Gutenberg. I've made extensive use of them, but every time I want to edit one or check something about it I have to go edit another post first, and then use the triple-dot drop down to get to the reusable blocks page. This is a lot of steps just to get to a page that I use a lot.

Describe the solution you'd like
My ideal solution would be to add "Reusable blocks" (or just "Blocks") link in the admin sidebar along with posts/media/pages/comments links. Alternatively, it could be a sub-item under posts, pages, or media, but I'm not sure any of those truly make sense as the parent item.

Describe alternatives you've considered
I suppose the alternative is leaving it where it is, imo that's not a very good user experience and these blocks are something that would be useful for non-coder editors to have easy access to.

It's possible that not too many are using them, or at least not the way I am, but I think they are extremely useful to create user-editable bits of content that you as a theme developer can insert into widgetized areas or other parts of your template.

It would be nice to at least have a configurable option to add a more convenient link easily.

@aristath
Copy link
Member

Yes please!!

@youknowriad youknowriad added [Type] Enhancement A suggestion for improvement. [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) labels May 10, 2019
@frogdesk
Copy link
Author

frogdesk commented May 18, 2019

Here is a workaround for anyone who finds this issue and wants an immediate solution. Add this to your theme's functions.php:

add_action( 'admin_menu', 'linked_url' );
function linked_url() {
add_menu_page( 'linked_url', 'Reusable Blocks', 'read', 'edit.php?post_type=wp_block', '', 'dashicons-editor-table', 22 );
}

add_action( 'admin_menu' , 'linkedurl_function' );
function linkedurl_function() {
global $menu;
$menu[1][2] = "/wp-admin/edit.php?post_type=wp_block";
}

@Svobi
Copy link

Svobi commented Aug 5, 2019

In WP 5.2.2
add_action( 'admin_menu', 'linked_url' );
function linked_url() {
add_menu_page( 'linked_url', 'Reusable Blocks', 'read', 'edit.php?post_type=wp_block', '', 'dashicons-editor-table', 22 );
}

is enough to make it work.

@KokkieH
Copy link

KokkieH commented Dec 20, 2019

We've had a request for this on WordPress.com as well.

@frogdesk
Copy link
Author

frogdesk commented Dec 20, 2019

I think it's really disappointing that something that is so completely easy to implement, and so obviously beneficial to the usability of the software, has not been added when it was requested almost a year ago. There is absolutely no reason not to add this. The lack of things like this getting worked on is a big part of why people have such a nasty, awful, horrible taste in their mouths about Gutenberg.

@paaljoachim
Copy link
Contributor

Actually it could instead be added as a tab to the Block Inserter alongside the tab for Patterns.
#17335 (comment)

@noisysocks
Copy link
Member

noisysocks commented Apr 20, 2020

Closing this in favour of #13390 which is considering the best place for this link.

It's possible that a Reusable Blocks will end up in the WP Admin sidebar when there are more block-related screens in WP Admin. For example:

  • Blocks
    • Reusable Blocks
    • Block Directory
    • Block Patterns
    • Reusable Blocks

Something along these lines was proposed in this comment on Make/Design.

#15549 (comment) is a suitable workaround for folks who desire this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants