Skip to content

Record history entry when moving a component to a different position#1630

Open
FedericoBonel wants to merge 1 commit intomainfrom
fede/puck-475-moving-components-dont-record-a-history-entry
Open

Record history entry when moving a component to a different position#1630
FedericoBonel wants to merge 1 commit intomainfrom
fede/puck-475-moving-components-dont-record-a-history-entry

Conversation

@FedericoBonel
Copy link
Copy Markdown
Collaborator

@FedericoBonel FedericoBonel commented Apr 8, 2026

Closes #1629

Description

This PR fixes an issue where moving components to different positions on the page was not recording a history entry.

NOTE: This PR doesn't fix issue #1617, which means dragging a component with Rich Text around the page will still create history entries.

Changes made

  • The drag-and-drop context now checks whether the location where a component is dropped is the same as the one it was dragged from before dispatching a new item selector. This determines whether a history entry should be recorded.

How to test

Verify new history entries on movements to new locations

  1. Navigate to the demo.
  2. Drag and drop a component to a different location.
  3. Verify that the history includes an entry.

Verify no history entry on movements to the same location

  1. Navigate to the demo.
  2. Drag a component and drop it in the same location it was dragged from.
  3. Verify that the history is empty.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
puck-demo Ready Ready Preview, Comment Apr 8, 2026 4:15am
puck-docs Ready Ready Preview, Comment Apr 8, 2026 4:15am

Request Review

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.

Moving components doesn't record a history entry

1 participant