tablemaker icon indicating copy to clipboard operation
tablemaker copied to clipboard

Confirm deleting columns

Open Jones-S opened this issue 7 months ago • 2 comments

What are you trying to do?

Right now clicking on the Delete "X" for a column deletes the column and the data immediately.

Image

What's your proposed solution?

  1. I think it would be nice, if that change would only be saved if one clicks on Save the entry, because right now, even when reloading the entry without saving, the data and column are gone. I can restore stuff, if I have previous revisions, but it is a bit against the learned behaviour that I can reload the page without saving and should get the old state.

  2. If that is not possible, a confirmation popup may help preventing frustration of people losing content.

Additional context

I tested this with Craft CMS ^4.15. and "verbb/tablemaker": "^4.0"

Jones-S avatar May 26 '25 12:05 Jones-S

I think the only reason this was done was to mimic the Craft Table field settings, which doesn't feature this. But as that's a different use-case (not dealing with content), I could see how this could be added to guard against column removals.

As for reloading the page and the change being retained, that'd be because the change has been saved to a draft. If you discard your draft changes, it'll revert back to the previous state as well. You don't have to manually revert to a previous revision of the element.

But yep, consider this added to the list to implement. Likely, we'll just add an alert, as we need to maintain the current behaviour of changes made being saved to the current draft before being applied/discarded.

engram-design avatar May 27 '25 01:05 engram-design

Oh I see. Thanks for the comment. I think in contrast to when reloading another page I am not prompted with an alert window telling me that some things are not saved. When working on other content in entries I get:

"This page is asking you to confirm that you want to leave — information you’ve entered may not be saved." in my firefox. So yes, I think your alert would probably already do the trick.

But yeah, it's no big deal, I just thought the UX would benefit, as I was a bit baffled when I just "lost" a column with content, although I know, I was able to retrieve it.

Thanks anyway for the quick response. 👋

Jones-S avatar May 27 '25 08:05 Jones-S