Gutenberg: Always visible appender is inconsistently visible, causing visual offsets

Created on 19 Jun 2019  路  4Comments  路  Source: WordPress/gutenberg

15864 changed the behavior of when the side inserter is showing. But it is showing inconsistently, and in many nesting situations the presence makes things offset. Here's a simple example:

appender

That's a list (i.e. not paragraph) transformed into a group. Suddenly there's a blank space in the editor that won't be there on the frontend.

This is also the case in other blocks that support nesting, such as Cover, Columns, Media & Text: if the last block isn't a paragraph, there's an empty space.

Here's a columns block with three images:

Screenshot 2019-06-19 at 10 01 58

Needs Design Feedback

Most helpful comment

Created a PR with a fix in #16453.

All 4 comments

Related: #13571.

I second this here. The inserter within the Group block should perform as the inserter within the singular Column block does. One change would be that the inserter returns when you're selected on a block.

Otherwise, the Group block within the editor does not properly resemble the front-end when you're not interacting with it.

The reason for adding this trailing inserter to nesting containers makes sense in principle, but I wonder if we can tweak the behavior so it's invisible until the block itself is selected?

Something along the lines of this:

.block-editor-block-list__block .block-editor-default-block-appender + .block-editor-default-block-appender {
    display: none;

    .is-selected & {
        display: block;
    }
}

The idea being that this leans into the principle of _the unselected block is a preview, whereas the selected block can have additional UI_.

Created a PR with a fix in #16453.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JohnPixle picture JohnPixle  路  3Comments

nylen picture nylen  路  3Comments

mhenrylucero picture mhenrylucero  路  3Comments

BE-Webdesign picture BE-Webdesign  路  3Comments

davidsword picture davidsword  路  3Comments