Closed seflless closed 9 months ago
I am really excited about this integration.
I have started looking into it on next repo.
Any suggestion or thoughts on this?
Seems Codesandbox is going to have a HUGE incentive to do a good CDN implementation and have it never go down. They are really promoting people Sandpack.
Document would be my vote! But I don't know much about the asset table semantics. I'm pretty excited for this for the VS Code extension. This allows. you to check in Sandpack code and have it spread around a zoomable interface, that's my kind of jam.
I'd vote yes on multiplayer. I believe at least with Liveblocks doesn't support multi-person simultaneous editing. So multiplayer would allow one person to edit at once. This is no different than Stickies or Text right now, but for code it's a little less ideal as code text is way larger and multiplayer coding tends to have multiple people with their cursors in the same code editor. At least supporting maintaining cursor position and scroll would be good, working around the limitations.
@steveruizok I'm correct-ish here?
@Proful Loving this! Multiplayer presence on which tab people are in and where their cursor/selection is would be a nice touch too.
We could use Y as a parallel engine for multiplayer text, or else use the presence api available from liveblocks. I don't know much about what data we need to be trading to support multiplayer.
A second question would be when do we make changes to the data model? At the moment we make those changes on every keystroke, which is safest for preventing data loss, but we could instead be updating the model only when the user stops editing, or on an interval. (In this case we would definitely need a dialog for when the user closes the tab during an editing session).
If we keep the code in the document, then yeah I don't think there's any need to use an asset table. (If I cloned an editor shape, I would expect to be able to edit them both independently.)
Codesandbox just announced Sandpack a module for easily making embedded code editors and preview panes. It'd be fun to see what concepts/components could be built from Sandpack. A zoomable canvas for code editors and preview panes would be awesome. https://twitter.com/codesandbox/status/1466428912087576587?s=21
Obviously, Tldraw inside Tldraw would be the first demo