uppy icon indicating copy to clipboard operation
uppy copied to clipboard

Nested folder selection does not work correctly

Open tcgj opened this issue 2 years ago • 1 comments

Initial checklist

  • [X] I understand this is a bug report and questions should be posted in the Community Forum
  • [X] I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

Create a directory structure in OneDrive similar to this:

Folder A
| Folder B
  | File A
  1. In the uploader, tick the checkbox for Folder A.
  2. Then go into Folder A and tick the checkbox for Folder B.
  3. Click "Select"

Note:

  • I am testing this on OneDrive. The issue with selection is the same for all providers, but OneDrive displays the issue of File A being duplicated.

Expected behavior

  1. Only one file, File A, should be listed.
  2. Technically, ticking the checkbox for Folder A should automatically tick the checkbox for all of its children (i.e. if parent is selected, all child files/folders should be selected, and vice versa), so we shouldn't need to manually tick the checkbox for Folder B anyway.
  3. If only some child files/folders are selected, the parent checkbox should be indeterminate: Screenshot 2023-08-04 at 12 53 28

Actual behavior

  1. File A is listed twice instead of once.
  2. Selecting parent folder is independent of selecting children. Selecting Folder A does not check Folder B, and allows you to select it separately.
  3. Deselecting Folder A doesn't deselect Folder B, so we can never tell which parent folders may contain selected files.

tcgj avatar Aug 04 '23 19:08 tcgj

I can reproduce this issue, and I think your suggestions are sound - will take a look into it.

lakesare avatar Feb 21 '24 17:02 lakesare

Fixed in https://github.com/transloadit/uppy/pull/5050

Murderlon avatar Jul 11 '24 08:07 Murderlon