-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the upload of empty folder on drop #2164
Conversation
Your Render PR Server URL is https://chainsafe-components-stage-pr-2164.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cacdlq75f99613a98dn0. |
Your Render PR Server URL is https://files-ui-stage-pr-2164.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cacdlr75f99613a98e1g. |
Your Render PR Server URL is https://storage-ui-stage-pr-2164.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-cacdlsn5f99613a98ej0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, the test related with upload a file are failing, because the file is not being uploaded.
Here is a video of what is happening:
Screen.Recording.2022-06-02.at.15.59.00.mov
Basically, after you select a file nothing happens, the file is not added in the modal.
Drag and drop a file is working correctly, the problem is when you try to select a file from your machine.
Oh, I completely forgot this case, I didn't expect to break it actually, I focused on the drag/drop. Thanks, I'll check it out. |
Upload by clicking and selecting files should work as well now too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work, Its working well with a combination of cases.
Two things we can improve.
-
If we simply add an empty folder, the toast says
encrypting and uploading 0 files
, better not to show toast if we are not uploading files and simply adding folders -
We need a refresh bucket call after the folder creation API calls, otherwise after the uploads call, there will be no refresh after the folder creation calls and we wouldn't see the folders created.
Adding a recording here.
Screen.Recording.2022-06-03.at.3.44.13.PM.mov
packages/files-ui/src/Components/Modules/FileBrowsers/CSFFileBrowser.tsx
Show resolved
Hide resolved
packages/files-ui/src/Components/Modules/FileBrowsers/SharedFileBrowser.tsx
Show resolved
Hide resolved
packages/files-ui/src/Components/Modules/FileBrowsers/UploadFileModal.tsx
Show resolved
Hide resolved
BTW if we want to add this into storage in this PR, we'd better merge in #2165 before, Folder uploads have been added in that PR. |
Yup, saw it yesterday, I'd add it after |
Nice, now is working on files (upload file by selecting it), but... is not working on Storage, but that was working fine 4 hours ago, seems that has to be with the merge maybe? but well this is the error: Also, I agree with Tanmoy, will be great to see the folder added at the moment (if you import an empty folder), so you don't need to refresh the page |
Thanks for the tests y'all. @tanmoyAtb great suggestions, it should be in now, a refresh happens after the folder creation now and we don't show the dialog if all there is, is an empty directory. |
@juans-chainsafe I guess it's related to what we merged indeed, it uses the same components. Also this PR will conflict most probably with the NFT upload one, it's touching the same components. |
@Tbaut now is refreshing correctly the empty folder when is imported, nice! As well, the error in Storage was fixed, but we have a new error in Storage, when we upload files from the file upload modal, is not automatically refreshing the table, so the files doesn't appear instantly (you need to refresh the page to see the files). Video below: Screen.Recording.2022-06-03.at.11.58.47.mov |
Yup, saw it, working on it |
…norepo into tbaut-empty-folders-2104
let's see how much the NFT will break stuff. We should merge it before this one. |
Seems to be working as expected now in Storage! let's wait for the NFT PR to be merged and I found something: Something that I noticed testing this (is not from this PR) is that:
I just wanted to comment on this behavior, maybe you've seen it before @Tbaut @asnaith @FSM1 |
Ah good one Juan, I'll open an issue for that, it's a bug |
@juans-chainsafe I wasn't aware of this bug, good discovery! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing on both storage and files !
I wouldn't be against a last test on file upload since the conflicts weren't super small. It still looks good from my test with drag or manual upload. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed again and all seems to be working perfect! I didn't see anything strange or failing, so nice work!
closes #2104
it's for Files for now, I'll do it for Storage as well if all goes well.