cytoscape / cytoscape-explore

Network visualization webapp.
MIT License
12 stars 4 forks source link

Recent networks snapshots out of sync #149

Open maxkfranz opened 2 years ago

maxkfranz commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

I found what might be considered a bug...

When you make a change to the network there is a 3 second delay before the changes are synched to the server. So if you make a change, for example set all nodes to red, then click the "home" button in the top left corner before the 3 second delay fires, the changes do not get sent to the server, but the local storage thumbnail shows the nodes being all red, and when you click on it the network shows up without the red nodes.

Perhaps we need a mechanism to automatically trigger the server sync when the user navigates away from the page. Because the 3 second delay can't always be relied upon.

Originally posted by @mikekucera in https://github.com/cytoscape/cytoscape-explore/issues/142#issuecomment-1059367152

maxkfranz commented 2 years ago

Sounds like we may need two things:

(1) Events for sync events (up/down) so you can hook into the sync lifecycle.

(2) API for manually starting a sync up. This could be called on unload.