Skip to content

Commit b2198e7

Browse files
docs(drag and drop): Updates images for v6. (#4584)
* docs(drag and drop): Updates images for v6. * Removing error state guidelines until a design decision is made for v6. * Updating images to show proper placement of drag cursor. --------- Co-authored-by: Andrew Ronaldson <aronalds@redhat.com>
1 parent 8254239 commit b2198e7

13 files changed

Lines changed: 934 additions & 28 deletions

File tree

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drag-and-drop/drag.md

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,69 +3,70 @@ id: Drag and drop
33
section: components
44
---
55

6+
import '../components.css';
7+
68
## Usage
79
### Simple list
810
1. **Draggable area:** The drag and drop interaction can be triggered with click and hold over any part of the item. The `fa-grip` icon is used to show that the drag and drop interaction is available.
911

10-
<img src="./img/Simple-list-drag-1.png" width="588" alt="Showing the area in which an item can be dragged."/>
12+
<div class="ws-docs-content-img">
13+
![Example of a data list with items that can be dragged.](./img/dnd-simple1.svg)
14+
</div>
1115

1216
2. **Bounding box:** Upon click & hold a `--pf-v6-global--active-color--100` border will show the draggable area that is available.
1317

1418
3. **onDrag event:** The list item being dragged will also use a `--pf-v6-global--active-color--100` border to highlight it as the item being dragged and all other list items will switch to a disabled state. The space where the item is being dragged from will remain empty to indicate its original position in the list.
1519

16-
<img src="./img/Simple-list-drag-2-3.png" width="683" alt="Borders appear around the item and bounding box shows the area in which an item can be dragged."/>
20+
<div class="ws-docs-content-img">
21+
![Example of what happens when an item is dragged. A blue border appears around the item being dragged and a faded placeholder version stays in the original position.](./img/dnd-simple23.svg)
22+
</div>
1723

1824
4. **postDrag event:** Once dropped, the items will be reordered based on the user’s action. The space left empty is then filled by the next item in the list.
1925

20-
<img src="./img/Simple-list-drag-4.png" width="588" alt="postDrag drops item into new position and all border highlights are disabled."/>
21-
22-
5. **Error state:** If the list item is dragged outside the bounding box the borders on the dragged item will switch to `--pf-v6-global--danger-color--100` and the cursor will change to `not-allowed` to indicate an invalid placement. If the user releases the cursor outside the bounding area the dragged item will return to its default position.
26+
<div class="ws-docs-content-img">
27+
![Example of what happens after an item is dragged. The item is dropped into the new position and the border color disappears. The faded placeholder item also disappears.](./img/dnd-simple4.svg)
28+
</div>
2329

24-
<img src="./img/Simple-list-drag-5-error.png" width="588" alt="Dragging outside the bounding box shows an error state on the dragged item."/>
2530

2631
### Multiple lists
2732
PatternFly drag and drop allows users to move items between different list groups. For example, in a To-Do list scenario users can quickly drag list items from the ”In progress” column to the “Done” column.
2833

2934
1. **Draggable item**
3035

31-
<img src="./img/Multiple-list-drag-1.png" width="1277" alt="Showing the area in which an item can be dragged."/>
32-
36+
<div class="ws-docs-content-img">
37+
![An example of multiple data lists with items that can be dragged.](./img/dnd-multi1.svg)
38+
</div>
3339

3440
2. **onDrag event**
3541

36-
<img src="./img/Multiple-list-drag-2.png" width="1277" alt="Borders appear around the item and bounding boxes shows the area in which an item can be dragged."/>
37-
42+
<div class="ws-docs-content-img">
43+
![Example of what happens when an item is dragged. A blue border appears around the item being dragged and a faded placeholder version stays in the original position.](./img/dnd-multi2.svg)
44+
</div>
3845

3946
3. **postDrag event**
4047

41-
<img src="./img/Multiple-list-drag-3.png" width="1277" alt="postDrag drops item into new position and all border highlights are disabled."/>
42-
43-
4. **Error state**
44-
45-
<img src="./img/Multiple-list-drag-4-error.png" width="1277" alt="When dragging outside the bounding box the border color of the dragged item changes to pf-color-red-100 and the cursor changes to error state."/>
46-
47-
48-
48+
<div class="ws-docs-content-img">
49+
![Example of what happens after an item is dragged. The item is dropped into the new position and the border color disappears. The faded placeholder item also disappears.](./img/dnd-multi3.svg)
50+
</div>
4951

5052

5153
### Draggable cards
5254
In a card view, when the selected card has been dropped the others will reposition following a left-to-right flow by default.
5355

5456
1. **Draggable item**
5557

56-
<img src="./img/Card-drag-1.png" width="1042" alt="Showing the area in which an item can be dragged."/>
57-
58+
<div class="ws-docs-content-img">
59+
![Example of a group of cards that can be dragged.](./img/dnd-cards1.svg)
60+
</div>
5861

5962
2. **onDrag event**
6063

61-
<img src="./img/Card-drag-2.png" width="1104" alt="Borders appear around the item and bounding box shows the area in which an item can be dragged."/>
62-
64+
<div class="ws-docs-content-img">
65+
![Example of what happens when a card is dragged. A blue border appears around the card being dragged and a faded placeholder version stays in the original position.](./img/dnd-cards2.svg)
66+
</div>
6367

6468
3. **postDrag event**
6569

66-
<img src="./img/Card-drag-3.png" width="1051" alt="postDrag drops item into new position and all border highlights are disabled."/>
67-
68-
4. **Error state**
69-
70-
<img src="./img/Card-drag-4-error.png" width="1128" alt="When dragging outside the bounding box the border color of the dragged item changes to pf-color-red-100 and the cursor changes to error state."/>
71-
70+
<div class="ws-docs-content-img">
71+
![Example of what happens after a card is dragged. The card is dropped into the new position and the border color disappears. The faded placeholder card also disappears.](./img/dnd-cards3.svg)
72+
</div>

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drag-and-drop/img/dnd-cards1.svg

Lines changed: 93 additions & 0 deletions
Loading

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drag-and-drop/img/dnd-cards2.svg

Lines changed: 128 additions & 0 deletions
Loading

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drag-and-drop/img/dnd-cards3.svg

Lines changed: 93 additions & 0 deletions
Loading

packages/documentation-site/patternfly-docs/content/design-guidelines/components/drag-and-drop/img/dnd-cards4.svg

Lines changed: 102 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)