Kompakkt / Kompakkt/Viewer

Handling un-saved annotations

Open
#59 5 comments 0 reactions 1 assignee Claimed by @HeyItsBATMAN View on GitHub
Dominant language
TypeScript
Stars
17
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Since I removed the old local/offline functionality here https://github.com/Kompakkt/Viewer/pull/58, we can think about new ways to implement a "work offline, push changes later" workflow.

The old functionality was attempting to do a synchronization with 2 DBs, local and server, on any annotation update, meaning lots of requests, and lots of points of failures.

I can imagine a workflow with a lot less points of failures:
- the user has the viewer opened with a model loaded, no matter if stable internet, spotty internet, or offline (funkloch)
- the user begins adding/removing/editing annotations. as soon as something changed, they get an indicator, showing that they have unsaved changes
- these changes are kept locally, and not immediately pushed to the server
- when the user is done with changes, they can save/push these changes to the server using a e.g. "Synchronize" button, turning their unsaved changes into saved changes
- if, during this session, the user does not save/push their changes to the server, they are kept in browser storage, so if they close and re-open, their local edits will not be gone

This only has 1-2 points of failures:
- if they try to save the changes and that fails due to no connection or server error
- if they edit, it is locally saved, and then weeks later, when the object has been edited somewhere else, and the local and server annotations mismatch (this was also in the previous implementation)

This would also incorporate better UI feedback for the user about whether their changes have been saved.

This would be closer to a version control (git-like) strategy.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.