Skip to content

Conversation

@ctsstc
Copy link
Contributor

@ctsstc ctsstc commented Jan 20, 2026

Overview

This adds drop and drop functionality to help order items as well as move them into or out of nested items like objects or lists.

Preview

drag.and.drop.json.schema.editor.mov

Hurdles

  • There were two write operations happening at the same time which made it so that the inner child node would duplicate.
    • This required some consolidation to get them into a single operation.

Notes

  • This clears up lint issues, runs the formatter, and runs the fix script.
    • I'm planning to get into a separate PR and get those merged into main so it helps clear up some of the noise here.
    • I'll likely have to handle some conflicts afterwards.
    • Opened Fix Check Errors #29 hopefully that can get merged soon and I can rebase this branch to clean it up some.
  • 🔥 This is still a WIP. I need to do a walk-through giving it a once-over (probably tomorrow [Tuesday]), but it seems to be functioning fine now.
    • Any feedback would be great though.
  • I'm glad it's working how I wanted it to finally, but I do wonder if there might have been a library that could have made this much more simple. Also given how heavy this change is, it feels like maybe some of it should be extracted out potentially?
  • I think this change may open up copying (it was already happening as a bug for a moment 😆 )

Resolutions

Still need to patch duplication that occurs when moving an item from a child to another location outside of its current container.
There were two write operations happening at the same time which made it so that the inner child node would duplicate. This had to do some consolidation to get them into a single operation.
This really ought to have happened before I started, but here we are. Maybe I can run it off of main on its own branch, but it'll surely be conflict city. Hopefully not too bad.
Not sure why this isn't picked up by the check. Ah, the check script must not cover this or do type checking. But there is a typecheck script.
@ctsstc
Copy link
Contributor Author

ctsstc commented Jan 22, 2026

Some research has me thinking maybe I should have went the direction of utilizing a library like:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Allow re-ordering of fields

1 participant