Skip to content

feat: add slate-yjs collaboration package#16

Open
felixfeng33 wants to merge 2 commits into
udecode:v2from
felixfeng33:yjs
Open

feat: add slate-yjs collaboration package#16
felixfeng33 wants to merge 2 commits into
udecode:v2from
felixfeng33:yjs

Conversation

@felixfeng33
Copy link
Copy Markdown

Summary

Adds a first-party slate-yjs collaboration package on top of the Slate v2 extension/runtime stack. The package binds Slate editors to a shared Yjs document root, exports local commits into Yjs, imports remote Yjs events through editor updates, and keeps cursor/selection traffic in awareness.

This PR is opened from the current yjs checkout as-is, so it includes the existing v2 branch stack plus the new slate-yjs package work. The slate-yjs review entry points are packages/slate-yjs, site/examples/ts/yjs-collaboration.tsx, and playwright/integration/examples/yjs-collaboration.test.ts.

Fixes ianstormtaylor#3715

What changed

  • Adds packages/slate-yjs with core, react, and internal exports.
  • Adds codec/controller/awareness tests plus React hook coverage.
  • Adds a full two-editor Yjs collaboration example with deterministic controls.
  • Wires source-first TypeScript paths, workspace dependency, docs, resources, and changeset metadata.
  • Adds Chromium coverage for editor convergence, undo/redo, pause/resume, and cursor projection.

Verification

  • bun check
  • bunx playwright test playwright/integration/examples/yjs-collaboration.test.ts --project=chromium
  • dev-browser --connect http://127.0.0.1:9222 against /examples/yjs-collaboration

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

🦋 Changeset detected

Latest commit: b0504f6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
slate-dom Major
slate-react Major
slate Major
slate-yjs Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@felixfeng33 felixfeng33 changed the base branch from main to v2 May 14, 2026 15:22
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.

Add Collaboration Example and Documentation

1 participant