owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
437 stars 157 forks source link

Friendly way to duplicate files/folders. #5761

Closed labkode closed 2 years ago

labkode commented 3 years ago

As a user wanting to duplicate a folder/file.

Currently is not possible to do it in the same containing folder as the following error is given.

A choice can be given to the user by appending a new version like (1) or something alike.

Screenshot 2021-09-01 at 08 41 27
kulmann commented 3 years ago

Nice idea!

@tbsbdr what do you think? Just appending a (1) or asking the user to make a choice (replace, copy, cancel)?

ChrisEdS commented 3 years ago

Thanks for opening. I'm stumbled upon that behaviour just today as well. :) I'd vote for an option to choice a new name.

pascalwengerter commented 3 years ago

We already have issues here about both "moving (and thereby copying) item into its own folder" and "having a nice dialogue when uploading/renaming resources to an existing name". I'll link them later, perhaps we can try to tackle both within one of the next sprints!

tbsbdr commented 3 years ago

yep, absolutely, needs to be optimized.

I would propose the following:

  1. Silent merge (--> automatic): Folders with the same name should silently "merge". With merge I mean: create versions for conflicting files, if this is not possible, ask how to proceed with conflicting files. New files or subfolders should be added (=merged) to the inserted folder.
  2. file conflicts (--> ask): If its not possible to create a new version for a file, the user must decide if the existing file should be replaced.

I dont think we need to show a confirmation dialog for merging, as long as this is no destructive (= i.e. deleting files via a "replace" operation) operation

Ho do file explorers behave in case of "Folder already exists"

I would not assume a "learned" behavior or any kind of common sense, because the platforms handle the situation differently:

Primary behavior Fileexplorer User asked? Destructive: File deletion possible?
merge the content of equally named folders oc10
Dropbox
Box
no no
merge the content of equally named folders Google Drive yes, alternative: "keep both" no
merge the content of equally named folders Windows explorer yes, alternative: "keep both", "Replace" yes
replace the existing folder MacOS Finder yes yes
Error Message OneDrive
oc Web UI
- no

onedrive (folder already exists)

image

onedrive (file already exists)

image

Google Drive

image

Google drive (automatic versioning)

image

MacOS Finder

image

Windows File Explorer

image image

pascalwengerter commented 3 years ago

Old PR on copy/move to same location: #3847 (needs a proper rebase and quite some refactoring but good input I suppose)

Old tickets on this:

tbsbdr commented 2 years ago

General rule

User gets asked what to do in case of conflicting resources, as there is no common pattern across different services/platforms (OneDrive, Google Drive, Box, Windows, Mac, etc. - all different).

Note This dialog concept is also meant to be applied to https://github.com/owncloud/web/issues/1753

Dialogs

image

Behaviour

  1. Replace will replace the existing file (and creates a new version implicitly).
  2. Keep both will create a new resource with an appended number "(xx)" - counting up, if ex. (2) already exists.
  3. Cancel will skip the current resource, if applicable shows the next conflict.
  4. Merge will combine folders with the same name; if they contain conflicting files, user gets asked what to do (dialog for files shows up).
  5. Do this for all XX conflicts will apply the selected option to all XX upcoming conflicts. Is only shown, if there are at least 2 conflicts.

Userflows

image

lookacat commented 2 years ago

The logic for copy or moving seems to be spread and different in some parts, will try to get it unified first so we don't have code duplication.

labkode commented 2 years ago
Screenshot 2022-05-17 at 14 05 43

@tbsbdr if you choose "Merge", what happens when the files in the folder will also conflict? Will the user get another dialog?

tbsbdr commented 2 years ago

@labkode correct, see Nr. 4

  1. Merge will combine folders with the same name; if they contain conflicting files, user gets asked what to do (dialog for files shows up).
tbsbdr commented 2 years ago

closing in favour of more actionable ticket: https://github.com/owncloud/web/issues/6996