simonv3 / annotate

Image Annotation App for Sandstorm
MIT License
14 stars 3 forks source link

Give images the same order number regardleses of viewer and regardless of if it has been deleted #17

Closed simonv3 closed 8 years ago

simonv3 commented 8 years ago

Asheesh noted in-app that the annotations renumber themselves when you delete one. FWIW I think it would be better if an annotation's number never changed, since I might, say, send someone an email like "Hey take a look at #18, blah blah blah". (It might also make sense for these number to be unique across all the annotations in the grain, not just per-image.)

simonv3 commented 8 years ago

I talked with Asheesh about the re-numbering. I concluded the same thing you did - it'd be great to reference an annotation and to be sure it remained the same. However, what with the ability to delete annotations, this means keeping track of what the most recent annotation was on an image (to avoid the "create two 7s" problem that this fixed). I'm going to have to think about how to best implement that. I'm not sure whether storing on an annotation will be enough - there might be a race condition if someone quickly adds or deletes two images while waiting for the DB to update, and then you'd still have the "two 7s" problem. Or it might require re-structuring the data in the app (annotations aren't embedded within images at the moment, for no real good reason).