edgeryders / discourse-annotator

A text annotation and analysis application for Discourse. Made with Annotator.js and Ruby on Rails.
https://edgeryders.eu/t/6811
Other
4 stars 0 forks source link

Allow adding multiple codes when editing an annotation #238

Open tanius opened 1 year ago

tanius commented 1 year ago

Issue demonstration:

  1. Go to any Discourse topic and click on "Code with Open Ethnographer" to go to the coding interface.

  2. Select some text, open the coding popover window, and add multiple codes where it says "Add some codes …". Save and observe that this has worked as intended: the selection now has been annotated multiple times, and each such annotation has exactly one code.

  3. Hover over the text that you previously selected, and click one of the pen buttons in the popover window that appears, to edit one of the annotations you made.

  4. Again, you will see an annotation window with a text "Add some codes here …". Now the issue is that you cannot add multiple codes here: they will appear in red and disappear within 2 seconds, and saving before will not create annotations with these codes. You can only delete the code of the annotation you are editing, and then replace it with one other code, contrary to what the little window says ("Add some codes here …").

The ideal fix would be to allow adding multiple codes in step 4, and on save, to create several annotations as in step 2. A similar fix had to be applied in the past to make step 2 possible at all, so that can maybe serve as a template for this fix.

tanius commented 1 year ago

Blocked until we know how to proceed with #223. With that done, this issue will disappear as well.