Gutenberg: Inner Blocks inserter on single-child blocks

Created on 9 Mar 2020  Â·  5Comments  Â·  Source: WordPress/gutenberg

When a block uses inner blocks but only supports a specific block type as a child, we should consider stating more clearly what the + does.

Current:
image

Something like this:
image

Needs Dev [Block] Navigation [Feature] Inserter [Feature] Nested / Inner Blocks [Status] In Progress

Most helpful comment

Thoughts on also hiding the Add Button icon and text when in preview mode and only showing it when the button block is selected?

button-add

All 5 comments

Thoughts on also hiding the Add Button icon and text when in preview mode and only showing it when the button block is selected?

button-add

Yes, it should show when the container (Buttons) or a child (Button) is selected. This should apply to all nested contexts, though — selecting an item inside a column, or the column itself, would show the +, otherwise it should not appear.

I would +1 what @davemart-in showed above and say that we can remove the 'needs design' label as that feels right to get as soon as possible into code. Going to add a feedback label just to keep that flowing though.

I really like this and also note that it can be an opportunity to centre the '+' along with this aligning better with the button. It will also stop multiple '+' without context and all feeling like they add a block.

Loved your idea so much, Dave, I ran with it in https://github.com/WordPress/gutenberg/pull/20753.

When removing a button or social icon the parent block of both can become empty. We will then see an inserter that seems out of place. Hovering over the inserter gives some info what they are.

I would suggest when no child block (social icon or button) is present then the parent is also removed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidsword picture davidsword  Â·  3Comments

aduth picture aduth  Â·  3Comments

hedgefield picture hedgefield  Â·  3Comments

ellatrix picture ellatrix  Â·  3Comments

youknowriad picture youknowriad  Â·  3Comments