Closed arvinxx closed 1 year ago
how soon do you need this feature?
I don't need this feature recently, but later this year. So you can take your time to work on this new feature~ And I am really excited with this.
Beside, when I integrate this in to my application,I found some edge case that throw undefined or null error. I will dig it out and open a new issue soon.
FYI: I also find a zustand middleware on https://liveblocks.io/ ,which is RealTimeCollab as a service company. their zustand middleware seems to have more powerful features. Maybe you can infer to them in some way ?
their zustand middleware seems to have more powerful features.
After reading their documentation, the answer is yes and no. Seems that most of the powerful features you see are actually just LiveBlocks features. Some can be replicated in Yjs, for instance, undo-redo and presence, but things like join-leave commands aren't possible without some hacks.
I do like the middleware API. I had originally shied away from configuration objects to "idiot-proof" the middleware, but it could be useful. One thing that irks me a bit about the LiveBlocks middleware is that it injects an API object into the store. I had avoided that because I didn't like the idea of putting middleware-specific data into the store. In hindsight, it's not all that bad, but at the same time, Yjs doesn't have nearly as nice an API as LiveBlocks, so I'm not even sure I could justify having such an object.
Closing this so that I can keep posting updates in #40.
Seems that most of the powerful features you see are actually just LiveBlocks features.
Actually I like their core concept like room, presence ,and it combine with zustand middleware very well. for example, I think get awareness information from a object injected by middleware is easier to use.
I had avoided that because I didn't like the idea of putting middleware-specific data into the store. In hindsight, it's not all that bad
I think so, beside liveblock middleware, there is some other middleware just work with the same idea , for example ,zundo. So maybe you can give it a try to add more features like redo、undo within the injected object.
YText is now available in version 1.3.0-rc.1
or install zustand-middleware-yjs@latest
. Let me know if you run into any issues.
Oh boy. It's been a few months, huh?
So, here are the updates:
The good news is that I left off in an easy place to pick up: the refactored array diff algorithm is failing some tests. Specifically tests about detecting insertions at the beginning of arrays.
Question for you: how soon do you need this feature?