Auto scroll
An optional package that enables automatic scrolling during a drag operation3.2.1
Patch Changes
- Updated dependencies
3.2.0
Minor Changes
bd2c5b0112185, (opens new window) - Remove stale API report artifacts from published Platform packages.
Patch Changes
- Updated dependencies
3.1.0
Minor Changes
0075efb228821, (opens new window) - Autofix: barrel removal (imports + exports)
3.0.1
Patch Changes
- Updated dependencies
3.0.0
Major Changes
-
f2dc9097319f0, (opens new window) - ### Dropped support for legacy Typescript 4 types. Typescript 5 is now the new minimum.Removes the
typesVersionsproperty anddist/types-ts4.5directory from the dist.Types are now exclusively via the
"types": "dist/types/index.d.ts"property.- "typesVersions": { - ">=4.5 <4.9": { - "*": [ - "dist/types-ts4.5/*", - "dist/types-ts4.5/index.d.ts" - ] - } - },
Patch Changes
- Updated dependencies
2.1.5
Patch Changes
d3ed1b65a2181, (opens new window) - Add @atlassian/a11y-jest-testing to devDependencies.
2.1.4
Patch Changes
e4b717d8304e8, (opens new window) - Add @atlassian/a11y-jest-testing to devDependencies.
2.1.3
Patch Changes
aa9ff75020fcb, (opens new window) - Add @atlassian/a11y-jest-testing to devDependencies.
2.1.2
Patch Changes
beaa6ee463aa8, (opens new window) - Internal changes to how border radius is applied.- Updated dependencies
2.1.1
Patch Changes
-
#164244, (opens new window)
65021fc0267e2, (opens new window) - The cleanup functions returned by the following utilities now only work on the first call. This was done to prevent unexpected side effects of calling a cleanup function multiple times.@atlaskit/pragmatic-drag-and-drop/adapter/elementdraggabledropTargetForElementsmonitorForElements
@atlaskit/pragmatic-drag-and-drop/adapter/text-selectiondropTargetForTextSelectionmonitorForTextSelection
@atlaskit/pragmatic-drag-and-drop/adapter/externaldropTargetForExternalmonitorForExternal
@atlaskit/pragmatic-drag-and-drop-auto-scroll/elementautoScrollForElementsautoScrollWindowForElements
@atlaskit/pragmatic-drag-and-drop-auto-scroll/externalautoScrollForExternalautoScrollWindowForExternal
@atlaskit/pragmatic-drag-and-drop-auto-scroll/text-selectionautoScrollForTextSelectionautoScrollWindowForTextSelection
-
Updated dependencies
2.1.0
Minor Changes
- #172374, (opens new window)
4ca6346256c8a, (opens new window) - Minor increase of time dampening duration. After lots of explorations, we have increased the value to make it easier for people to avoid the impacts of rapid scroll speed spikes when lifting or entering into a high scroll speed area.
2.0.0
Major Changes
-
#170839, (opens new window)
1534389dcb75b, (opens new window) - In order to improve clarity, we have renamed thefrom*Edge(egfromTopEdge) argument properties tofor*Edge(egforTopEdge) for the overflow scroller. If you are not using overflow scrolling, there is nothing you need to do.- fromTopEdge + forTopEdge - fromRightEdge + forRightEdge - fromBottomEdge + forBottomEdge - fromLeftEdge + forLeftEdgeconst unbind = unsafeOverflowAutoScrollForElements({ element, getOverflow: () => ({ - fromTopEdge: { + forTopEdge: { top: 6000, right: 6000, left: 6000, }, - fromRightEdge: { + forRightEdge: { top: 6000, right: 6000, bottom: 6000, }, - fromBottomEdge: { + forBottomEdge: { right: 6000, bottom: 6000, left: 6000, }, - fromLeftEdge: { + forLeftEdge: { top: 6000, left: 6000, bottom: 6000, }, }), });We thought that
for*more accurately represented what was being provided, as these are the overflow definitions for a defined edge.We have also improved the types for
for*Edgeso that you do not need to provide redundant cross axis information if you only want to overflow scroll on the main axis.const unbind = unsafeOverflowAutoScrollForElements({ element, getOverflow: () => ({ forTopEdge: { top: 100, + // no longer need to pass `0` for the cross axis if you don't need it - right: 0, - left: 0, }, forRightEdge: { right: 100, - top: 0, - bottom: 0, }, forBottomEdge: { bottom: 100, - right: 0, - left: 0, }, forLeftEdge: { left: 100, - top: 0, - bottom: 0, }, }), });When declaring overflow scrolling for an edge, you cannot provide how deep the scrolling should occur into the element (that is defined by the "over element" overflow scroller). Providing redundant information for an edge will now also give a type error rather than providing no feedback.
const unbind = unsafeOverflowAutoScrollForElements({ element, getOverflow: () => ({ forTopEdge: { top: 100, bottom: 30, // ❌ now a type error }, forRightEdge: { right: 100, left: 10, // ❌ now a type error }, forBottomEdge: { bottom: 100, top: 200, // ❌ now a type error }, forLeftEdge: { left: 100, right: 20, // ❌ now a type error }, }), });
1.4.0
Minor Changes
-
#116572, (opens new window)
98c65e7ff719c, (opens new window) - 🍯 Introducing "the honey pot fix" which is an improved workaround for a painful browser bug, (opens new window).Background
The browser bug causes the browser to think the users pointer is continually depressed at the point that the user started a drag. This could lead to incorrect events being triggered, and incorrect styles being applied to elements that the user is not currently over during a drag.
Outcomes
- Elements will no longer receive
MouseEvents (eg"mouseenter"and"mouseleave") during a drag (which is a violation of the drag and drop specification, (opens new window)) - Elements will no longer apply
:hoveror:activestyles during a drag. Previously consumers would need to disable these style rules during a drag to prevent these styles being applied. - Dramatically improved post drop performance. Our prior solution could require a noticeable delay due to a large style recalculation after a drop.
- Elements will no longer receive
Patch Changes
- Updated dependencies
1.3.0
Minor Changes
-
#95426, (opens new window)
a58266bf88e6, (opens new window) - Adding axis locking functionality+ // `getAllowedAxis` added to element, text selection and external auto scrollers autoScrollForElements({ element: myElement, + getAllowedAxis: (args: ElementGetFeedbackArgs<DragType>) => 'horizontal' | 'vertical' | 'all', }); autoScrollWindowForElements({ + getAllowedAxis: (args: WindowGetFeedbackArgs<DragType>) => 'horizontal' | 'vertical' | 'all', }); unsafeOverflowAutoScrollForElements({ + getAllowedAxis?: (args: ElementGetFeedbackArgs<DragType>) => AllowedAxis; })
1.2.0
Minor Changes
1.2.0is deprecated onnpmand should not be used. Shortly after release we decided to change this API
-
#94103, (opens new window)
4e3fb63eb288, (opens new window) - Added axis locking functionality.autoScrollForElements({ element: myElement, getConfiguration: () => ({ maxScrollSpeed: 'fast' | 'standard', + allowedAxis: 'horizontal' | 'vertical' | 'all', }), })
1.1.0
Minor Changes
-
#94454, (opens new window)
4b40eb010074, (opens new window) - Exposing the unsafe overflow auto scroller for external drags (unsafeOverflowAutoScrollForExternal()). This already existed, but it was not exposed publicly 🤦♂️.import {unsafeOverflowAutoScrollForElements from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/element'; import {unsafeOverflowAutoScrollForTextSelection} from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/text-selection'; + import {unsafeOverflowAutoScrollForExternal} from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/external';
1.0.4
Patch Changes
- #94316, (opens new window)
35fd5ed8e1d7, (opens new window) - Upgrading internal dependencybind-event-listenerto@^3.0.0
1.0.3
Patch Changes
- #84398, (opens new window)
77694db987fc, (opens new window) - Public release of Pragmatic drag and drop documentation
1.0.2
Patch Changes
- #83702, (opens new window)
4d9e25ab4eaa, (opens new window) - Updating the descriptions of Pragmatic drag and drop packages, so they each provide a consistent description to various consumers, and so they are consistently formed amongst each other.package.jsondescriptionREADME.md- Website documentation
1.0.1
Patch Changes
- #83116, (opens new window)
8d4e99057fe0, (opens new window) - Upgrade Typescript from4.9.5to5.4.2
1.0.0
Major Changes
-
#70616, (opens new window)
42e57ea65fee, (opens new window) - This is our firstmajorrelease (1.0) for all Pragmatic drag and drop packages.For a detailed explanation of these changes, and how to upgrade (automatically) to
1.0please see our 1.0 upgrade guide, (opens new window)
Patch Changes
- Updated dependencies
0.8.1
Patch Changes
- Updated dependencies
0.8.0
Minor Changes
-
#57337, (opens new window)
4ad3fa749a5c, (opens new window) - Adding the ability to increase the maximum automatic scroll speed.autoScrollForElements({ element: myElement, + getConfiguration: () => ({maxScrollSpeed: 'fast' | 'standard'}), })getConfiguration()is a new optional argument be used with all auto scrolling registration functions:autoScrollForElementsautoScrollWindowForElementsautoScrollForFilesautoScrollWindowForFilesunsafeOverflowForElementsunsafeOverflowForFiles
autoScrollForElements({ element: myElement, getConfiguration: () => ({ maxScrollSpeed : 'fast' }) }),We recommend using the default
"standard"max scroll speed for most experiences. However, on some larger experiences, a faster max scroll speed ("fast") can feel better.
0.7.0
Minor Changes
- #42774, (opens new window)
66d9475437e, (opens new window) - Internal refactoring to improve clarity and safety
0.6.0
Minor Changes
- #42668, (opens new window)
0a4e3f44ba3, (opens new window) - We have landed a few fixes for "overflow scrolling"- Fix: Time dampening could be incorrectly reset when transitioning from "over element" auto scrolling to "overflow" auto scrolling for certain element configurations.
- Fix: Parent "overflow scrolling" registrations could prevent overflow scrolling on children elements, if the parent was registered first.
- Fix: "overflow scrolling"
canScroll() => falsewould incorrectly opt out of "overflow scrolling" for younger registrations.
0.5.0
Minor Changes
- #39935, (opens new window)
20a91012629, (opens new window) - First public release of this package. Please refer to documentation for usage and API information.
Patch Changes
- Updated dependencies
0.4.0
Minor Changes
- #39303, (opens new window)
a6d9f3bb566, (opens new window) - Adding optional overflow scrolling API. API information shared directly with Trello
0.3.2
Patch Changes
- Updated dependencies
0.3.1
Patch Changes
- Updated dependencies
0.3.0
Minor Changes
- #38658, (opens new window)
7803a90e9c6, (opens new window) - This change makes it so that distance dampening is based on the size of the hitbox and not the container. Now that we clamp the size of the hitbox, our distance dampening needs to be based on the size of the hitbox, and not the container.
0.2.0
Minor Changes
- #38630, (opens new window)
5c643ce004d, (opens new window) - Limiting the max size of auto scrolling hitboxes. This prevents large elements having giant auto scroll hitboxes
0.1.0
Minor Changes
- #38525, (opens new window)
693af8c5775, (opens new window) - Early release of our new optional drag and drop package for Pragmatic drag and drop. Package release is only for early integration with Trello.
Patch Changes
- Updated dependencies