Add drag-and-drop reordering for schema form arrays#20223
Merged
desertaxle merged 2 commits intomainfrom Jan 14, 2026
Merged
Conversation
Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Add snapshot tests for arrays with drag handles visible - Add snapshot tests for prefixItems without drag handles - Add behavioral tests for move up/down menu options - Add test verifying prefix items cannot be moved Co-Authored-By: alex.s@prefect.io <ajstreed1@gmail.com>
desertaxle
approved these changes
Jan 14, 2026
This was referenced Jan 21, 2026
This was referenced Jan 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 up/down button approach with drag-and-drop reordering for array items in the schema form using the @dnd-kit library. Array items now display a visible drag handle (GripVertical icon) that allows users to reorder items by dragging. The existing move up/down menu options are preserved as a fallback for accessibility.
Key implementation details:
Related to #15512
Test Coverage
Added comprehensive test coverage including:
Note: The tests cover the menu-based reordering and DOM structure. Manual verification is still recommended for the actual drag-and-drop interaction.
Visual Verification
Verified in Storybook that drag handles appear correctly for regular array items and are absent for prefix items:
Regular array items with drag handles:

Prefix items without drag handles:

Checklist
<link to issue>"mint.json.Human Review Checklist
Requested by: @desertaxle
Link to Devin run: https://app.devin.ai/sessions/313e0a45d63a4af09c979a1f22eff8fd