-
Notifications
You must be signed in to change notification settings - Fork 16
rework yjs-store-db syncing #205
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
The three data stores and their roles:
|
The files: the main logic is implemented in three files:
|
How the canvas nodes are rendered?The ReactFlow canvas data is stored in The
Additional logic is implemented in
|
Handling the changes made by remote peersAll changes made by remote peers are observed with
|
Handling the changes made by the local userOverall, the local user's changes will
The specific logic for each Canvas operation:
|
This PR is a major rework of the syncing logic among Yjs, Zustand store, and DB. The syncing logic will be detailed in the comment below.
Additional changes:
addPod
graphQL API. Use theupdatePod
API instead, which will create a pod if it does not exist.addPod
Zustand store action will not accept ApolloClient anymore. Instead, you can set thepod.dirty=true
flag to trigger the periodical updates to DB.@reactflow/node-resizer
for scope resize.