Releases: atlassian/react-beautiful-dnd
9.0.2
9.0.1
Fixes
- Fixing memory leak when unmounting
DragDropContext#720. Thanks @faiwer for finding this one, and for the great issue detail!
Improvements
- More flexible
flowtype forDragDropContext > hookfunctions #695. Thanks @kylehalleman!!! - More information in the documentation about using interactive elements (such as
button) as drag handles. #704 Thanks @kylehalleman!
Changes
DragDropContext > hook functions now allow you to return a value from your hook function if you want. However, we do not do anything with these returned values. This is also called out in the docs #695
- type OnBeforeDragStartHook = (start: DragStart) => void;
- type OnDragStartHook = (start: DragStart, provided: HookProvided) => void;
- type OnDragUpdateHook = (update: DragUpdate, provided: HookProvided) => void;
- type OnDragEndHook = (result: DropResult, provided: HookProvided) => void;
+ type OnBeforeDragStartHook = (start: DragStart) => mixed;
+ type OnDragStartHook = (start: DragStart, provided: HookProvided) => mixed;
+ type OnDragUpdateHook = (update: DragUpdate, provided: HookProvided) => mixed;
+ type OnDragEndHook = (result: DropResult, provided: HookProvided) => mixed;9.0.0
Changes
onDragStart: Getting the timing right
Summary: we have made the timings of the
DragDropContext > Hookfunctions more consistent, created a new hook:onBeforeDragStartand created a guide for hooks
We keep having timing issues popping up relating to onDragStart. It can break some use cases if it is called before we update the Draggable and Droppable components, and it can break some use cases if it is called after. Rather than trying to make onDragStart work for both cases we have created a new hook: onBeforeDragStart.
onDragStart, onDragUpdate and onDragEnd are now called consistantly after the Draggable and Droppable components have been updated. If you need to do some work just before Draggable and Droppable components have their initial snapshot values updated, then you can use onBeforeDragUpdate.
We have created a guide for hooks which explains all of the hooks in detail and the timings in which the hooks are called.
This is a breaking change 💥. It has been listed as a breaking change as it will break consumers who are following our dimension locking table reordering strategry.
Fixes
- Fixing broken test file name which caused repository cloning errors in some environments #697. There was a backspace character in a filename? I know! Thanks @lukebatchelor for the fix, @TrySound for your input and @pashadow for raising the issue
Improvements
8.0.7
8.0.6
Improvements
Getting started course released #363 🤩
We have created a free course on egghead.io to help people get started with react-beautiful-dnd as quickly as possible. Even if you have been using react-beautiful-dnd for a while, you may still learn something new - especially in the later lessons
Others
- Moving to
flowv0.77#673 - Adding
TypeScriptexample to theREADME.md#666. Thanks @abeaudoin2013! - Adding more detailed information to our recommended Droppable performance optimisation #660. Thanks @aditigoel23 for raising this one
Fixes
- The
DragDropContext > onDragStarthook is now called before the first render of aDraggableorDroppableduring a drag #676. This fixes usages of dimension locking for table reordering. This restores the timing behaviour of7.x - Now correctly consuming the
reduxv4.0flowtypeddefinitions #650. This was causing issues for users ofreduxwithv4.0defintions. Thanks for raising this @chmanie!
Engineering health
- Enabled 2FA on npm for all publishes 👍
- Bumping dev dependencies #673, #635. Thanks @TrySound
- Moving to test cafe for browser testing #661. As a result of this we are now running browser tests that perform mouse, keyboard and touch dragging. We are also running these tests in
chrome: headlessandfirefox: headlesswhich is pretty awesome 🎸. Thanks @RajaBellebon and @MarshallOfSound for getting this added. - Adding build check to ensure that
yarn.lockfiles are checked in #655. Thanks @MarshallOfSound - Removing
object-rest-spreadplugin from dev dependencies #635. Thanks @TrySound
8.0.5
8.0.4
Fixes
- In some versions of
jsdom(such as the one that ships increate-react-apptheSVGElementconstructor does not exist. Running the checkel instanceof SVGElementwould cause an exception. We are now more defensive in our usage of theSVGElementconstructor #641
Improvements
8.0.3
Fixes
- If you had a scrollbar on the cross axis of a
Droppablethen a user would be unable to auto scroll backwards through the list. Scrollbars, am I right? Anyway, we now account for this #628. Thanks @SimchaShats for raising this one - Fixing incorrect
invariantcondition which was preventing dynamic updates toDroppable > isDropDisabled#617. Thanks @ntelkedzhiev for your persistance with this one
Engineering health
- Wider use of
prettier#629 - Refactor of
Draggableto save about 20 lines 😊 #627 - Breaking massive
drag-handle.spec.jsfile into lots of spec files #627 - Upgrading
babelandrollup#624. Thanks @TrySound! - Moving
puppeteerbrowser test to non-headless withxvfbto reduce build flakes #630. Thanks @MarshallOfSound!!
8.0.2
Improvements
Adding docs for dragging <svg> elements #613
If you are attempting to use a <svg> (a SVGElement) as a Draggable or drag handle react-beautiful-dnd will now give you a more helpful error messaging in development builds. We have also created a dragging <svg>s guide to help you with dragging SVGs if you want to.
Thanks for raising this @mikesobol
Fixes
- Fixing
DragDropContext > Hookstiming issue #618. Thanks for raising it @ntelkedzhiev
