janelia-flyem / NeuTu

Software package for neuron reconstruction and visualization
Other
38 stars 13 forks source link

Users can overwrite the bookmarks of other users #360

Closed pgunn closed 3 years ago

pgunn commented 4 years ago

One of the issues with the way NeuTu represents user bookmarks is that if another user generates a user bookmark at the exact same point that another user had a bookmark, the earlier bookmark is overwritten and lost. This is not very likely unless one is either using the API or a fastidious user is told to make a bookmark at a particular point and they nail it, but it's still surprising behaviour.

If there's a way to change the backend representation so multiple bookmark annotations can be at the same point without interfering with each other, that'd be great. @DocSavage FYI

tingzhao commented 4 years ago

Even if the backend can support multiple bookmark annotations at the same point, it will break some functions in NeuTu and our own branch of Neuroglancer because both assume that a point annotation is unique. For NeuTu, I can add a way to warn about conflict, but anyone using the API directly is supposed to handle the problem by him/herself.

pgunn commented 4 years ago

My other option, if I want to create user bookmarks to make it easy for multiple users to easily find the same point, is to make them all differ by one X coordinate. I wrote some tooling that periodically/automatically syncs these between users if they have certain contents in their comment.

I acknowledge that I'm probably not using user bookmarks the way you are, but if there's another easy way to mark points that lands in the backend, has adjustable metadata, doesn't have some other meaning, is prominent in the UI, and is easily shared between users, I'd love to hear about it.

tingzhao commented 4 years ago

Unfortunately, currently there is no easy solution for this. One thing I can do is to allow the user set the name of the bookmark data instance so that each user can have their own place to store the bookmarks.

pgunn commented 4 years ago

That would work well for us.

tingzhao commented 3 years ago

The latest version (0.4.1) has a conflict check for overlapping bookmarks. The user will get a warning when trying to add a bookmark at a location of an existing bookmark owned by another user. @pgunn Will this somehow solve your problem? We may not have time to add support for multiple bookmark data instances.

pgunn commented 3 years ago

Sorry for not getting back to you - this fix does the trick. Thanks.