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

Inner Blocks inserter on single-child blocks #20728

Closed
mtias opened this issue Mar 9, 2020 · 5 comments · Fixed by #22293
Closed

Inner Blocks inserter on single-child blocks #20728

mtias opened this issue Mar 9, 2020 · 5 comments · Fixed by #22293
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress

Comments

@mtias
Copy link
Member

mtias commented Mar 9, 2020

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

@mtias mtias added [Feature] Inserter The main way to insert blocks using the + button in the editing interface Needs Design Needs design efforts. [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P labels Mar 9, 2020
@davemart-in
Copy link

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

@mtias
Copy link
Member Author

mtias commented Mar 9, 2020

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.

@karmatosed
Copy link
Member

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.

@karmatosed karmatosed added Needs Design Feedback Needs general design feedback. and removed Needs Design Needs design efforts. labels Mar 9, 2020
jasmussen added a commit that referenced this issue Mar 10, 2020
Starts work on #20728. It doesn't completely fix it though.

What it does is create a generic rule to hide the appender in nesting contexts, until the parent or a child of the same block, is selected.
@jasmussen
Copy link
Contributor

Loved your idea so much, Dave, I ran with it in #20753.

jasmussen added a commit that referenced this issue Mar 10, 2020
Starts work on #20728. It doesn't completely fix it though.

What it does is create a generic rule to hide the appender in nesting contexts, until the parent or a child of the same block, is selected.
jasmussen added a commit that referenced this issue Mar 10, 2020
…0753)

* Try: Show inserter only when block selected for nesting contexts.

Starts work on #20728. It doesn't completely fix it though.

What it does is create a generic rule to hide the appender in nesting contexts, until the parent or a child of the same block, is selected.

* Fix rebase issue, account for "lighter dom" blocks also.
@karmatosed karmatosed added Needs Dev Ready for, and needs developer efforts and removed Needs Design Feedback Needs general design feedback. labels Mar 10, 2020
@paaljoachim
Copy link
Contributor

paaljoachim commented Mar 16, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Nested / Inner Blocks Anything related to the experience of nested/inner blocks inside a larger container, like Group or P Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress
Projects
None yet
6 participants