WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.35k stars 4.13k forks source link

Ability to "semantically" group layers of blocks in inspector #55921

Open filiplikavcan opened 10 months ago

filiplikavcan commented 10 months ago

What problem does this address?

Sometimes it is needed to wrap a Group with a Group (or even deeper nesting). For example when a padding is set to the parent Group and a background color is set to the child Group. It is then a bit of an UX hell for a user to select the right group when she wants to duplicate it (or do something else).

What is your proposed solution?

It would be great if inspector could hide this complexity by allowing to "visually" merge these two (or more) layers making a new "semantical" layer which encapsulates the underlying structure. Internally the layer nesting would not chage. This would be very useful for patterns, where for example the real structure is Group > Group > Group > Group but user could only see Group > Group and with the new renaming feature could even see Project Cards > Project Card, where Project Cards would consist of the first Group > Group pair and Project Card would consist of the second Group > Group pair.

cbirdsong commented 10 months ago

I think the editor could generally use an indication of how many nested container blocks there are once you get past two or three, as I imagine it often happens accidentally. There is no visual difference between some text contained within a single group block and three or four nested group blocks, and even if you're aware and trying to avoid that it's very easy to do it accidentally. For instance, If you transform from a group to a cover block it places the group inside the new cover block instead of just moving the contents of the group in directly.