Skip to content
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

feat: reconcile when saving to firebase #4991

Merged
merged 8 commits into from
Apr 17, 2022
Merged

Conversation

dwelle
Copy link
Member

@dwelle dwelle commented Mar 29, 2022

  • rewritten how saving to firebase works:
    • we no longer overwrite remote (firestore) data with ours, but instead reconcile both states. This will ensure that if there's an issue where local version doesn't contain latest data despite sceneVersion being larger, no data is lost.
    • we no longer bail when firestore sceneVersion is larger than ours. Instead we always reconcile as per above.
    • we update local state with the reconciled scene we get when saving to firebase
  • decoupled broadcasting from saving to firebase for better clarity

@vercel
Copy link

vercel bot commented Mar 29, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

excalidraw – ./

🔍 Inspect: https://vercel.com/excalidraw/excalidraw/CKFXdTo4er2pyhE5nxuxvHvQMMx6
✅ Preview: https://excalidraw-git-collabreconciliation-excalidraw.vercel.app

excalidraw-package-example – ./src/packages/excalidraw

🔍 Inspect: https://vercel.com/excalidraw/excalidraw-package-example/9Ep31P4jY2gLQY4xANadngRDNDjd
✅ Preview: https://excalidraw-package-example-git-collabreconciliation-excalidraw.vercel.app

@dwelle dwelle requested a review from ad1992 March 29, 2022 21:24
# Conflicts:
#	src/excalidraw-app/collab/Portal.tsx
#	src/excalidraw-app/index.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants