You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should swap sync to be controlled by the UI. In other words, as the user navigates to an issue list we sync down all those issues + some set of additional pages.
Implementation Thoughts
pull doesn't take input to a given request but we can use replicache itself to sync the query as mentioned in the docs:
The solution is to sync the current query with Replicache (🤯). That way it will be automatically synced to all tabs.
So we'll do that. The query args currently selected by the user will be synced to the backend through replicache. On pull we'll check and use that query.
Multiple tabs
IMO, we should be able to have many queries syncing at once if the user has many tabs open. One or more queries for each tab.
The query synced to replicache should be tied to a given client id. On pull we'll sync the data for the query attached to that client id.
My assumption here is each tab has a unique client id (docs) and that we have access to this in both pull and push endpoints.
feedback: it seems to me that it'd be easier if rep.pull could just accept parameters . This way we can tell our backend what query we're pulling for each time rather than having to do a song and dance with syncing the query through replicache.
See cvr strategy for how many queries syncing at once interacts with the CVR.
The text was updated successfully, but these errors were encountered:
Right now sync follows the same pattern as the original Repliear. We sync the entire issue, description and comment set down (of course chunked) - pictured below.
sync-all.mov
We should swap sync to be controlled by the UI. In other words, as the user navigates to an issue list we sync down all those issues + some set of additional pages.
Implementation Thoughts
pull
doesn't take input to a given request but we can use replicache itself to sync the query as mentioned in the docs:So we'll do that. The query args currently selected by the user will be synced to the backend through replicache. On pull we'll check and use that query.
Multiple tabs
IMO, we should be able to have many queries syncing at once if the user has many tabs open. One or more queries for each tab.
The query synced to replicache should be tied to a given client id. On pull we'll sync the data for the query attached to that client id.
My assumption here is each tab has a unique client id (docs) and that we have access to this in both pull and push endpoints.
feedback: it seems to me that it'd be easier if
rep.pull
could just accept parameters . This way we can tell our backend what query we're pulling for each time rather than having to do a song and dance with syncing the query through replicache.See cvr strategy for how many queries syncing at once interacts with the CVR.
The text was updated successfully, but these errors were encountered: