-
Notifications
You must be signed in to change notification settings - Fork 77
Create a new shared xml model for real time collaboration #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for starting this! |
I'm having an error with yjs coming from: jupyterlab-drawio/src/model.ts Line 167 in f66b1c5
Looks like there are two instances, one coming from JupyterLab and another from the extension.
This line returns false, being this.ydoc.getXmlFragment('root') instanceof Y.XmlFragment jupyterlab-drawio/src/model.ts Line 166 in f66b1c5
|
Cool stuff here! 3.1.0a11 just dropped on pip which ships with the singleton yjs which should help unblock things. For ipydrawio, which supports both top-level |
Hey, thanks, @bollwyvl. I'm sorry, but I do not understand what you mean. |
In |
Ooh, got it. And what's your suggestion for a more generic model? |
Right, XML isn't all the rage, but there are tons of important formats in it. If the Another idea i've had a few times is giving up, and finding a compatible pair of js python and XML-to-json round-trip convertors. As one of the models we support on the fork is stuffing things into a notebook's metadata, having it be JSON-native would be pretty nice... until it pulls shenanigans like base64 encoding xml-in-xml. |
Maybe we can make it more generic using "node": {
"attributes": { ... },
"child_1": {
"attributes": { ... },
"child_1_1": {
"attributes": { ... },
"text": "whatever"
},
...
},
"child_2": {
"attributes": { ... },
"child_2_1": [
"child_2_1",
"child_2_1",
"child_2_1",
...
],
...
},
...
} Where an element could be either |
Instead of |
This PR continues in #99 |
As discussed in jupyterlab/jupyterlab#10227, this PR is an example of creating new document models for real-time collaboration in JupyterLab.
TODO:
DocumentModel
ISharedModel
by extending fromYDocument
DrawIOWidget