server
server copied to clipboard
feat(trashbin): Allow restoration of parent folders
Summary
- Resolve https://github.com/nextcloud/server/issues/31200
Checklist
- Code is properly formatted
- Sign-off message is added to all commits
- [ ] Tests (unit, integration, api and/or acceptance) are included
- [ ] Screenshots before/after for front-end changes
- [x] Documentation (manuals or wiki) has been updated or is not required
- [x] Backports requested where applicable (ex: critical bugfixes)
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
Does this seem good to you @jancborchardt? Do you have any suggestions?
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
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?
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? :)
I'm glad to see that PR which will fix an old UX issue 🙂 Thanks by advance !
@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