stellarwp / kadence-blocks

Advanced Page Building Blocks for Gutenberg. Create custom column layouts, backgrounds, dual buttons, icons etc.
281 stars 82 forks source link

Column content lost when changing a Row Layout's column count #47

Open rchipka opened 5 years ago

rchipka commented 5 years ago

When using the field input or slider to increase the column count, the inner content of the columns will be reset.

Presumably this is due to the user first clearing the number field's value before entering the new value.

I've been able to avoid this by using the number input's "increment up" button instead, but this isn't ideal.

I suggest that Kadence ignore change updates when the number field is empty or show an "apply" button after modifying the column count input.

Additionally, if the column count has been reduced, Kadence could show a warning near the apply button saying that content may be lost.

kadencewp commented 5 years ago

Fair enough, I've been following issues about this for core columns because there was talk of some different workarounds but even just changing the input to buttons for +1 and -1 would be better.

rchipka commented 5 years ago

@kadencethemes I like that idea. That removes the number input issue entirely.

If we're keeping the slider, it be nice to see some sort of confirmation dialog specifically when using the slider to reduce columns.

The reason here is that it's easy to overshoot when adjusting the slider, and if you go down by two instead of one, your content is gone.

kadencewp commented 5 years ago

yeah, there is always "undo" which would bring it back but for most people panic would set in before they thought of that. :)