chore(deps): update react-packages (major) #204
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.5.0->5.0.09.0.2->10.0.1Release Notes
zendeskgarden/svg-icons
v5.0.0Compare Source
Bug Fixes
paperclip-angleicons (#43) (dd8fc51)BREAKING CHANGES
atlassian/react-beautiful-dnd
v10.0.1Compare Source
Fixes
flowtypes #910. Previously they were being lost in a HOC. Huge thank you to @TrySound for this one! He also added aflowtest to ensure there is no regressions on this 👏v10.0.0Compare Source
🚀 30% faster
💥 smarter collision engine
🎹 more robust keyboard movement system
🎳 new: combine items
🐣 new: add and remove items during a drag
🌲 new: tree library @atlaskit/tree by @Confluence
I know right!? Pretty awesome!! Okay, lets get into the details
✌️ Low risk breaking change
9.x→10.xThis release is a listed as a breaking change 💥. However, the risk of actual breakage is very low. Most consumers should be able to upgrade without any issues 👍. We will call out any breaking changes in these releases notes.
Features
Combining
Draggables #511react-beautiful-dndnow supports the combining ofDraggables 🤩We have created a combining guide which will show you how you can use the new feature and the thinking behind it.
react-beautiful-dndnow supports the adding and removing ofDraggables during a drag. This is a powerful feature that unlocks a lot of behaviorsWe have created a guide to help you use this new feature.
New tree library:
@atlaskit/tree🌲🎉In conjunction with this release, we have also released a new tree library:
@atlaskit/tree!!! 🎉It is a beautiful and accessible tree implementation built on top of
react-beautiful-dndImprovements
🚀 Speed
We have significantly improved the performance of
react-beautiful-dnd.You can read about how we did this in our blog "Grabbing the flame 🔥"
💥 Smarter collision engine
Our collision engine has been rebuilt in order to take into account:
This results in a much more consistent and natural movement experience.
The collision engine is now aware of displacement and so will now always shift items when the visible center goes over the visible edge of an item - even if the visible edge is displaced.
The collision engine is also now aware of the direction a user is currently moving in which is used to facilitate our new combining mode.
🎹 More robust keyboard movement system
The internal keyboard movement system has been completely rebuilt to provide more spacing flexibility and resilience. Improvements:
marginsafely on any edge of aDraggable(as long as it does not lead to margin collapsing between items) #201More drop animation control
We have moved to using only
CSSfor the drop animation for performance reasons (you can read more about that in "Grabbing the flame 🔥").As a side benefit of this you are now able to tweak the drop animation, or opt out of it completely. We recommend not opting out the drop animation as it is important communication for the user.
We have created a drop animation guide to assist you
Cleaner development build messaging
We have made our development build warnings and error message prettier and more informative
We only long warnings if there are actual setup issues (not just for fun!). That said, if you want to, you are now able to disable all warnings:
We have also added tests to ensure that these messages are correctly dropped from production builds.
Better ie11 support #320 #724
Previously we required consumers to polyfill
Array.prototype.findin order forreact-beautiful-dndto work in ie11. We now bake in our own light ponyfills so that you are not required to polyfill anything to usereact-beautiful-dndin ie11🔬 Smaller
react-beautiful-dnd10.0.0is actually a little bit smaller than9.x. Which is amazing considering how many new capabilities the library has!Recently
Reactannounced a new alphaHooks API. To avoid overloading the termHookand confusing people, we have replaced our usage of the wordHooktoResponder. The names of the actualHooksRespondersare unchanged:onBeforeDragStartonDragStartonDragUpdateonDragEndThis is a
typename change, as well as changing how we refer to them in the docs.RespondertimingsIn order to improve consistency we now force
onDragStartandonDragUpdateto be in thetickafter thesnapshotvalues are updated. Previously there were in the sametick. We do this to ensure there is a fullReactrender before calling the hooks. This was generally the case anyway so consumers should not be impacted. I found some very edge case scenarios whereonDragStartcould be batched into the samerenderpass byReactas asnapshotupdate.You can read all the timing details in our Responder guide.
The values provided to the
Respondersnow has some new information!DragStartnow containsmodetype DragStart = {| draggableId: DraggableId, type: TypeId, source: DraggableLocation, + mode: MovementMode, |}; + type MovementMode = 'FLUID' | 'SNAP';There are two seperate modes that a drag can be in
'FLUID': everything is done in response to highly granular input (eg mouse)'SNAP': items move in response to commands (eg keyboard)DragUpdate(andDragResult) now containcombineIn order to facilitate the new combining mode a
DragUpdateandDragResultnow containcombineinformationtype DragUpdate = {| ...DragStart, // may not have any destination (drag to nowhere) destination: ?DraggableLocation, + // populated when a draggable is dragging over another in combine mode + combine: ?Combine, |}; + // details of the item that is being combined with + type Combine = {| + draggableId: DraggableId, + droppableId: DroppableId, + |}; // DropResult gets these too it it extends DragUpdate type DropResult = {| ...DragUpdate, reason: DropReason, |};New data for a
Draggable👨🎨We now provide your
Draggablewith more information for you to use!type DraggableStateSnapshot = {| isDragging: boolean, isDropAnimating: boolean, draggingOver: ?DroppableId, + // Information about a drop animation + dropAnimation: ?DropAnimation + // the id of a draggable that you are combining with + combineWith: ?DraggableId, + // a combine target is being dragged over by + combineTargetFor: ?DraggableId, + // What type of movement is being done: 'FLUID' or 'SNAP' + mode: ?MovementMode, |}; + // information about a drop animation that you can patch if you like + type DropAnimation = {| + duration: number, + curve: string, + moveTo: Position, + opacity: ?number, + scale: ?number, + |};Moved to CSS for the drop animation
As mentioned previously, we have moved to using a CSS animation for our drop animation. We where able to maintain the exact same visual animation using CSS as we where with a
springbased animation. You can read more about this in "Grabbing the flame 🔥".Draggableanindexprop (a common setup error)DragDropContextis unmounted. It will now print a dev only warning explaining any problems and how you could avoid dropping screen reader messages #556Reactpeer dependency version.npmwill warn you about this, but we are getting a lot of issues about this. So we decided to bake our own warning into the libraryposition:fixedcontainerindexes need to be dense and start from0#892Fixes
ReactDOM.createPortalcould cause the drag to lockEngineering health
console.*statements are removed in production buildsstylelintflow0.86#851👋❤️ Community documentation
We have a new Community section and Addons section in our docs. If you have something that you would like to submit please pull request.
Thanks to these people who have already added content:
We would like your input
We have a few request for discussion (RFD) issues that would benefit from more input:
Thanks
This release has been months of hard work in the making. Thank you to everybody who has contributed to, and supported this release. A special thanks to:
Renovate configuration
📅 Schedule: "every weekend" (UTC).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR is stale, or if you modify the PR title to begin with "
rebase!".👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Renovate Bot. View repository job log here.