Skip to content
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

build(deps): bump @dnd-kit/utilities from 3.0.0 to 3.1.0 #24

Closed

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Jan 10, 2022

Bumps @dnd-kit/utilities from 3.0.0 to 3.1.0.

Release notes

Sourced from @​dnd-kit/utilities's releases.

@​dnd-kit/utilities@​3.1.0

Minor Changes

  • #518 6310227 Thanks @​clauderic! - Major internal refactor of measuring and collision detection.

    Summary of changes

    Previously, all collision detection algorithms were relative to the top and left points of the document. While this approach worked in most situations, it broke down in a number of different use-cases, such as fixed position droppable containers and trying to drag between containers that had different scroll positions.

    This new approach changes the frame of comparison to be relative to the viewport. This is a major breaking change, and will need to be released under a new major version bump.

    Breaking changes:

    • By default, @dnd-kit now ignores only the transforms applied to the draggable / droppable node itself, but considers all the transforms applied to its ancestors. This should provide the right balance of flexibility for most consumers.
      • Transforms applied to the droppable and draggable nodes are ignored by default, because the recommended approach for moving items on the screen is to use the transform property, which can interfere with the calculation of collisions.
      • Consumers can choose an alternate approach that does consider transforms for specific use-cases if needed by configuring the measuring prop of . Refer to the example.
    • Reduced the number of concepts related to measuring from ViewRect, LayoutRect to just a single concept of ClientRect.
      • The ClientRect interface no longer holds the offsetTop and offsetLeft properties. For most use-cases, you can replace offsetTop with top and offsetLeft with left.
      • Replaced the following exports from the @dnd-kit/core package with getClientRect:
        • getBoundingClientRect
        • getViewRect
        • getLayoutRect
        • getViewportLayoutRect
    • Removed translatedRect from the SensorContext interface. Replace usage with collisionRect.
    • Removed activeNodeClientRect on the DndContext interface. Replace with activeNodeRect.
  • 528c67e Thanks @​clauderic! - Introduced the useLatestValue hook, which returns a ref that holds the latest value of a given argument. Optionally, the second argument can be used to customize the dependencies passed to the effect.

Patch Changes

  • #561 02edd26 Thanks @​clauderic! - - The useNodeRef hook's onChange argument now receives both the current node and the previous node that were attached to the ref.
    • The onChange argument is only called if the previous node differs from the current node

@​dnd-kit/utilities@​3.0.2

Patch Changes

  • #532 dfa8d69 Thanks @​Nauss! - fix: isWindow has been updated to support checking wether an element is a window object in Electron applications.

@​dnd-kit/utilities@​3.0.1

Patch Changes

  • #509 1c6369e Thanks @​clauderic! - Helpers have been updated to support rendering in foreign window contexts (via ReactDOM.render or ReactDOM.createPortal).

    For example, checking if an element is an instance of an HTMLElement is normally done like so:

    if (element instanceof HTMLElement)

    However, when rendering in a different window, this can return false even if the element is indeed an HTMLElement, because this code is equivalent to:

... (truncated)

Changelog

Sourced from @​dnd-kit/utilities's changelog.

3.1.0

Minor Changes

  • #518 6310227 Thanks @​clauderic! - Major internal refactor of measuring and collision detection.

    Summary of changes

    Previously, all collision detection algorithms were relative to the top and left points of the document. While this approach worked in most situations, it broke down in a number of different use-cases, such as fixed position droppable containers and trying to drag between containers that had different scroll positions.

    This new approach changes the frame of comparison to be relative to the viewport. This is a major breaking change, and will need to be released under a new major version bump.

    Breaking changes:

    • By default, @dnd-kit now ignores only the transforms applied to the draggable / droppable node itself, but considers all the transforms applied to its ancestors. This should provide the right balance of flexibility for most consumers.
      • Transforms applied to the droppable and draggable nodes are ignored by default, because the recommended approach for moving items on the screen is to use the transform property, which can interfere with the calculation of collisions.
      • Consumers can choose an alternate approach that does consider transforms for specific use-cases if needed by configuring the measuring prop of . Refer to the example.
    • Reduced the number of concepts related to measuring from ViewRect, LayoutRect to just a single concept of ClientRect.
      • The ClientRect interface no longer holds the offsetTop and offsetLeft properties. For most use-cases, you can replace offsetTop with top and offsetLeft with left.
      • Replaced the following exports from the @dnd-kit/core package with getClientRect:
        • getBoundingClientRect
        • getViewRect
        • getLayoutRect
        • getViewportLayoutRect
    • Removed translatedRect from the SensorContext interface. Replace usage with collisionRect.
    • Removed activeNodeClientRect on the DndContext interface. Replace with activeNodeRect.
  • 528c67e Thanks @​clauderic! - Introduced the useLatestValue hook, which returns a ref that holds the latest value of a given argument. Optionally, the second argument can be used to customize the dependencies passed to the effect.

Patch Changes

  • #561 02edd26 Thanks @​clauderic! - - The useNodeRef hook's onChange argument now receives both the current node and the previous node that were attached to the ref.
    • The onChange argument is only called if the previous node differs from the current node

3.0.2

Patch Changes

  • #532 dfa8d69 Thanks @​Nauss! - fix: isWindow has been updated to support checking wether an element is a window object in Electron applications.

3.0.1

Patch Changes

  • #509 1c6369e Thanks @​clauderic! - Helpers have been updated to support rendering in foreign window contexts (via ReactDOM.render or ReactDOM.createPortal).

    For example, checking if an element is an instance of an HTMLElement is normally done like so:

    if (element instanceof HTMLElement)

... (truncated)

Commits
  • d1a2df9 Version Packages
  • eb6d4c9 Minor polishing and code style
  • 7833da4 Fix resize observer not always being connected
  • 528c67e Expose useLatestValue hook
  • 02edd26 Observe resizes of droppable containers while dragging (#561)
  • f3ad20d Refactor CollisionDetection to return an array of Collisions (#558)
  • 2448b7a Merge pull request #518 from clauderic/refactor-collision-and-measuring
  • 9719ab8 Refactor measuring and collision detection
  • 1a897f7 Version Packages (#543)
  • dfa8d69 fix: correctly check whether an element is a window in electron context (#532)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [@dnd-kit/utilities](https://github.com/clauderic/dnd-kit/tree/HEAD/packages/utilities) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/clauderic/dnd-kit/releases)
- [Changelog](https://github.com/clauderic/dnd-kit/blob/master/packages/utilities/CHANGELOG.md)
- [Commits](https://github.com/clauderic/dnd-kit/commits/@dnd-kit/[email protected]/packages/utilities)

---
updated-dependencies:
- dependency-name: "@dnd-kit/utilities"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Jan 10, 2022
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github May 23, 2022

Superseded by #33.

@dependabot dependabot bot closed this May 23, 2022
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/dnd-kit/utilities-3.1.0 branch May 23, 2022 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants