DEP Replace react-dnd with dnd-kit #1298
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR replaces the
react-dnd
withdnd-kit
with like-for-like functionality, though there is a visual change.When dragging, the element collapses and the entire element is moved along with the mouse, giving a preview of where the element will be after sorting. This is the same behaviour with other sorting in the CMS (e.g. linkfield, and the
GridFieldOrderableRows
component in gridfieldextensions).I haven't implemented sorting with the keyboard like linkfield has because that was non-trivial and isn't functionality that was already available for elemental blocks. Improving accessibility to include sorting by keyboard would be a good next step in a separate card and could be accomplished in a minor release.
Issue