[FR] control tag to mimic HTML `<select>` behavior
Is your feature request related to a problem? Please describe.
It's not uncommon for classification labels to have 100s or more options for certain tasks. In this case, the annotator UI is much more concise and readable if the options are placed in a dropdown menu. I've looked through the documentation of available control tags, and am disappointed that this setup doesn't appear to exist
Describe the solution you'd like
Add a Select control tag which users could use in their labeling setup templates as an alternative to Choices
<Select name="gender" toName="text" choice="single">
<Choice value="Man" />
<Choice value="Woman" />
<Choice value="Nonbinary" />
<Choice value="Other" />
</Select>
Ideally, the HTML rendering would also have the option to use Bootstrap-select's live search feature. This would further decrease annotator lead time by allow them to tab to the select element, type a couple characters to filter the results, and use arrow keys + enter to select the desired option
Describe alternatives you've considered
- Existing
Choicestag: this shows all options at once which makes for a very cluttered labeling UI when there are many choices - Wrapping
ChoiceswithFilter: as documented by@Grzegorz Żurekin Slack, the filter input doesn't respond to annotators typing but rather continues to display the entire list of choices. In this way, it is no better than the plainChoicesapproach. The same non-responsive behavior is also mentioned here - Wrapping with
Taxonomy: this is the closest to the desired behavior. One problem is there are always "Add" and "Add inside" buttons which allows annotators to define their own option. In many classification tasks, that would need to be disabled so it forces them to pick from the existing options. Community members have also mentioned the JSON export is a bit messy, so I'm hesistant to use this control tag. IfallowAddwas included as a parameter toTaxonomyand the JSON export could be simplified for non-nested taxonomies, I think that would be an acceptable solution
Additional context
A third question in Slack asking about this functionality
Another shortcoming of Taxonomy is that it doesn't support a perRegion parameter like Choices. That means it can only apply a global classification to an entire image or piece of text (as opposed to a bounding box or word)
@makseq How do you feel about re-naming this to focus on improvements to Taxonomy vs. creating a new Select control tag - perhaps that's easier to maintain? In either case, the desired tag needs to support
- Searchable dropdown list
- Tag parameter to enable/disable adding options
- Support for
perRegion
I agree with @addisonklinke, this would be a nice feature, especially the support for perRegion.
In addition, Taxonomy allows a user to add new labels, which seems is currently not supported by Labels or Choices. This would be useful for extreme multi-label (classification) tasks (related: #3846).