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

Update dependency react-draggable to v4 #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jul 31, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-draggable ^3.2.1 -> ^4.0.0 age adoption passing confidence

Release Notes

react-grid-layout/react-draggable (react-draggable)

v4.4.6

Compare Source

  • Fix: state inconsistency in React 18 #​699
  • Internal: devDependencies updates

v4.4.5

Compare Source

  • Fix: grid prop unused in handleDragStop #​621
  • Fix: children prop missing in TypeScript definition #​648
  • Internal: Various devDep updates

v4.4.4

Compare Source

  • Fix: Ensure documentElement.style actually exists. Fixes crashes in some obscure environments. #​574 #​575
  • Fix: Add react/react-dom as peerDependencies again to fix Yarn PnP
  • Size: Replace classnames with clsx to save a few bytes
  • Internal: Additional tests on ref functionality and additional README content on nodeRef
  • Internal: Lots of devDependencies updates
  • Docs: Various README and demo updates, see git commits

v4.4.3

Compare Source

  • Add nodeRef to TypeScript definitions

v4.4.2

Compare Source

  • Fix: Remove "module" from package.json (it is no longer being built)

v4.4.1

Compare Source

  • Fix: Remove "module" definition in package.json
    • Giving up on this: there isn't a great reason to publish modules
      here as they won't be significantly tree-shook, and it bloats
      the published package.
    • Fixes incompatiblity in 4.4.0 with webpack, where webpack is now
      selecting "module" because "browser" is no longer present.

v4.4.0

Compare Source

  • Add nodeRef:
    • If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
      Unfortunately, in order for <Draggable> to work properly, we need raw access
      to the underlying DOM node. If you want to avoid the warning, pass a nodeRef
      as in this example:
      function MyComponent() {
        const nodeRef = React.useRef(null);
        return (
          <Draggable nodeRef={nodeRef}>
            <div ref={nodeRef}>Example Target</div>
          </Draggable>
        );
      }
      This can be used for arbitrarily nested components, so long as the ref ends up
      pointing to the actual child DOM node and not a custom component.
      Thanks to react-transition-group for the inspiration.
      nodeRef is also available on <DraggableCore>.
  • Remove "browser" field in "package.json":
    • There is nothing special in the browser build that is actually practical
      for modern use. The "browser" field, as defined in
      https://github.com/defunctzombie/package-browser-field-spec#overview,
      indicates that you should use it if you are directly accessing globals,
      using browser-specific features, dom manipulation, etc.

      React components like react-draggable are built to do minimal raw
      DOM manipulation, and to always gate this behind conditionals to ensure
      that server-side rendering still works. We don't make any changes
      to any of that for the "browser" build, so it's entirely redundant.

      This should also fix the "Super expression must either be null or
      a function" error (#​472) that some users have experienced with particular
      bundler configurations.

      The browser build may still be imported at "build/web/react-draggable.min.js".
      This is to prevent breakage only. The file is no longer minified to prevent
      possible terser bugs.

    • The browser build will likely be removed entirely in 5.0.

  • Fix: Make bounds optional in TypeScript #​473

v4.3.1

Compare Source

This is a bugfix release.

  • Happy Easter!
  • Fixed a serious bug that caused <DraggableCore> not to pass styles.
    • React.cloneElement has an odd quirk. When you do:
      return React.cloneElement(this.props.children, {style: this.props.children.props.style});
      , style ends up undefined.
  • Fixed a bug that caused debug output to show up in the build.
    • babel-loader cache does not invalidate when it should. I had modified webpack.config.js in the last version but it reused stale cache.

v4.3.0

Compare Source

  • Fix setState warning after dismount if drag still active. Harmless, but prints a warning. #​424
  • Fix a long-standing issue where text inputs would unfocus upon dismounting a <Draggable>.
  • Fix an issue where the insides of a <Draggable> were not scrollable on touch devices due to the outer container having touch-action: none.
    • This was a long-standing hack for mobile devices. Without it, the page will scroll while you drag the element.
    • The new solution will simply cancel the touch event e.preventDefault(). However, due to changes in Chrome >= 56, this is only possible on
      non-passive event handlers. To fix this, we now add/remove the touchEvent on lifecycle events rather than using React's event system.
    • #​465
  • Upgrade devDeps and fix security warnings. None of them actually applied to this module.

v4.2.0

Compare Source

  • Fix: Apply scale parameter also while dragging an element. #​438
  • Fix: Don't ship process.env.DRAGGABLE_DEBUG checks in cjs/esm. #​445

v4.1.0

Compare Source

  • Add "module" to package.json. There are now three builds:

    • "main": ES5-compatible CJS build, suitable for most use cases with maximum compatibility.
      • For legacy reasons, this has exports of the following shape, which ensures no surprises in CJS or ESM polyfilled environments:
        module.exports = Draggable;
        module.exports.default = Draggable;
        module.exports.DraggableCore = DraggableCore;
    • "web": Minified UMD bundle exporting to window.ReactDraggable with the same ES compatibility as the "main" build.
    • "module": ES6-compatible build using import/export.

    This should fix issues like https://github.com/STRML/react-resizable/issues/113 while allowing modern bundlers to consume esm modules in the future.

    No compatibility changes are expected.

v4.0.3

Compare Source

  • Add typings and sourcemap to published npm package.
    • This compresses well so it does not bloat the package by much. Would be nice if npm had another delivery mechanism for optional modes, like web/TS.

v4.0.2

Compare Source

  • Republish to fix packaging errors. Fixes #​426

v4.0.1

Compare Source

  • Republish of 4.0.0 to fix a mistake where webpack working files were erroneously included in the package. Use this release instead as it is much smaller.

v3.3.2

Compare Source

v3.3.1

Compare Source

  • Fix React 16.9 componentWillMount deprecation.

v3.3.0

Compare Source

  • Addition of positionOffset prop, which can be Numbers (px) or string percentages (like "10%"). See the README for more.

Configuration

📅 Schedule: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants