From 35b3358eebc81cbc8a7e06bedcbf8e33c4c4b4cc Mon Sep 17 00:00:00 2001 From: Tomasz Kajtoch Date: Fri, 23 Jun 2023 13:15:21 +0200 Subject: [PATCH 01/24] feat(DragAndDrop): Switch from react-beautiful-dnd to its fork @hello-pangea/dnd (#6868) * feat(DragAndDrop): Switch from react-beautiful-dnd to its fork @hello-pangea/dnd * test(EuiDraggable): add snapshot test for the basic render assertion and rename test cases --- package.json | 3 +- .../drag_and_drop/drag_and_drop_example.js | 15 +- .../column_selector.test.tsx.snap | 36 +- .../column_sorting.test.tsx.snap | 20 +- .../datagrid/controls/column_selector.tsx | 2 +- .../datagrid/controls/column_sorting.tsx | 2 +- .../__snapshots__/draggable.test.tsx.snap | 115 +- .../__snapshots__/droppable.test.tsx.snap | 12 +- .../drag_and_drop/drag_and_drop.a11y.tsx | 2 +- .../drag_and_drop/drag_drop_context.tsx | 2 +- .../drag_and_drop/draggable.test.tsx | 87 +- src/components/drag_and_drop/draggable.tsx | 8 +- .../drag_and_drop/droppable.test.tsx | 5 - src/components/drag_and_drop/droppable.tsx | 2 +- src/components/drag_and_drop/index.ts | 7 +- src/components/drag_and_drop/services.ts | 2 +- yarn.lock | 3374 ++++++++++++----- 17 files changed, 2516 insertions(+), 1178 deletions(-) mode change 100644 => 100755 yarn.lock diff --git a/package.json b/package.json index a44cae8822e..63f830e3468 100644 --- a/package.json +++ b/package.json @@ -63,10 +63,10 @@ "test-staged" ], "dependencies": { + "@hello-pangea/dnd": "^16.2.0", "@types/chroma-js": "^2.0.0", "@types/lodash": "^4.14.194", "@types/numeral": "^0.0.28", - "@types/react-beautiful-dnd": "^13.1.2", "@types/react-input-autosize": "^2.2.1", "@types/react-virtualized-auto-sizer": "^1.0.1", "@types/react-window": "^1.8.5", @@ -79,7 +79,6 @@ "mdast-util-to-hast": "^10.0.0", "numeral": "^2.0.6", "prop-types": "^15.6.0", - "react-beautiful-dnd": "^13.1.0", "react-dropzone": "^11.5.3", "react-element-to-jsx-string": "^14.3.4", "react-focus-on": "^3.9.1", diff --git a/src-docs/src/views/drag_and_drop/drag_and_drop_example.js b/src-docs/src/views/drag_and_drop/drag_and_drop_example.js index 0a74ac9c829..96b5d177fdb 100644 --- a/src-docs/src/views/drag_and_drop/drag_and_drop_example.js +++ b/src-docs/src/views/drag_and_drop/drag_and_drop_example.js @@ -42,10 +42,14 @@ export const DragAndDropExample = {

An extension of{' '} + + @hello-pangea/dnd + {' '} + (which is an actively maintained fork of{' '} react-beautiful-dnd - {' '} - with a compatible API and built-in style opinions. Functionality + + ) with a compatible API and built-in style opinions. Functionality results from 3 components working together: