Skip to content

Commit 068b03c

Browse files
committed
test: get tests passing again
1 parent 0f25e51 commit 068b03c

6 files changed

Lines changed: 18 additions & 1213 deletions

File tree

examples/07-collaboration/11-yhub/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ In this example, we use YHub to let multiple users collaborate on a single Block
77
**Relevant Docs:**
88

99
- [Editor Setup](/docs/getting-started/editor-setup)
10-
- [YHub](/docs/features/collaboration#yhub)
10+
- [Real-time Collaboration](/docs/features/collaboration)

packages/core/src/y/extensions/ForkYDoc.test.ts

Lines changed: 0 additions & 179 deletions
This file was deleted.

packages/core/src/y/extensions/Versioning/index.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ySyncPluginKey } from "@y/prosemirror";
1+
import { configureYProsemirror, ySyncPluginKey } from "@y/prosemirror";
22
import * as Y from "@y/y";
33

44
import {
@@ -186,13 +186,17 @@ export const VersioningExtension = createExtension(
186186
const snapshotContent = await endpoints.fetchSnapshotContent(id);
187187
const doc = new Y.Doc();
188188
Y.applyUpdateV2(doc, snapshotContent);
189-
ySyncPluginKey
190-
.getState(editor.prosemirrorState)
191-
?.renderSnapshot(
192-
{ fragment: findTypeInOtherYdoc(fragment, doc) },
193-
prevSnapshot,
194-
[],
195-
);
189+
editor.exec(
190+
configureYProsemirror({
191+
ytype: findTypeInOtherYdoc(fragment, doc),
192+
attributionManager: prevSnapshot
193+
? Y.createAttributionManagerFromDiff(
194+
prevSnapshot.fragment.doc!,
195+
doc,
196+
)
197+
: undefined,
198+
}),
199+
);
196200
};
197201

198202
const exitPreview = () => {

0 commit comments

Comments
 (0)