Skip to content

Commit

Permalink
fix(react-beautiful-dnd): remove react-beautiful-dnd because it is no…
Browse files Browse the repository at this point in the history
…t maintained anymore, use @hello-pangea/dnd because it is a maintained drop-in replacement for react-beautiful-dnd
  • Loading branch information
ByronDWall committed Jan 21, 2025
1 parent 4a2ee0d commit 0f99d50
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 96 deletions.
5 changes: 2 additions & 3 deletions packages/components/data-table-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,10 @@
"@commercetools-uikit/utils": "19.22.1",
"@emotion/react": "^11.10.5",
"@emotion/styled": "^11.10.5",
"@hello-pangea/dnd": "^17.0.0",
"@types/debounce-promise": "^3.1.6",
"@types/react-beautiful-dnd": "^13.1.3",
"debounce-promise": "^3.1.2",
"lodash": "4.17.21",
"react-beautiful-dnd": "13.1.1"
"lodash": "4.17.21"
},
"devDependencies": {
"formik": "^2.4.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
type Dispatch,
} from 'react';
import { useIntl } from 'react-intl';
import { DragDropContext, type DropResult } from 'react-beautiful-dnd';
import { DragDropContext, type DropResult } from '@hello-pangea/dnd';
import debounce from 'debounce-promise';
import differenceWith from 'lodash/differenceWith';
import styled from '@emotion/styled';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DragDropContext, Droppable } from 'react-beautiful-dnd';
import { DragDropContext, Droppable } from '@hello-pangea/dnd';
import { screen, render } from '../../../../../test/test-utils';
import DraggableTag from './draggable-tag';

Expand All @@ -22,12 +22,7 @@ it('should render the column tag when rendering a column', () => {

render(
<DragDropContext>
<Droppable
droppableId="droppableId"
isDropDisabled={false}
isCombineEnabled={false}
ignoreContainerClipping={false}
>
<Droppable droppableId="droppableId">
{(provided) => (
<div ref={provided.innerRef}>
<DraggableTag {...props} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ReactNode } from 'react';
import styled from '@emotion/styled';
import { Draggable } from 'react-beautiful-dnd';
import { Draggable } from '@hello-pangea/dnd';
import { designTokens } from '@commercetools-uikit/design-system';
import Tag from '@commercetools-uikit/tag';
import DraggingContainer from './draggable-tag.styles';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DragDropContext } from 'react-beautiful-dnd';
import { DragDropContext } from '@hello-pangea/dnd';
import { screen, render } from '../../../../../test/test-utils';
import DroppablePanel from './droppable-panel';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ReactNode } from 'react';
import { Droppable } from 'react-beautiful-dnd';
import { type ReactNode } from 'react';
import { Droppable } from '@hello-pangea/dnd';
import Spacings from '@commercetools-uikit/spacings';
import Text from '@commercetools-uikit/text';
import DraggableTag from '../draggable-tag';
Expand All @@ -22,12 +22,7 @@ export type TDroppablePanelProps = {

const DroppablePanel = (props: TDroppablePanelProps) => {
return (
<Droppable
droppableId={props.droppableId}
isDropDisabled={false}
isCombineEnabled={false}
ignoreContainerClipping={false}
>
<Droppable droppableId={props.droppableId}>
{(provided) => (
<TagContainerEditable
data-testid={props.droppableId}
Expand Down
133 changes: 58 additions & 75 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ __metadata:
languageName: node
linkType: hard

"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.15.4, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.15, @babel/runtime@npm:^7.22.5, @babel/runtime@npm:^7.24.5, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.7.7, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7, @babel/runtime@npm:^7.9.2":
"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.12.0, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.18.3, @babel/runtime@npm:^7.20.13, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.22.15, @babel/runtime@npm:^7.22.5, @babel/runtime@npm:^7.24.5, @babel/runtime@npm:^7.25.6, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.7.6, @babel/runtime@npm:^7.7.7, @babel/runtime@npm:^7.8.4, @babel/runtime@npm:^7.8.7":
version: 7.26.0
resolution: "@babel/runtime@npm:7.26.0"
dependencies:
Expand Down Expand Up @@ -2445,13 +2445,12 @@ __metadata:
"@commercetools-uikit/utils": 19.22.1
"@emotion/react": ^11.10.5
"@emotion/styled": ^11.10.5
"@hello-pangea/dnd": ^17.0.0
"@types/debounce-promise": ^3.1.6
"@types/react-beautiful-dnd": ^13.1.3
debounce-promise: ^3.1.2
formik: ^2.4.6
lodash: 4.17.21
react: 19.0.0
react-beautiful-dnd: 13.1.1
react-dom: 19.0.0
react-intl: ^6.3.2
peerDependencies:
Expand Down Expand Up @@ -5203,6 +5202,24 @@ __metadata:
languageName: node
linkType: hard

"@hello-pangea/dnd@npm:^17.0.0":
version: 17.0.0
resolution: "@hello-pangea/dnd@npm:17.0.0"
dependencies:
"@babel/runtime": ^7.25.6
css-box-model: ^1.2.1
memoize-one: ^6.0.0
raf-schd: ^4.0.3
react-redux: ^9.1.2
redux: ^5.0.1
use-memo-one: ^1.1.3
peerDependencies:
react: ^18.0.0
react-dom: ^18.0.0
checksum: a0da6a41b741b8c77ca6e2d6f54c3ce5a0daf92c0fd3b4ad1a63d40fd166a7d7aec0993c1d4f29e9c7f9c43a00cf74393fcb33afb7422450a974eb63f50a89da
languageName: node
linkType: hard

"@humanwhocodes/config-array@npm:^0.13.0":
version: 0.13.0
resolution: "@humanwhocodes/config-array@npm:0.13.0"
Expand Down Expand Up @@ -8176,7 +8193,7 @@ __metadata:
languageName: node
linkType: hard

"@types/hoist-non-react-statics@npm:3, @types/hoist-non-react-statics@npm:^3.3.0, @types/hoist-non-react-statics@npm:^3.3.1":
"@types/hoist-non-react-statics@npm:3, @types/hoist-non-react-statics@npm:^3.3.1":
version: 3.3.6
resolution: "@types/hoist-non-react-statics@npm:3.3.6"
dependencies:
Expand Down Expand Up @@ -8385,15 +8402,6 @@ __metadata:
languageName: node
linkType: hard

"@types/react-beautiful-dnd@npm:^13.1.3":
version: 13.1.8
resolution: "@types/react-beautiful-dnd@npm:13.1.8"
dependencies:
"@types/react": "*"
checksum: f71c64ba7e2e1f8480e772b45268856d2bf99adf90d12dd5f31486075dfd3e33a0b0922969851c660f01aa9593aa38b38e17ee9038eb866af9ec4327be903cb9
languageName: node
linkType: hard

"@types/react-dom@npm:19.0.0":
version: 19.0.0
resolution: "@types/react-dom@npm:19.0.0"
Expand All @@ -8412,18 +8420,6 @@ __metadata:
languageName: node
linkType: hard

"@types/react-redux@npm:^7.1.20":
version: 7.1.34
resolution: "@types/react-redux@npm:7.1.34"
dependencies:
"@types/hoist-non-react-statics": ^3.3.0
"@types/react": "*"
hoist-non-react-statics: ^3.3.0
redux: ^4.0.0
checksum: ba0cc5f54b91bff162cc97cf5d82d0077944e2d744c276c3c8eb896a293aba00923b513f5cd6ad717a46bf0c128a099ad697c98672202acb25143602042c8e6c
languageName: node
linkType: hard

"@types/react-router-dom@npm:^5.3.3":
version: 5.3.3
resolution: "@types/react-router-dom@npm:5.3.3"
Expand Down Expand Up @@ -8540,6 +8536,13 @@ __metadata:
languageName: node
linkType: hard

"@types/use-sync-external-store@npm:^0.0.6":
version: 0.0.6
resolution: "@types/use-sync-external-store@npm:0.0.6"
checksum: a95ce330668501ad9b1c5b7f2b14872ad201e552a0e567787b8f1588b22c7040c7c3d80f142cbb9f92d13c4ea41c46af57a20f2af4edf27f224d352abcfe4049
languageName: node
linkType: hard

"@types/uuid@npm:^9.0.1":
version: 9.0.8
resolution: "@types/uuid@npm:9.0.8"
Expand Down Expand Up @@ -11281,7 +11284,7 @@ __metadata:
languageName: node
linkType: hard

"css-box-model@npm:^1.2.0":
"css-box-model@npm:^1.2.1":
version: 1.2.1
resolution: "css-box-model@npm:1.2.1"
dependencies:
Expand Down Expand Up @@ -14189,7 +14192,7 @@ __metadata:
languageName: node
linkType: hard

"hoist-non-react-statics@npm:3, hoist-non-react-statics@npm:^3.1.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.1, hoist-non-react-statics@npm:^3.3.2":
"hoist-non-react-statics@npm:3, hoist-non-react-statics@npm:^3.1.0, hoist-non-react-statics@npm:^3.3.0, hoist-non-react-statics@npm:^3.3.1":
version: 3.3.2
resolution: "hoist-non-react-statics@npm:3.3.2"
dependencies:
Expand Down Expand Up @@ -17220,13 +17223,6 @@ __metadata:
languageName: node
linkType: hard

"memoize-one@npm:^5.1.1":
version: 5.2.1
resolution: "memoize-one@npm:5.2.1"
checksum: a3cba7b824ebcf24cdfcd234aa7f86f3ad6394b8d9be4c96ff756dafb8b51c7f71320785fbc2304f1af48a0467cbbd2a409efc9333025700ed523f254cb52e3d
languageName: node
linkType: hard

"memoize-one@npm:^6.0.0":
version: 6.0.0
resolution: "memoize-one@npm:6.0.0"
Expand Down Expand Up @@ -19278,7 +19274,7 @@ __metadata:
languageName: node
linkType: hard

"prop-types@npm:^15.6.0, prop-types@npm:^15.6.2, prop-types@npm:^15.7.2, prop-types@npm:^15.8.1":
"prop-types@npm:^15.6.0, prop-types@npm:^15.6.2, prop-types@npm:^15.8.1":
version: 15.8.1
resolution: "prop-types@npm:15.8.1"
dependencies:
Expand Down Expand Up @@ -19448,7 +19444,7 @@ __metadata:
languageName: node
linkType: hard

"raf-schd@npm:^4.0.2, raf-schd@npm:^4.0.3":
"raf-schd@npm:^4.0.3":
version: 4.0.3
resolution: "raf-schd@npm:4.0.3"
checksum: 45514041c5ad31fa96aef3bb3c572a843b92da2f2cd1cb4a47c9ad58e48761d3a4126e18daa32b2bfa0bc2551a42d8f324a0e40e536cb656969929602b4e8b58
Expand Down Expand Up @@ -19491,24 +19487,6 @@ __metadata:
languageName: node
linkType: hard

"react-beautiful-dnd@npm:13.1.1":
version: 13.1.1
resolution: "react-beautiful-dnd@npm:13.1.1"
dependencies:
"@babel/runtime": ^7.9.2
css-box-model: ^1.2.0
memoize-one: ^5.1.1
raf-schd: ^4.0.2
react-redux: ^7.2.0
redux: ^4.0.4
use-memo-one: ^1.1.1
peerDependencies:
react: ^16.8.5 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.5 || ^17.0.0 || ^18.0.0
checksum: 5f90f7c0ab77a14dfcd496cbd94bbde457612f380c6fc815f3bba7b52effd75132948fcaa661a902a184bb1e6ae5896dcf5b0c77c4ddf809a2c65288f3eed5a7
languageName: node
linkType: hard

"react-confetti@npm:^6.1.0":
version: 6.2.2
resolution: "react-confetti@npm:6.2.2"
Expand Down Expand Up @@ -19651,7 +19629,7 @@ __metadata:
languageName: node
linkType: hard

"react-is@npm:^17.0.1, react-is@npm:^17.0.2":
"react-is@npm:^17.0.1":
version: 17.0.2
resolution: "react-is@npm:17.0.2"
checksum: 9d6d111d8990dc98bc5402c1266a808b0459b5d54830bbea24c12d908b536df7883f268a7868cfaedde3dd9d4e0d574db456f84d2e6df9c4526f99bb4b5344d8
Expand All @@ -19665,24 +19643,22 @@ __metadata:
languageName: node
linkType: hard

"react-redux@npm:^7.2.0":
version: 7.2.9
resolution: "react-redux@npm:7.2.9"
"react-redux@npm:^9.1.2":
version: 9.2.0
resolution: "react-redux@npm:9.2.0"
dependencies:
"@babel/runtime": ^7.15.4
"@types/react-redux": ^7.1.20
hoist-non-react-statics: ^3.3.2
loose-envify: ^1.4.0
prop-types: ^15.7.2
react-is: ^17.0.2
"@types/use-sync-external-store": ^0.0.6
use-sync-external-store: ^1.4.0
peerDependencies:
react: ^16.8.3 || ^17 || ^18
"@types/react": ^18.2.25 || ^19
react: ^18.0 || ^19
redux: ^5.0.0
peerDependenciesMeta:
react-dom:
"@types/react":
optional: true
react-native:
redux:
optional: true
checksum: 369a2bdcf87915659af9e5c55abfd9f52a84e43e0d12dcc108ed17dbe6933558b7b7fc12caa9c10c1a10a8be7df89454b6c96989d8573fedec1a772c94a1f145
checksum: 96dfe2929561d7c98d4443722738e4595f08758bde27b7bc20cd98ba9b0dfe9b81b9fa17b6888be94a0c1d2d1305397ae493a8219698536d011a941589eb82bd
languageName: node
linkType: hard

Expand Down Expand Up @@ -19956,12 +19932,10 @@ __metadata:
languageName: node
linkType: hard

"redux@npm:^4.0.0, redux@npm:^4.0.4":
version: 4.2.1
resolution: "redux@npm:4.2.1"
dependencies:
"@babel/runtime": ^7.9.2
checksum: f63b9060c3a1d930ae775252bb6e579b42415aee7a23c4114e21a0b4ba7ec12f0ec76936c00f546893f06e139819f0e2855e0d55ebfce34ca9c026241a6950dd
"redux@npm:^5.0.1":
version: 5.0.1
resolution: "redux@npm:5.0.1"
checksum: e74affa9009dd5d994878b9a1ce30d6569d986117175056edb003de2651c05b10fe7819d6fa94aea1a94de9a82f252f986547f007a2fbeb35c317a2e5f5ecf2c
languageName: node
linkType: hard

Expand Down Expand Up @@ -23102,7 +23076,7 @@ __metadata:
languageName: node
linkType: hard

"use-memo-one@npm:^1.1.1":
"use-memo-one@npm:^1.1.3":
version: 1.1.3
resolution: "use-memo-one@npm:1.1.3"
peerDependencies:
Expand Down Expand Up @@ -23139,6 +23113,15 @@ __metadata:
languageName: node
linkType: hard

"use-sync-external-store@npm:^1.4.0":
version: 1.4.0
resolution: "use-sync-external-store@npm:1.4.0"
peerDependencies:
react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0
checksum: dc3843a1b59ac8bd01417bd79498d4c688d5df8bf4801be50008ef4bfaacb349058c0b1605b5b43c828e0a2d62722d7e861573b3f31cea77a7f23e8b0fc2f7e3
languageName: node
linkType: hard

"util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1":
version: 1.0.2
resolution: "util-deprecate@npm:1.0.2"
Expand Down

0 comments on commit 0f99d50

Please sign in to comment.