WordPress.org

Make WordPress Core

Opened 6 months ago

Last modified 9 days ago

#51534 new enhancement

Add post type Blocks (reusable blocks) into menu

Reported by: oglekler Owned by:
Milestone: 5.8 Priority: normal
Severity: normal Version: 5.5
Component: Menus Keywords: has-patch
Focuses: ui Cc:

Description

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 2 weeks ago.
Screen Shot 2021-04-01 at 5.21.48 pm.png (381.0 KB) - added by lukecarbis 2 weeks ago.
Mockup of how reusable blocks could be managed via the editor.

Download all attachments as: .zip

Change History (17)

#1 @hellofromTonya
5 months ago

  • Version changed from trunk to 5.5

#2 @rulims
4 months 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.


2 weeks ago

#4 @markparnell
2 weeks 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.


2 weeks ago

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/51534
Related: WordPress/gutenberg#20557

Adds reusable blocks post type as "Appearance" submenu.

@Mamaduka
2 weeks ago

#6 @Mamaduka
2 weeks 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
2 weeks 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
2 weeks 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
2 weeks 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.

@lukecarbis
2 weeks ago

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

#10 @oglekler
2 weeks 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
10 days 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
10 days 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.


10 days ago

#14 @oglekler
10 days ago

@paaljoachim have mentioned the related ticket:
https://github.com/WordPress/gutenberg/issues/29630

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


9 days ago

Note: See TracTickets for help on using tickets.