I’m wondering if I can build like a branch structure with Yjs docs.
My use case, imagine I have a parent document with a lot of work made on it, then we want to make a copy of this document to derivate some content.
We should have the possibility to integrate parent changes in our clone, and reversely we want to be able to move back some child content to the parent.
And the child document could have different user and access policies, so we want to kindly clean the data.
For that, I have multiple questions:
- Can I force the garbage collection after cloning my document? Since I have versioned doc the GC is disabled on the documents but for the brand-new clone it would be really great to compact the document.
- Can I reset the clientID & PersistantUserData on all the current data? Basically, we want to see that the data is just pre-initialized data in the cloned doc. If we want to know more (and have the perm) we could just look the history of the parent.
- Then when we have clone can we easily take the update from one doc and put it in the other one?
- Last question, a bit more tricky, can we cherry-pick an update/transaction and apply to the parent? I mean, I can do a lot of updates on it, but I just want to take some of them back to the parent.
Thanks in advance for your help