performant-software / Annotation-Studio

An online annotation platform for teaching and learning in the humanities.
http://www.annotationstudio.org
GNU General Public License v2.0
6 stars 1 forks source link

Change folder delimiter to semicolons and disallow semicolons from names #439

Open camdendotlol opened 2 years ago

camdendotlol commented 2 years ago

The document folder feature added in #433 uses the acts-as-taggable-on gem, specifically this version: https://www.rubydoc.info/gems/acts-as-taggable-on/4.0.0

acts-as-taggable-on stores the list folder names as a single string with a comma delimiting each name. This means that, currently, if you try to add a folder named Blake, William, it will end up applying two folders, Blake and William to the selected documents.

I discussed this issue with Dino and we agreed on the following solution:

  1. Change the delimiter to ;, which according to the docs is as simple as calling a delimiter method in the acts-as-taggable-on inititializer.
  2. Disallow the semicolon from folder names and display an error if the user tries to add one.
jamiefolsom commented 2 years ago

We can't change the delimiter application-wide; first step here is to figure out if we can change it for just the folder, and not other tag contexts. @camdendotlol @sarastanton