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

Feature request: add configuration option to make existing annotations available in local storage #81

Open
D-Groenewegen opened this issue Oct 13, 2023 · 1 comment

Comments

@D-Groenewegen
Copy link

I was interested to see how far I could go using local storage as well as saving annotations server-side, and especially how well those two approaches might play together. What I did was to use local storage for the duration of the browser cache and pull the annotations from local storage if the user creating the annotations decides to save them on the server (in this case, on a wiki). Of course, what happens when your local storage is still intact and you open a manifest that has the previously created annotations merged in or referenced, you'll see duplicates. Interestingly, whichever duplicate you choose, it does appear to be editable.

What I did was to make sure that the relevant items in local storage are cleared and the page is refreshed when the user hits "Save". When a user opens the new manifest (with the annotations referenced), the annotations appear without duplication. So far so good, but there is a problem: they are not editable! In other words, annotations that are referenced, or embedded, do not automatically become available in local storage.

What I am requesting is a config option (but not the new default) to load all existing annotations as local storage items so that they can be edited or removed in a subsequent session, whether by the same user or someone else.

@D-Groenewegen
Copy link
Author

P.S. While this would still be a useful feature, I have now tackled it differently. Keeping the manifest and its annotations separate allows me to adopt a flexible approach. If the aim is only to present annotations in Mirador, I use an API service which merges references to annotations into the manifest. In other words, a derivative manifest is created over the API and used in Mirador. If on the other hand, the aim is for a user to work on (create, edit) annotations, the original, 'clean' manifest is served instead and existing annotations previously saved are loaded into localStorage. Of course, that comes with the responsibility of having to manage localStorage, especially in a collaborative environment, but the system seems feasible to me and opens up some interesting possibilities.

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

No branches or pull requests

1 participant