Skip to content

feat: support creating drop box subfolders in upload#514

Open
davidlougheed wants to merge 12 commits into
masterfrom
feat/manager/drop-box-subfolder
Open

feat: support creating drop box subfolders in upload#514
davidlougheed wants to merge 12 commits into
masterfrom
feat/manager/drop-box-subfolder

Conversation

@davidlougheed
Copy link
Copy Markdown
Member

@davidlougheed davidlougheed commented Jan 12, 2026

also updates to antd 5.29
see newly-fleshed-out ticket https://redmine.c3g-app.sd4h.ca/issues/1949

@davidlougheed davidlougheed marked this pull request as ready for review January 13, 2026 14:43
@davidlougheed davidlougheed requested a review from gsfk January 13, 2026 17:20
Copy link
Copy Markdown
Member

@gsfk gsfk left a comment

Choose a reason for hiding this comment

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

A few mostly non-blocking comments:

  • shouldn't it block upload if you enter an illegal subfolder name? (currently it will do the upload, but pretend you didn't create a subfolder)
  • it seems like there is some stale state going on with the parent folder, because I get a stale parent folder selection this way:
    • click a folder in the main Drop Box UI and click "Upload". The parent folder in the modal will be correct.
    • close the modal (either by finishing upload or just by closing). If you now click a different folder in the main UI and click "Upload" again the parent folder in the modal will be wrong: it will be your choice from last time. If you choose & click multiple times it will always be one selection behind.

Not changed in this PR but I was confused by the File Selector in the Upload modal, since the button to select a file is called "Upload". Shouldn't it be "Select File"? Presumably the final "OK" button means upload.

@davidlougheed
Copy link
Copy Markdown
Member Author

all good points, should be fixed now. i still need to do some testing with this in S3 mode with this drop box PR: bento-platform/bento_drop_box_service#81

@davidlougheed davidlougheed requested a review from gsfk January 13, 2026 22:33
Copy link
Copy Markdown
Contributor

@SanjeevLakhwani SanjeevLakhwani left a comment

Choose a reason for hiding this comment

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

First pass.

The UI for creating a new subfolder could use some improvement. Ideally I would prefer a new folder icon in row with the folder in the tree and also an option in the following:

Image

Also, if we are allowing adding subfolders we should also have a way to delete them.

<Input
value={newSubfolderName}
onChange={(e) => {
setNewSubfolderName(e.target.value.replaceAll(/[\s/*]/g, "_"));
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.

the backward slash is also an illegal character on linux. Also should we disable . just in case. I dont see how someone could use this for now, but to be safe.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i do disable ./.. elsewhere, but we could just prevent . completely it's true

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

it does not work "naively" to have a new subfolder button in the main bar, since subfolders do not really exist in S3 and so we'd need to make dummy files. we could take that approach, but otherwise I think it makes sense to just do it on file upload.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll make it a bit clearer, but the new subfolders that show up when uploading are only created if you actually upload a file to that path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants