Drag and Drop posts within editor #203
Labels
enhancement
New feature or request
gutenberg
Requires understanding Gutenberg
typescript
Requires understanding TypeScript
Description
Either using the existing Gutenberg drag and drop controls, or by adding a new drag handle to the Post block, we should add functionality to move a post to a new spot in the editor.
Each Post block should have a drag handle or use the Gutenberg one if possible.
Each Post block should be a drop zone.
The drag action should include a payload with the Post ID, any Post customizations, and the block ID of the Post being dragged.
If a drop action is received, the Post info in the payload should be set on the receiving block, and the pinned post should be removed from the originating block via the block ID.
Drag and drop should not affect the layout of the block or any block attributes such as class names, etc. The post should be moved to the new location, and that is all.
If a post was previously pinned in the receiving block, it should just be wiped out (or maybe swapped). We don't want to shift posts.
For first implementation, let's just worry about dragging and dropping within the same Query block, but if it happens to work across Query blocks, that's great.
Use Case
Moving a pinned post from one slot to another should be easier.
The text was updated successfully, but these errors were encountered: