Open entrptaher opened 3 years ago
Ok, so I was looking into how we can do this, there seems to be a way when a new node is added to the canvas we can save it in storage.
Another idea would be to have a file-based saving, where a user can save and load their diagrams from a file, as rn we are saving as image, we can save the diagram as a JSON file and have an option of import diagram
.
Another idea would be to have a file-based saving, where a user can save and load their diagrams from a file, as rn we are saving as image, we can save the diagram as a JSON file and have an option of
import diagram
.
That might be a good idea before we introduce user accounts, database, and server thing.
Currently one of the team members had some progress on saving it in local storage https://www.loom.com/share/170a5a884ae84807b7b4c137b1fb6afe
Oh, this looks promising, I was looking around in the code of FlowCanvas
component and was thinking of saving it from there.
I guess this works.
realtime collaboration at a later stage
yes please!
Hello folks! I saw there's a PR to add local storage (#61) but it's still not merged. Since I want to start using it, I deployed one in https://wireflow.wzulfikar.com. Please feel free to use it if you want.
https://user-images.githubusercontent.com/7823011/108244728-79557000-718a-11eb-8bc8-c4f6fc504f2e.mp4
Deployment is in sync with https://github.com/wzulfikar/wireflow/tree/wireflow.wzulfikar.com
Maybe related to this, it would be really nice if a project could be exported to later be imported again. I don't know if that is like a super complicated request, but it would make sure the progress is 'safe' for a long period of time and I could continue between different browsers/laptops.
We should have a simplified way of saving the state in localstorage in case the page is reloaded. Once it's done, we can think of saving them on server and realtime collaboration at a later stage.
We can also try sqlite, indexdb, webSQL etc, though it's unsure if it's going to work on mobile devices.