Commit 995442c
authored
Replace react-beautiful-dnd with @hello-pangea/dnd (#4410)
Swaps the now-archived `react-beautiful-dnd` for
[`@hello-pangea/dnd`](https://github.com/hello-pangea/dnd), its
maintained, API-compatible fork. Addresses #3918.
## Why
- **Retires an abandoned dependency.** `react-beautiful-dnd` was
archived in April 2025 and will receive no further updates — security or
otherwise. `@hello-pangea/dnd` is the actively-maintained continuation
with an identical API.
- **Unblocks React 19.** `@hello-pangea/dnd` 18.0 officially declares
support for `react@^18 || ^19`. The old package is capped at React 18,
making it one of the hard blockers for an eventual React 19 upgrade.
- **Shrinks the dependency tree.** `@hello-pangea/dnd` drops the
`react-redux`/`redux` subtree that `react-beautiful-dnd` carried (net
~30 fewer lines in `yarn.lock`).
- **Supply-chain hygiene, not a CVE fix.** `yarn audit` currently
reports 0 vulnerabilities — this is preventative risk reduction
(removing a frozen dependency before a future CVE lands in it), not an
active-vulnerability patch. React 19 itself is *not* claimed as a
security improvement here.
## Changes
- Replaced the `react-beautiful-dnd` dependency with `@hello-pangea/dnd`
`^18.0.1`.
- Repointed the kit re-export (`kit/react-beautiful-dnd/index.ts`) at
the new package. The runtime API is identical, so the **four consumers
are untouched**: desktop & mobile `GroupingChooser`, desktop
`DynamicTabSwitcher`, and mobile `ColChooser`.
- One small type adjustment: `@hello-pangea/dnd` types
`DragDropContext`'s `children` as *required* (the old bundled `@types`
had it optional). Our `dragDropContext` call sites pass content via the
element factory's `item` alias rather than a literal `children` key, so
the kit marks `children` optional on just that factory's spec — via
`SetOptional<DragDropContextProps, 'children'>` (type-fest), the
existing Hoist idiom for this. `droppable`/`draggable` are unchanged;
they take a required `children` render-prop supplied directly at every
call site.
## Note — possibly a temporary step
This is deliberately a low-churn, drop-in swap to remove the dead
dependency and unblock React 19 **now**, independent of any larger
migration. `@hello-pangea/dnd` is itself a community maintenance fork
rather than a strategically-funded library. If we later decide to move
off the `react-beautiful-dnd` lineage entirely (e.g. to Atlassian's
[Pragmatic
drag-and-drop](https://atlassian.design/components/pragmatic-drag-and-drop/)),
the kit remains the single integration point to revisit. The kit
directory name was intentionally left as-is to keep this diff minimal.
## Testing
- `npx tsc --noEmit` — clean.
- `yarn lint` — clean.
- Smoke-tested in Toolbox (via `startWithHoist` / `inlineHoist`,
compiling Hoist from source):
- **Desktop** — confirmed `@hello-pangea/dnd` is the live library (DOM
uses its `data-rfd-*` namespace; the old `data-rbd-*` namespace is
gone). `GroupingChooser` reorders correctly via `onDragEnd` (verified a
drag flipping `City › Win/Lose` → `Win/Lose › City`, with the grid
re-grouping to match). `DynamicTabSwitcher` mounts and renders its tabs
as draggables. No console errors.
- **Mobile** — drag-and-drop verified working as-is.1 parent d7c45d0 commit 995442c
4 files changed
Lines changed: 47 additions & 67 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | | - | |
13 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
| 19 | + | |
| 20 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
77 | | - | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
906 | 906 | | |
907 | 907 | | |
908 | 908 | | |
909 | | - | |
| 909 | + | |
910 | 910 | | |
911 | 911 | | |
912 | 912 | | |
| |||
1806 | 1806 | | |
1807 | 1807 | | |
1808 | 1808 | | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
1809 | 1820 | | |
1810 | 1821 | | |
1811 | 1822 | | |
| |||
2641 | 2652 | | |
2642 | 2653 | | |
2643 | 2654 | | |
2644 | | - | |
2645 | | - | |
2646 | | - | |
2647 | | - | |
2648 | | - | |
2649 | | - | |
2650 | | - | |
2651 | 2655 | | |
2652 | 2656 | | |
2653 | 2657 | | |
| |||
2724 | 2728 | | |
2725 | 2729 | | |
2726 | 2730 | | |
2727 | | - | |
2728 | | - | |
2729 | | - | |
2730 | | - | |
2731 | | - | |
2732 | | - | |
2733 | | - | |
2734 | | - | |
2735 | | - | |
2736 | | - | |
2737 | 2731 | | |
2738 | 2732 | | |
2739 | 2733 | | |
2740 | 2734 | | |
2741 | 2735 | | |
2742 | | - | |
| 2736 | + | |
2743 | 2737 | | |
2744 | 2738 | | |
2745 | 2739 | | |
| |||
2813 | 2807 | | |
2814 | 2808 | | |
2815 | 2809 | | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
2816 | 2815 | | |
2817 | 2816 | | |
2818 | 2817 | | |
| |||
4125 | 4124 | | |
4126 | 4125 | | |
4127 | 4126 | | |
4128 | | - | |
| 4127 | + | |
4129 | 4128 | | |
4130 | 4129 | | |
4131 | 4130 | | |
| |||
5514 | 5513 | | |
5515 | 5514 | | |
5516 | 5515 | | |
5517 | | - | |
| 5516 | + | |
5518 | 5517 | | |
5519 | 5518 | | |
5520 | 5519 | | |
| |||
6622 | 6621 | | |
6623 | 6622 | | |
6624 | 6623 | | |
6625 | | - | |
| 6624 | + | |
6626 | 6625 | | |
6627 | 6626 | | |
6628 | 6627 | | |
| |||
7668 | 7667 | | |
7669 | 7668 | | |
7670 | 7669 | | |
7671 | | - | |
| 7670 | + | |
7672 | 7671 | | |
7673 | 7672 | | |
7674 | 7673 | | |
| |||
7705 | 7704 | | |
7706 | 7705 | | |
7707 | 7706 | | |
7708 | | - | |
7709 | | - | |
7710 | | - | |
7711 | | - | |
7712 | | - | |
7713 | | - | |
7714 | | - | |
7715 | | - | |
7716 | | - | |
7717 | | - | |
7718 | | - | |
7719 | | - | |
7720 | | - | |
7721 | 7707 | | |
7722 | 7708 | | |
7723 | 7709 | | |
| |||
7796 | 7782 | | |
7797 | 7783 | | |
7798 | 7784 | | |
7799 | | - | |
7800 | | - | |
7801 | | - | |
7802 | | - | |
7803 | | - | |
7804 | 7785 | | |
7805 | 7786 | | |
7806 | 7787 | | |
| |||
7858 | 7839 | | |
7859 | 7840 | | |
7860 | 7841 | | |
7861 | | - | |
7862 | | - | |
7863 | | - | |
7864 | | - | |
| 7842 | + | |
| 7843 | + | |
| 7844 | + | |
| 7845 | + | |
7865 | 7846 | | |
7866 | | - | |
7867 | | - | |
7868 | | - | |
7869 | | - | |
7870 | | - | |
7871 | | - | |
| 7847 | + | |
| 7848 | + | |
7872 | 7849 | | |
7873 | 7850 | | |
7874 | 7851 | | |
| |||
8005 | 7982 | | |
8006 | 7983 | | |
8007 | 7984 | | |
8008 | | - | |
8009 | | - | |
8010 | | - | |
8011 | | - | |
8012 | | - | |
8013 | | - | |
| 7985 | + | |
| 7986 | + | |
| 7987 | + | |
| 7988 | + | |
8014 | 7989 | | |
8015 | 7990 | | |
8016 | 7991 | | |
| |||
9575 | 9550 | | |
9576 | 9551 | | |
9577 | 9552 | | |
9578 | | - | |
9579 | | - | |
9580 | | - | |
9581 | | - | |
9582 | | - | |
9583 | 9553 | | |
9584 | 9554 | | |
9585 | 9555 | | |
| |||
0 commit comments