-
Notifications
You must be signed in to change notification settings - Fork 147
refactor: updated dependencies and replaced the DragDropContext decorator. #178
Conversation
…the DndProvider instead.
} | ||
} | ||
|
||
@DragDropContext(HTML5Backend) |
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 we were exposing a "RawFileBrowser" separately, since there could be other components in an application using DND as well, and we wanted to ensure they all use the same backend.
If this kind of duplication is no longer an issue, then we can remove RawFileBrowser
entirely, and update the docs/releasenotes accordingly. If it still would be an issue, then we need a solution here that continues offering an unwrapped file browser.
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.
That makes sense, I have now added a separate component to wrap around the RawFileBrowser
and now exporting both. I have also updated the README.md
and stories/index.js
to showcase using external providers.
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 have created a separate store for DND so it does not interfere with other examples.
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.
Awesome stuff.
Checked out the branch and built the storybook's, all looks to be working great.
Just picked up another quirk where if you drag a folder but have a file selected, it will move the file.
Pretty sure that's an existing issue so approving anyways but would be keen to hear your thoughts on whether that seems correct from a user's perspective :)
"prop-types": "^15.7.2", | ||
"react-dnd": "^8.0", | ||
"react-dnd-html5-backend": "^8.0" | ||
"react-dnd": "^14.0.2", |
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.
Can I get you to start a new draft release so we can start documenting these changes - anything breaking, etc.
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.
Noted.
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 good to me (with my cursory frontend knowledge).
Good level of keeping the scope in check; much more reviewable. :)
just as @mwfister suggested :)
Before we transition into using esbuild as our default bundler. I wanted to clean up the dependencies to rid of un-needed transformations.
During this process, I noticed how outdated some of our dependencies are. I have updated them.
This includes changing the now deprecated
Drag and Drop Context Dectorator
provided by react-dnd with theDNDProvider Component
instead.