Skip to content

Commit 2f09053

Browse files
authored
chore(DragDrop): deprecate in v6 (#10181)
* chore(DragDrop): deprecate in v6 * remove templates files * mark examples as dep
1 parent 74d2de5 commit 2f09053

18 files changed

Lines changed: 16 additions & 19 deletions

File tree

packages/react-core/src/components/DataList/examples/DataList.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import AngleDownIcon from '@patternfly/react-icons/dist/esm/icons/angle-down-ico
2323
import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
2424
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
2525
import { css } from '@patternfly/react-styles';
26+
import { DragDrop, Draggable, Droppable } from '@patternfly/react-core/deprecated';
2627

2728
## Examples
2829

@@ -86,7 +87,7 @@ Note: There is a new recommended drag and drop implementation with full keyboard
8687

8788
Previously, draggable data lists had their own API for the [drag and drop component](/components/drag-and-drop), which wasn't flexible enough to allow custom styling for items as they are dragged. To address this disparity, `<DragDrop>`, `<Draggable>`, and `<Droppable>` components were added to replace our now deprecated HTML5-based API. Keyboard and screen reader accessibility for the `<DragDrop>` component is still in development.
8889

89-
```ts isBeta file="./DataListDraggable.tsx"
90+
```ts isDeprecated file="./DataListDraggable.tsx"
9091

9192
```
9293

packages/react-core/src/components/DataList/examples/DataListDraggable.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ import {
88
DataListControl,
99
DataListDragButton,
1010
DataListItemCells,
11-
DragDrop,
12-
Draggable,
13-
Droppable,
1411
getUniqueId
1512
} from '@patternfly/react-core';
13+
import { DragDrop, Draggable, Droppable } from '@patternfly/react-core/deprecated';
1614

1715
interface ItemType {
1816
id: string;

packages/react-core/src/components/DualListSelector/examples/DualListSelector.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-i
2222
import PficonSortCommonAscIcon from '@patternfly/react-icons/dist/esm/icons/pficon-sort-common-asc-icon';
2323
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
2424
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
25+
import { DragDrop, Draggable, Droppable } from '@patternfly/react-core/deprecated';
2526

2627
## Examples
2728

@@ -103,7 +104,7 @@ This example only allows reordering the contents of the "chosen" pane with drag
103104

104105
Keyboard and screen reader accessibility for the `<DragDrop>` component is still in development.
105106

106-
```ts file="DualListSelectorComposableDragDrop.tsx"
107+
```ts isDeprecated file="DualListSelectorComposableDragDrop.tsx"
107108

108109
```
109110

packages/react-core/src/components/DualListSelector/examples/DualListSelectorComposableDragDrop.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
import React from 'react';
22
import {
3-
DragDrop,
4-
Droppable,
5-
Draggable,
63
DualListSelector,
74
DualListSelectorPane,
85
DualListSelectorList,
96
DualListSelectorListItem,
107
DualListSelectorControlsWrapper,
11-
DualListSelectorControl,
12-
DraggableItemPosition
8+
DualListSelectorControl
139
} from '@patternfly/react-core';
10+
import { DragDrop, Draggable, Droppable, DraggableItemPosition } from '@patternfly/react-core/deprecated';
1411
import AngleDoubleLeftIcon from '@patternfly/react-icons/dist/esm/icons/angle-double-left-icon';
1512
import AngleLeftIcon from '@patternfly/react-icons/dist/esm/icons/angle-left-icon';
1613
import AngleDoubleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-double-right-icon';

packages/react-core/src/components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ export * from './DataList';
2121
export * from './DatePicker';
2222
export * from './DescriptionList';
2323
export * from './Divider';
24-
export * from './DragDrop';
2524
export * from './Drawer';
2625
export * from './Dropdown';
2726
export * from './DualListSelector';

packages/react-core/src/components/DragDrop/DragDrop.tsx renamed to packages/react-core/src/deprecated/components/DragDrop/DragDrop.tsx

File renamed without changes.

packages/react-core/src/components/DragDrop/Draggable.tsx renamed to packages/react-core/src/deprecated/components/DragDrop/Draggable.tsx

File renamed without changes.

packages/react-core/src/components/DragDrop/Droppable.tsx renamed to packages/react-core/src/deprecated/components/DragDrop/Droppable.tsx

File renamed without changes.

packages/react-core/src/components/DragDrop/DroppableContext.ts renamed to packages/react-core/src/deprecated/components/DragDrop/DroppableContext.ts

File renamed without changes.

packages/react-core/src/components/DragDrop/__tests__/DragDrop.test.tsx renamed to packages/react-core/src/deprecated/components/DragDrop/__tests__/DragDrop.test.tsx

File renamed without changes.

0 commit comments

Comments
 (0)