Make WordPress Core

Opened 4 years ago

Last modified 12 months ago

#51534 reopened enhancement

Add post type Blocks (reusable blocks) into menu

Reported by: oglekler's profile oglekler Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.5
Component: Editor Keywords: has-patch 2nd-opinion
Focuses: ui Cc:


Because you can manage all reusable blocks - creating new, changing or import from JSON, it will be convenient to have a proper menu link to 'edit.php?post_type=wp_block', possibly in the Appearance menu.

Attachments (2)

screenshot-1.png (172.5 KB) - added by Mamaduka 3 years ago.
Screen Shot 2021-04-01 at 5.21.48 pm.png (381.0 KB) - added by lukecarbis 3 years ago.
Mockup of how reusable blocks could be managed via the editor.

Download all attachments as: .zip

Change History (23)

#1 @hellofromTonya
4 years ago

  • Version changed from trunk to 5.5

#2 @rulims
3 years ago

I think that the link in the menu will allow easy access to reusable blocks without need to find the place where you embedded it (the place where it is now isn't obvious in the Block Editor under the Tools section in Three dots menu) previously to be able to edit it but also can catch attention to users who didn't know that this very useful feature exists.

This ticket was mentioned in Slack in #core by oglekler. View the logs.

3 years ago

#4 @markparnell
3 years ago

  • Milestone changed from Awaiting Review to 5.8

Moving this to 5.8 per the discussion in today's dev chat.

This ticket was mentioned in PR #1142 on WordPress/wordpress-develop by Mamaduka.

3 years ago

  • Keywords has-patch added

Trac ticket:
Related: WordPress/gutenberg#20557

Adds reusable blocks post type as "Appearance" submenu.

3 years ago

#6 @Mamaduka
3 years ago

Not 100% related. But I think it makes sense to use $ptype_obj->labels->menu_name instead of all_items in _add_post_type_submenus method.

#7 follow-up: @oglekler
3 years ago

Do we need the word 'All'? It definitely will attract users' attention but looks a bit long.

Also not strictly related - in Russian 'Reusable Blocks' sounds a bit awkward and long, so we are staying with equivalent to 'My blocks' even if it isn't technically correct. There were several discussions about this topic but now it looks a bit late for a change. But we are lucky, in German it is much longer still.

#8 in reply to: ↑ 7 @Mamaduka
3 years ago

Replying to oglekler:

Do we need the word 'All'? It definitely will attract users' attention but looks a bit long.

I agree, "Reusable Blocks" makes more sense for this submenu label. This label wording is also related to my question:

Not 100% related. But I think it makes sense to use $ptype_obj->labels->menu_name instead of all_items in _add_post_type_submenus method.

#17378 introduced this change, and as far as I can tell, changing it only in _add_post_type_submenus shouldn't affect regular CPT labels.

Thanks, @mikeschroder, for tracking the original issue down.

I'm happy to create a separate ticket or fix this as a part of this one.

#9 @lukecarbis
3 years ago

My thought here is that the WP Admin menu is already complicated enough for new users. I know that Reusable Blocks are really just post types under the hood, but perhaps a more sensible place for them to be managed is in the Gutenberg editor. Maybe a modal, like the Block Manager?

Here's a terrible terrible mockup to demonstrate my point. Saves us a whole screen, a whole menu item, and is more in line with how other similar settings in Gutenberg work.

3 years ago

Mockup of how reusable blocks could be managed via the editor.

#10 @oglekler
3 years ago

@lukecarbis Users and even developers don't know that reusable blocks exist, and editing the post where you included some reusable block just to edit it isn't a very convincing way to do things. For example, you have several calls for action and depending on what is happening you want to edit one of them — you need to go and find the post or page that contain this block to edit it or to start a new post just to include this block and edit it there.

The link to manage all reusable blocks isn't obvious in Gutenberg right now and users will be struggling to find it when they will finally know that it exists.

I am adding this link into the menu in sites I am developing in a place I offered to place it for everyone and explaining to my clients the advantages of these blocks and how to use them. It isn't obvious. Anyway, most plugins are adding their menu into the main menu and sometimes you are seeing people sites inside and it just a horrible mess. I am trying not to do this and cut out everything I could to make it clear as possible. I think it is the responsibility of a developer to make an order and a nice UX )

#11 @lukecarbis
3 years ago

@oglekler You bring up some great points about the limitations of presenting reusable blocks in a modal.

I'm still hesitant about adding something new to the Appearance menu, especially with the incoming additions that are coming with Full Site Editing.

While I agree that reusable blocks are somewhat hidden at the moment, I don't think the feature is important enough to warrant a menu item.

Obviously, this is a completely subjective opinion! My preference would be to invite additional thoughts and voices from the community before moving forward with adding a new menu item.

#12 @manfcarlo
3 years ago

If this gets the go-ahead, it will be affected by #52043, which is a very weird bug.

In other words, adding Reusable Blocks to the admin menu under Appearance will cause any user who has the capability to access edit.php?post_type=wp_block but not themes.php, to suddenly lose the capability to access edit.php?post_type=wp_block even if they had the capability before and even if navigated to independently of the admin menu.

This ticket was mentioned in Slack in #design by oglekler. View the logs.

3 years ago

#14 @oglekler
3 years ago

@paaljoachim have mentioned the related ticket:

This ticket was mentioned in Slack in #design by critterverse. View the logs.

3 years ago

#16 @desrosj
3 years ago

  • Milestone changed from 5.8 to 5.9

Today is feature freeze for 5.8. I would still like to see some wider discussions on this, and some more input from the Editor team. I know that improving the reusable blocks user interactions in general has been on their minds for a while now, but I'm not sure where this would fit in, if at all.

@matveb or @youknowriad, do you have any recommendations here?

#17 @matveb
3 years ago

While this is something we should eventually get to, I don't think we are quite ready yet.
The placement under the appearance menu is tricky because these blocks are, arguably, more on the content side. Being within appearance would also increase overlap and confusion with template parts. It's also possible that user-stored patterns would make an entrance at some point in the future and that would need to be balanced. There are still some unanswered questions about the IA of the sidebar and the appearance menu in particular when it comes to the site editing projects that are underway.

We've had some previous discussions on a "blocks" menu that would integrate the block directory better, possibly patterns, and would be a more natural fit for reusable blocks as well, but it needs some deeper design explorations first.

For these reasons I think we should err on not precipitating adding a new menu item if we'll need to reorganize things not too long after anyways.

#18 @desrosj
3 years ago

  • Component changed from Menus to Editor
  • Milestone 5.9 deleted
  • Resolution set to maybelater
  • Status changed from new to closed

Thanks @matveb! This is helpful context.

I am going to close this one out as a maybelater. While this is a good idea, there are other things that need to be considered and adjusted before this can be explored further. Discussion is always encouraged to continue on maybelater tickets, and it can be reopened at any time.

I'm also going to move this to the Editor component. While it focuses on adding a menu item, it's an item that relates directly to the internal post type that powers the block editor.

This ticket was mentioned in Slack in #core-editor by mamaduka. View the logs.

2 years ago

#20 @adriandegrafreak
12 months ago

  • Keywords 2nd-opinion added
  • Resolution maybelater deleted
  • Status changed from closed to reopened


For those who have access to theme.php will be nice to add the "Reusable Blocks".
Meanwhile, we can continue discussing where is the right place.
It's quite cumbersome to enter a post to reach that page.

I hope we can change the label from "maybelater" to "maybenow" ;)

PS: is my first entry on trac, sorry if I did something wrong.

#21 @Mamaduka
12 months ago

The "manage reusable blocks" will probably be absorbed by the new "Library" screen in the Site Editor.

Gutenberg issue:

Note: See TracTickets for help on using tickets.