gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Add support for section dividers in the Color section in the Inspector

Open jarekmorawski opened this issue 2 years ago • 3 comments

Some blocks may have more than a few colors. For instance, the Rating filter block in WooCommerce has options for stars, text, checkboxes, text, and background. When displayed in a single section, the options can be overwhelming. We currently use copy to help the user tell the options apart, but that leads to duplication and high UI density.

What if we made it possible for the color list to be broken down into sections? Here's an example.

Current design Proposal
Current Proposal

Note: I explored splitting the block into smaller pieces and surface colors only for the relevant parts, but that added too much complexity to the block structure and increased maintenance costs.

jarekmorawski avatar Jun 06 '24 09:06 jarekmorawski

Are there any core blocks that would be benefited by this as well?

richtabor avatar Jun 06 '24 13:06 richtabor

The Navigation block comes to mind. It has additional settings for the overlay.

image

The Cover block could benefit from that, too. If Color and Opacity were merged into one (so the user can change the opacity in the popover), we'd bring Filters into the Color section and group it with Color under Overlay.

image image

jarekmorawski avatar Jun 06 '24 13:06 jarekmorawski

@richtabor I think that Pagination blocks could also be benefited.

The Page Numbers block background defines the background as a solid rectangle.

image

image

So, setting it through the editor feels useless. And is not useful for defining the backgrounds of the different pagination number classes, .page-numbers .current .dots

To style them I had to go to the block global styles and define custom CSS for those classes.

I also found myself applying styles through CSS for the navigation block for the same reason. I was unable to get the results I wanted, for both mobile and desktop colors (I needed/wanted them to be different, and to use different colors depending on the nesting level of the submenus (up to three levels)).

emdashftw avatar Jun 07 '24 03:06 emdashftw