server icon indicating copy to clipboard operation
server copied to clipboard

feat(trashbin): Allow restoration of parent folders

Open Pytal opened this issue 1 year ago • 5 comments

Summary

  • Resolve https://github.com/nextcloud/server/issues/31200

Checklist

Pytal avatar Apr 30 '24 00:04 Pytal

When restoring a file originally in Folder/Subfolder a dialog will ask the user to confirm restoration of the parent folders if they are also in the trashbin

image

Does this seem good to you @jancborchardt? Do you have any suggestions?

Pytal avatar May 03 '24 23:05 Pytal

Great idea! But the wording seems a bit complicated 🤔 How about something like this:

Confirm restoring Antarctica.jpg

Antarctica.jpg was originally in 'Vacation photos/2024'. Where should this file be restored?

◉ Vacation photos/2024 ○ All files

Cancel Restore 2 folders and 1 file


And if "All files" is selected

Confirm restoring Antarctica.jpg

Antarctica.jpg was originally in 'Vacation photos/2024'. Where should this file be restored?

○ Vacation photos/2024 ◉ All files

Cancel Restore 1 file

nimishavijay avatar May 23 '24 00:05 nimishavijay

Much nicer thanks!

It's possible that the user may have already deleted one or more of the parent folders from the trashbin so it wouldn't be able to be restored. In this case I think we should create a new folder of the same name, but then it wouldn't be "restoring" the folder but creating new folders so that the file can be restored to the same path. How should we word it in this case @nimishavijay?

Pytal avatar May 23 '24 17:05 Pytal

Ah okay, I think there was a misunderstanding. I was under the impression that this was the case so far. So if Antarctica.jpg is in Vacation/2024, in the 2 cases:

Antarctica.jpg is deleted. User restores Antarctica.jpg

Confirm restoring Antarctica.jpg

Antarctica.jpg was originally in 'Vacation photos/2024'. Where should this file be restored?

◉ Vacation photos/2024 ○ All files

Cancel Restore file


Antarctica.jpg is deleted. Folder Vacation is deleted. User restores Antarctica.jpg

Confirm restoring Antarctica.jpg

Antarctica.jpg was originally in 'Vacation photos/2024'. This location does not exist anymore. Where should this file be restored?

◉ Vacation photos/2024 2 folders will be created ○ All files

Cancel Restore 2 folders and 1 file

Does this convey the meaning effectively? :)

nimishavijay avatar May 24 '24 01:05 nimishavijay

I'm glad to see that PR which will fix an old UX issue 🙂 Thanks by advance !

Jerome-Herbinet avatar May 24 '24 09:05 Jerome-Herbinet

@Pytal does this need anything else after @nimishavijay’s feedback? :) Looks like a good enhancement

Nope, all good for design ;)

The technical approach needs some refining

Pytal avatar Sep 03 '24 17:09 Pytal