Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Yjs subdocuments guids do not match after applying an update from Ycs document #3

Open
Open
Yjs subdocuments guids do not match after applying an update from Ycs document#3
Assignees
Labels
bugSomething isn't working

Description

Describe the bug
Applying update from Ycs documents with subdocuments on Yjs documents generate new subdocuments guids.

To Reproduce
Steps to reproduce the behavior:

  1. With Ycs create a new root document.
  2. With Ycs create some subdocuments and add them to the root document.
  3. Apply update from Ycs root document to Yjs document.

For example:

// C# code

var document = new YDoc();
var subDoc1 = new YDoc(new YDocOptions(){Guid = "subdoc1"});
var subDoc2 = new YDoc(new YDocOptions(){Guid = "subdoc2"});
document.GetMap("subdocs").Set("subdoc1", subDoc1);
document.GetMap("subdocs").Set("subdoc2", subDoc2);
byte[] update = document.EncodeStateAsUpdateV2();

// send this update to Node.js (e. g. with Convert.FromBase64String())
// JavaScript code

const document = new Y.Doc()
Y.applyUpdateV2(document, updateFromYcs)

Expected behavior
Ycs subdocuments guids the same as Yjs subdocuments guids.

Screenshots
Yjs document state after applying:

Environment Information

  • Node.js (v14.16.0)
  • yjs (v13.4.14)

Additional context
Applying an update from a Yjs document with subdocuments to a Ycs document keeps guids as expected.
Applying an update from a Ycs document with subdocuments to the new Ycs document keeps guids as expected too.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions