gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Reducing Number of Columns Deletes Content

Open mrwweb opened this issue 7 years ago • 3 comments

Describe the bug When creating multiple columns and then reducing the number of columns by one or more, the blocks in the removed columns are lost.

To Reproduce

  1. Add a columns block of 3 or more
  2. Fill in all the columns with content
  3. Reduce the number of blocks (right column disappears)
  4. Increase the number of blocks (right column is empty)

Note: The content is recoverable using undo, though there's a smaller bug where the addition/removal of the column and the incrementing of the column number setting textbox are two separate steps of undoing.

Expected behavior I know that the current behavior is not what I expect, but I could see a variety of acceptable behaviors.

  1. My initial expectation was that the columns would act as a grid. i.e. I have 4 columns of content. If I reduce the columns to 3, I will have one row of 3 column and 1 row of one column. When I later showed this bug to a fellow WordPress user he independently shared the same expectation when I asked him what he expected to happen before I reduced the number of columns.
  2. A second thought was that the removed column might simply just be removed from the columns and placed directly in the body below the columns block. This might be a little weird but would avoid the data loss.
  3. A warning that I am about to lose data. Possibly provide the option to place the lost blocks below the columns or confirm deletion.

Screenshots animated GIF showing steps to reproduce

Desktop (please complete the following information): Win 10, Firefox 63.0.3, WordPress 5.0, no plugins, Twenty Nineteen

mrwweb avatar Dec 07 '18 00:12 mrwweb

I think this needs to be improved design-wise. Ideally removing a column is an explicit action (clicking a "x" or something like that) instead of a range input.

youknowriad avatar Dec 25 '18 10:12 youknowriad

Related: https://github.com/WordPress/gutenberg/issues/9009

msdesign21 avatar Feb 06 '19 20:02 msdesign21

Thanks @msdesign21 Let's close as a duplicate of #9009

youknowriad avatar Feb 07 '19 08:02 youknowriad