Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new drag-and-drop engine #598

Draft
wants to merge 48 commits into
base: main
Choose a base branch
from
Draft

Implement new drag-and-drop engine #598

wants to merge 48 commits into from

Conversation

chrisvxd
Copy link
Member

@chrisvxd chrisvxd commented Sep 4, 2024

Implement new drag-and-drop engine using the experimental dnd-kit release.

This is a work-in-progress. Commits and code will be tidied up before finalising. It relies on upstream changes to dnd-kit (which have not yet been pushed anywhere).

Features

Still to do

  • Rebase
  • Push upstream dnd-kit changes
  • Add iframe support
  • Various other fixes (tracked elsewhere)

Copy link

vercel bot commented Sep 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
puck-demo ❌ Failed (Inspect) Sep 27, 2024 11:00am
puck-docs ❌ Failed (Inspect) Sep 27, 2024 11:00am

setDragAxis("dynamic");
} else {
setDragAxis("y");
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work if the item is dragged between dropzones with drag axes?

chrisvxd added a commit that referenced this pull request Sep 7, 2024
This will result in duplicate history entries if the item has a resolveData method. This is difficult to prevent without a deferredDispatch method, similar to that being explored in #598.
chrisvxd added a commit that referenced this pull request Sep 7, 2024
This will result in duplicate history entries if the item has a resolveData method. This is difficult to prevent without a deferredDispatch method, similar to that being explored in #598.
chrisvxd added a commit that referenced this pull request Sep 7, 2024
This will result in duplicate history entries if the item has a resolveData method. This is difficult to prevent without a deferredDispatch method, similar to that being explored in #598.
chrisvxd added a commit that referenced this pull request Sep 9, 2024
This will result in duplicate history entries if the item has a resolveData method. This is difficult to prevent without a deferredDispatch method, similar to that being explored in #598.
chrisvxd added a commit that referenced this pull request Sep 9, 2024
This will result in duplicate history entries if the item has a resolveData method. This is difficult to prevent without a deferredDispatch method, similar to that being explored in #598.
Works on mobile and doesn't conflict with dnd-kit setPointerCapture bugfix, which is necessary to ensure reparenting on mobile devices don't break pointer tracking.
@princebansal
Copy link

@chrisvxd This sounds very exciting. Dnd kit will really be a good upgrade. May I know, if there are any estimates of when this will be ready to use. Both stable and beta version of it.

Also catches an edge-case where ref is the same
The drag would start before draggedItem existed, making it possible to drag an item into a disallowed DropZone.
@chrisvxd
Copy link
Member Author

Thanks @princebansal - we don't have a timeline yet. It's slow progress as it's a non-trivial implementation.

I would like to get it out by end of October in v0.17, but that's not based on anything!

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.

Support dragging between DropZone areas
2 participants