-
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
DnD with breadcrumbs #1836
DnD with breadcrumbs #1836
Conversation
Your Render PR Server URL is https://storage-ui-stage-pr-1836.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-c73dvm90gd05jq3cqfn0. |
Your Render PR Server URL is https://chainsafe-components-stage-pr-1836.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-c73dvmh0gd05jq3cqg3g. |
Your Render PR Server URL is https://files-ui-stage-pr-1836.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-c73dvn10gd05jq3cqg80. |
…:ChainSafe/ui-monorepo into feat/tanmoy-breadcrumbs-as-dropzone-1772
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 didn't check the code yet, but testing the functionality, I got an error from the mv
from the api.
I have a file in /some/folder
and drag it to move it to /some
. The request fails with
Object { code: 400, message: "paths is required" }
The request is as follow:
{"paths":[],"new_path":"/some/"}
Its working my side, I even tried with the same |
There are some weirdnesses.. I moved my file to the weirdness.mp4 |
So I think there's some sensitivity around the way we are dragging. If you check the clip, when the move failed, there was no drag preview. Somehow the drag event failed to grab the source. I'll spend some time to see if I can find the actual issue. |
Found the issue, The useDrag wasn't re rendering when file contents changed by moving into a folder. It should be good to go now. |
Hey Tanmoy, I'm seeing some strange behaviour but it's kind of difficult to describe some of them. I've captured them on video so hopefully that helps.
breadcrumb.issue.after.refresh.mov
Moving.file.into.current.directory.mov
Elongated.modal.DND.non.breadcrumb.mov
blue.element.weirdness.mov |
There are weird CSS quirks indeed in the render built preview, but not when you build the branch locally (also there's no funky animation). I cleared the cache from render.com and redeployed. Should be live soon. I can't reproduce the issue I had before, and from what Andrew saw, I can see the issue with moving to the folder it's already in, we should prevent this if possible |
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 won't lie, the useDrop is pretty magical to me still as I've never played with it. My comments on the code are therefore on everything else :D
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Alright I've updated The current folder in breadcrumb to not accept drops! But the breadcrumbs breaking up is a serious issue. Look at this one. This happens when you build it even locally. !What happens is I found this thread on the A couple of hacky solutions in my mind i'll need to check. |
Wow this is wild. One thing that crossed my mind and you prob thought about, what if we prevent the classes from having generated names, and actually go with our own naming like:
|
This would have worked, Yes ! The PR seems to be in order now ! |
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.
Played again with it, including moving and uploading files, and it worked like a charm 🎉
The code looks neat too, just left a small comment for a nit.
packages/files-ui/src/Components/Modules/FileBrowsers/views/FilesList.tsx
Outdated
Show resolved
Hide resolved
…lesList.tsx Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Awesome work Tanmoy, I can't see any of the previous weirdness and the feature is working great for me too |
closes #1772
Submission checklist:
Layout
Theme