Server: Undo deletion (of files, users, contacts etc)

Created on 23 Jan 2017  路  13Comments  路  Source: nextcloud/server

(Since the relevant pull request was closed, opening this to track the feature: https://github.com/nextcloud/server/pull/1610 )

We should offer undo for destructive actions. This is a normal software pattern now (see Gmail, Android etc) and is very nice as opposed to modal windows. Also read Never Use a Warning When you Mean Undo

cc @nextcloud/javascript @ChristophWurst

1. to develop design enhancement high

Most helpful comment

Traditional tri-yearly postponing of this issue to the next milestone. 馃帀

All 13 comments

What style of popup/modal/notification do we want for that?

I would say showNotification is fitting in this case. We used that before I think in the News app or somewhere else.

@schiessle mentioned that this could be done by triggering the restore function of the 禄Deleted files芦 app. Might be good as a first working implementation. :)

cc @icewind1991 @ChristophWurst

What about a menu like the contact menu with a count indicator (like the notification icon) of how many items are still in the undo section?
On each item we could have a progressbar to display how many time left the user have before final deletion?

@skjnldsv a counter is not really necessary and strangely obstructive. That鈥檚 also not how any other undo mechanism works which people are used to from Google or Apple apps. :)

Traditional tri-yearly postponing of this issue to the next milestone. 馃帀

I like this idea and agree with @jancborchardt about the counter: we should keep it simple, as anybody can still go to the deleted files section to recover deleted files. The objective should remain a quick possibility to correct an unwanted deletion.

Any chance to see it happening in NC14? I'd be particularly interested in seeing this possibility anywhere in NC, including apps (incl. contacts, calendar, deck)

Any chance to see it happening in NC14? I'd be particularly interested in seeing this possibility anywhere in NC, including apps (incl. contacts, calendar, deck)

Totally. Would you be interested in implementing this functionality?

I'd love to... but I don't have any skills in coding. Available for testing though

The simplest way would be to add a column deleted TINYINT(1) UNSIGNED NOT NULL DEFAULT 0. More advance is deleted_at DATETIME/TIMESTAMP NULL DEFAULT NULL while default is not deleted (obviously).

I was thinking about how to implement undo for deleted notes in the Notes app. My idea was:

Don't delete the object when the user wants to delete it, but just mark it as deleted on the client frontend and show an undo button. After seven seconds, remove the button and delete the object in the backend.

Drawback of this approach: if the client looses the connection to the server during these seven seconds, the object can't be finally deleted. Is this anyway a valid approach for generalization? The advantage is that it's implementation is relatively easy (only frontend).

You are running through open door here. :-) Mine was exactly the same with a specific idea for the database side.

Any news on that? Someone mistakenly deleted all his contacts and there is now no way to restore it. I'm looking out now on how to implement things to prevent something like this from happening again and something native to nextcloud would be prefered.

Was this page helpful?
0 / 5 - 0 ratings