WordPress / gutenberg

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

Grid: Add non drag-and-drop way to adjust stacking / z-index #63971

Open noisysocks opened 2 months ago

noisysocks commented 2 months ago

Grid blocks set to Manual mode support "stacking": you can position two grid items into the same cell so that one is overlayed on top of the other.

Currently the only way to control which block is on top is by re-ordering the blocks in the List View using drag and drop.

We need a way to achieve this that doesn't require using the mouse.

A lot of apps have Move forwards, Bring to front, Move backwards, and Move to back controls for this. That might be a good option that is familiar to users.

Potentially we could even disable List View for grid altogether. See https://github.com/WordPress/gutenberg/issues/63974.

noisysocks commented 2 months ago

@richtabor brought this up too. Let's start simple and add Move forward and Move backward to the block options menu when the grid is in manual mode.