Gutenberg: Improvements to Block Manager

Created on 23 Apr 2019  路  10Comments  路  Source: WordPress/gutenberg

Some ideas to improve the experience of the block manager:

  • When disabled blocks fall below the fold there is no indication that anything is disabled at all. You have to scroll to discover it. Showing "5 blocks disabled out of x" somewhere at the top could be helpful.
  • Likewise, if you search on the inserter for a specific block that is disabled instead of showing nothing we could mention that there is a block but is currently disabled (and offer the option of enabling directly in place). This could be the UI model for hooking with the plugin/block directory in the future.
  • It should be possible to register a block as _disabled_ by default.

image (24)

image (23)

Needs Dev [Feature] Block Directory

Most helpful comment

Probably, yes. I'd be inclined to not showing child blocks by default. Same way they are not shown in the top level inserter.

All 10 comments

Sometimes blocks are registered only as child blocks of another block.

In the block picker, blocks with child blocks have different visual appearance from other blocks:

image

In the block manager everything appears as a flat list, which can be pretty confusing. _Child blocks pointed out_:

Screenshot 2019-04-24 at 15 31 18

Would it be useful to allow more granular control for child blocks? I.e. disallow showing a block only as a child block of a specific block, but allow it as top-level block? UI can get pretty confusing tho, but perhaps at least in programmatic level?

Probably, yes. I'd be inclined to not showing child blocks by default. Same way they are not shown in the top level inserter.

yes, if a block is registered as:

registerBLockType( 'my-plugin/my-child-block', {
...
parent: ['my-plugin/my-parent-block'],
...
} );

then it should not appear at all in the manager. Since it can't be inserted by itself, it doesn't make sense to talk of as being enabled/disabled.

A proposed concept for the disabled block count.

Manager v4 - disabled blocks

That's a nice improvement.

Likewise, if you search on the inserter for a specific block that is disabled instead of showing nothing we could mention that there is a block but is currently disabled (and offer the option of enabling directly in place). This could be the UI model for hooking with the plugin/block directory in the future.

There's a good conversation about displaying the disabled blocks in the Block Directory repo.
https://github.com/WordPress/block-directory/issues/14

Thanks @melchoyce for the discussion reference and work.

One such example is just communicating the search didn't have any results, but there are some disabled blocks. Mockup courtesy of @melchoyce If the user selects one of these diabled blocks, it automatically gets enabled.

disabled

Looping in another issue that came up in forums:

I know there are ways to turn on and off blocks, however, someone in the forums proposed adding more options to this and perhaps it's something worth exploring. I raise it here as a discussion point:

Even just some constants or an array in wp-config would suffice for configuring which blocks are loaded, or even a function that can be added to functions.php.

https://wordpress.org/support/topic/extends-the-power-of-wordpress/

https://github.com/WordPress/gutenberg/issues/18606

As an added piece of feedback, I wonder if it would make sense to start offering some filtering options to the full list in the block manager.

Thanks to the block directory and plugins creating more and more blocks, the average number of blocks per site is probably increasing. As the list gets longer, it becomes harder to quickly parse.

Maybe it would make sense to offer more options to sort out blocks, such as filtering by plugin, for example.

Sorry if this isn't the right place, but shouldn't the block manager be accessible from the left side menu on the backend? Like in Settings? That and the reusable blocks are really hidden. You can only get to them from the post editor.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spocke picture spocke  路  3Comments

jasmussen picture jasmussen  路  3Comments

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

nylen picture nylen  路  3Comments

aduth picture aduth  路  3Comments