Skip to content

Trash bin - #1266

Merged
schiessle merged 54 commits into
owncloud:masterfrom
schiessle:trash_bin
Jan 31, 2013
Merged

schiessle merged 54 commits into
owncloud:masterfrom
schiessle:trash_bin

Conversation

@schiessle

Copy link
Copy Markdown
Contributor

This App implements a trash bin in the way most of us know it from common desktop systems. Deleted files get copied to a trash folder (including the versions), the user can browse the trash bin and restore the files/folders if he wish.

By default files older than 180 days gets deleted from the trash bin. The admin can adjust this value in config.php with the key 'trashbin_retention_obligation' if needed.

@jancborchardt It would be great to have some icons. Maybe you already have some nice icons or you can create them?

  1. The undelete action shown by the mouse-over effect in the files list of the trash bin needs an icon similar to the share, download, etc icons.
  2. If I select more than one file in the trash bin I get a option at the top of the files list to restore all selected files (similar to the download option for selected files). It would be nice to have an icon there too.
  3. I added a "Trash" button at the top right corner of the files list to access the trash bin. Maybe it would be nice to add an icon there. Either as a replacement for the text "Trash" or beside the text. But I'm not sure, what do you think?

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Is the old undo behavior in the browser still in place?
Maybe this PR is a good opportunity to fix #119

Will test the app tonight - THX

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@schiesbn looks like rebase is required

@schiessle

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 the old behaviour is still in place. Until now I saw it as an additional feature. The easy undo directly after an operation is nice in cases where I choosed the wrong file by accident and want to revert it immediately without switching to a different view while the trash bin is more useful for cases where I want to get a file back deleted a few hours or days ago.

But if we agree that the direct undo option should be removed completely than I'm also fine with it.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

according to #119 we have issues with the current implementation of the undo feature.

What about reusing the undo notification (from a UX point of view) but change the implementation and trigger the undo on th last deletion within the trash bin.

Summoning the rest ....
@karlitschek @jancborchardt @MTRichards @dragotin @danimo

@karlitschek

Copy link
Copy Markdown
Contributor

Hmm. We are running out of time here. I think it is O.K. to have this as an relatively independent feature and keep the old notification for now. #119 has to be fixed of course.

@jancborchardt

Copy link
Copy Markdown
Contributor

@schiesbn when deleting and then restoring a file, the modified date is changed to the date the file was deleted. Rather the original last modified date should be preserved, shouldn’t it? (Also, »Undelete« might better be »Restore«.)

I disagree with removing undo. It is independent of having a trash bin or not. It’s for the moments when you clicked but a split second later you think »damn, I didn’t mean to do that actually«. Just like in Gmail – you have a trash, but still get undo on everything.

Seems to look good otherwise, nice integration in the files app.

@schiessle

Copy link
Copy Markdown
Contributor Author

@jancborchardt good point regarding the modified date, I will change this to keep the original date. I will also change "undelete" to "restore".

Regarding the Undo function: This was exactly the reasons why I didn't removed it at the beginning. So what should we do here? Bring it back or keep it out? Any final opinions @karlitschek @DeepDiver1975 ?

Otherwise I'm waiting for your +1's, would be great if we could merge it today to meet the feature-freeze deadline.

@schiessle

Copy link
Copy Markdown
Contributor Author

One more comment regarding the undo function. If we bring it back than the spinners are not needed because the files get removed from the list immediately. On the other hand the system might need some time when the files really get deleted which might degrade the user experience.

@karlitschek

Copy link
Copy Markdown
Contributor

I think let's leave it as it is and merge it now. We can discuss details next week

@DeepDiver1975

Copy link
Copy Markdown
Contributor

The problems with the undo functionality are know and needs to be solved with OC5. I think we all agree to this.

One possible solution which just came to my mind:
what about keeping the old undo functionality but attach a timeout to it?

The basic problem is that a user deletes a file and no further action follows - the file will not really be deleted for hours and an inconsistent view on other clients (desktop/mobil) is displayed.

This could solved by triggering the real delete after e.g. 5 minutes.

@karlitschek @jancborchardt what do you think?

@schiessle

Copy link
Copy Markdown
Contributor Author

@karlitschek I agree... So where are the +1's ;-)

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@schiesbn rebase please 😄

Let me do one final click test on IE and my thumb is going up 😈

@schiessle

Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 rebased... Have fun ;-)

@karlitschek

Copy link
Copy Markdown
Contributor

👍 from me

@jancborchardt

Copy link
Copy Markdown
Contributor

With the introduction of the trash it’s ok to remove the undo function for now to resolve the short-term problems, but I’d strongly advise that after the release we add it in again and properly fix as per the solution discussed in #119.

@DeepDiver1975 timeout won’t really cut it. If it’s 5 minutes it’s way too long (deleted files take 5 minutes to be synced as deleted to the clients) and a shorter timeout like 5 seconds makes undo useless. Proper solution in #119.

That said, looks good otherwise from me. Final test from @DeepDiver1975 but then it can probably be merged in. :)

Comment thread apps/files_trashbin/lib/trash.php Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_writable no longer exists in OC_FilesystemView aka \OC\Files\View

@icewind1991 is the backwards compatibility broken?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems that the new function is called isUpdatable() I updated the code. But a quick grep tells me that there are still a lot of places where is_writable() is used. But that's out of scope for the trash bin app

@DeepDiver1975

Copy link
Copy Markdown
Contributor

go go go! 👍

schiessle added a commit that referenced this pull request Jan 31, 2013
@schiessle
schiessle merged commit 8dd9ded into owncloud:master Jan 31, 2013
@DeepDiver1975

Copy link
Copy Markdown
Contributor

WOW! 🚀 🎉

@jancborchardt

Copy link
Copy Markdown
Contributor

damn nice

@jancborchardt

Copy link
Copy Markdown
Contributor

@schiesbn can you rename the app (and the button in Files) from »Trash« to »Archive«? To make clearer what it is, and to not have people obsessive about cleaning it out (because that would defeat the purpose of keeping a history).

Realized that when I just read this post on the mailing list: https://mail.kde.org/pipermail/owncloud/2013-February/007343.html

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Is archive really the correct name?

We already have an app 'Archive Support' - won't this be to confusing?

Tom

@icewind1991

Copy link
Copy Markdown
Contributor

On Friday 01 February 2013 01:45:15 Jan-Christoph Borchardt wrote:

@schiesbn can you rename the app (and the button in Files) from »Trash« to
»Archive«? To make clearer what it is, and to not have people obsessive
about cleaning it out (because that would defeat the purpose of keeping a
history).

Realized that when I just read this post on the mailing list:
https://mail.kde.org/pipermail/owncloud/2013-February/007343.html

The downside is that "Archive" implies that the files will stay there forever,
which is not the case

  • Robin Appelman

@karlitschek

Copy link
Copy Markdown
Contributor

I agree with @icewind1991 Archiving is something else. It implies that the files are safe and kept forever which is not the cast. I like Trash better.

@schiessle

Copy link
Copy Markdown
Contributor Author

I also agree with @icewind1991. Most people will understand something different from an archive than what the trash bin app provides.

@jancborchardt

Copy link
Copy Markdown
Contributor

Ok, you’re right. Trash it is. Also good answers on the mailing list! :)

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants