Skip to content

Conversation

@nperez0111
Copy link
Contributor

This PR preserves the Y.js UndoManager's undo stack across fork & merge operations. It is safe to copy the values because we can be certain that the new undo manager has an empty stack, and points to the exact same YXMLFragment as before the fork.

This additionally:

  • performs a diff merge (instead of trying to merge the entire Ydoc state) which is more performant for large documents.
  • Attaches a transaction origin, of the editor instance to better track where a change originated from

@vercel
Copy link

vercel bot commented Jun 12, 2025

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

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Jun 12, 2025 0:19am
blocknote-website ✅ Ready (Inspect) Visit Preview Jun 12, 2025 0:19am

@nperez0111 nperez0111 requested a review from YousefED June 12, 2025 12:06
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jun 12, 2025

Open in StackBlitz

@blocknote/ariakit

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/ariakit@1752

@blocknote/code-block

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/code-block@1752

@blocknote/core

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/core@1752

@blocknote/mantine

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/mantine@1752

@blocknote/react

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/react@1752

@blocknote/server-util

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/server-util@1752

@blocknote/shadcn

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/shadcn@1752

@blocknote/xl-ai

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-ai@1752

@blocknote/xl-docx-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-docx-exporter@1752

@blocknote/xl-multi-column

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-multi-column@1752

@blocknote/xl-odt-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-odt-exporter@1752

@blocknote/xl-pdf-exporter

npm i https://pkg.pr.new/TypeCellOS/BlockNote/@blocknote/xl-pdf-exporter@1752

commit: 127b22a

@nperez0111 nperez0111 merged commit 95a72b7 into main Jun 13, 2025
8 checks passed
@nperez0111 nperez0111 deleted the undo-redo-collab branch June 13, 2025 13:45
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.

3 participants