core icon indicating copy to clipboard operation
core copied to clipboard

Make undo deletion work again

Open jancborchardt opened this issue 14 years ago • 62 comments

Short: We need »undo delete« for files again.


You have an ownCloud server and it syncs to your desktop.

Now when you delete a file via the web interface, it doesn’t really get deleted, because you get the opportunity to undo that (like Gmail, better than a modal asking you for confirmation, which no one reads and just confirms).

The problem here is that you expect it to be deleted, and thus also removed from your local synced folder. This doesn’t happen immediately though because the file is not removed in the backend.

@MTRichards and I discussed a solution for this: When you delete a file in the web interface, the deletion should take place after the 7 seconds undo time, or after performing the next navigation action (whatever comes first). The file should be visibly (but fake) removed from the list instantly, and instantly reappear on undo.

jancborchardt avatar Oct 28 '12 10:10 jancborchardt

This seems related to #51 (Undo function makes sync experience suboptimal).

jancborchardt avatar Oct 28 '12 14:10 jancborchardt

How do we want to handle external file systems in this case?

Moving the files to be deleted within the same filesystem is cheep. Moving file from DropBox to ownCloud is expensive.

Can we ignore the undo feature for this case?

DeepDiver1975 avatar Dec 20 '12 22:12 DeepDiver1975

@jancborchardt I think this is a UX question for you. Probably not, if possible...

MTRichards avatar Dec 20 '12 23:12 MTRichards

Depends on what external file system we’re talking about I’d say:

  • Dropbox: the file will probably not be lost permanently anyway because Dropbox has their own versioning where files can be restored. As it is probably also synced to clients, we don’t want to have the problem of not actually deleting/moving the file and causing client »lag«. And it would be too expensive, so let’s just not do it.
  • FTP: doesn’t have any history and isn’t synced anywhere else probably, I’d say here use the current just notification-undo without moving the file

That as short example, more tomorrow.

jancborchardt avatar Dec 21 '12 01:12 jancborchardt

How do we want the undo to work in general?

  1. Only allow undo of the last delete actions?
  2. Trash can feature and the user can undo whatever deletion

In addition: How will this work together with version? Do we want any integration of undo/trash can and versions?

@jancborchardt @karlitschek @schiesbn

DeepDiver1975 avatar Dec 28 '12 23:12 DeepDiver1975

In general, it should only be the last action available to undo. The big one here is delete - and undo there moves it out of the trash back where it was. If you select a whole stack of files and folders and delete them, then undo undoes them all - undo usually means "oops, I take that back".

Other undo options would be things like rename and move as well. Undo here is lower priority, but would be nice to have. Undo would change names back to original names, and locations to original locations.

Versions...this is interesting. I would like them to work independently, as people may or may not have the two turned on. If they are both enabled, undo should track and undo changes to the appropriate versions too. Example: if I delete a file, versions go away too, but if I then undo the delete, then the versions should come back too, if the versions app is turned on. If I delete a folder and hit undo, versions for everything in the folder should come back too. If I move a folder, versions should move, and then undo would move them back as well - but again, these last two actions are less important than undelete.

MTRichards avatar Dec 28 '12 23:12 MTRichards

As I commented some hours ago in #199, I've implemeted a patch in files_versions in order to have a simple trash. In this issue you can find my proposal.

In my implementations, versions of files aren't deleted so, if you recover the deleted file, you keep all history.

As I commented, I'm working on the following TODO list:

  1. Include remove procedure in the cron for deleted files/dirs
  2. Remove or fix working in "All versions..." link
  3. Generate an "Empty trash" procedure (different than cron)
  4. Change history icon in directories

You can see this implementation on my fork simple_trash. I accept comments an suggestions

jlgg avatar Dec 30 '12 22:12 jlgg

@jlgg some questions

  1. How do you handle external fs?
  2. Your trash app is an extention to files_version, right?

AFAIK files_version will be reimplemented. @schiesbn is in charge And we need an undo solution which works independent of versions.

DeepDiver1975 avatar Dec 31 '12 06:12 DeepDiver1975

@DeepDiver1975

  1. I've just edited files_versions hooks.php and versions.php (and js and ajax files) using the same methods used in this ones. So if versions supports external fs, then my undo method supports too.
  2. Yes

I agree with you that undo should be independent of versions but we can get a working version in just some hours using versions support.

jlgg avatar Dec 31 '12 14:12 jlgg

pull request #1266 introduces a trash bin like we know it from most desktop systems. Once the pull request is merged the other undo function will be gone which will solve the issue discussed here.

schiessle avatar Jan 22 '13 17:01 schiessle

As you see from #2101 we should definitely bring back proper undo for Files in ownCloud 6.

jancborchardt avatar Mar 05 '13 10:03 jancborchardt

Folks, what’s the resolution on this? I want to grab one of you awesome PHP devs at the Berlin hackfest next week and make undo deletion work again. It will have a 5–10 second automatic timeout so there will be no syncing lag. It should also be implemented in a way that it can be used by other apps.

Who’s with me?

jancborchardt avatar Aug 07 '13 14:08 jancborchardt

@jancborchardt @MTRichards @karlitschek OC7 from my point of view

DeepDiver1975 avatar Aug 22 '13 21:08 DeepDiver1975

Yes. oC7

karlitschek avatar Aug 23 '13 04:08 karlitschek

Yeah, oC7 but then please let’s do that for real then. :)

jancborchardt avatar Aug 23 '13 08:08 jancborchardt

@jancborchardt the undo file deletion seems to be gone now. Is this still an issue or should we reconsider this when adding back undo in #7058 ?

PVince81 avatar Feb 11 '14 17:02 PVince81

@PVince81 yes – of course we should have undo back for file deletion. This issue is open exactly because undo deletion is gone.

It’s cumbersome to delete a file accidentally and then have to go to the deleted files to retrieve it.

jancborchardt avatar Feb 12 '14 08:02 jancborchardt

I was rather asking whether this ticket here is a duplicate of #7058. Seems I've misread as the linked ticket is for moving files, not deleting. So let's keep that ticket open.

PVince81 avatar Feb 12 '14 09:02 PVince81

Yup. Very similar but not the same. :) One for deletion (where we used to have undo but removed it because it was badly implemented), one for moving (where we didn’t have it).

jancborchardt avatar Feb 13 '14 13:02 jancborchardt

@owncloud/designers @schiesbn @DeepDiver1975 is this still in scope for ownCloud 7? Would be really good to bring it back. Basically it’s a UX regression.

jancborchardt avatar May 23 '14 10:05 jancborchardt