HumanSignal / HumanSignal/label-studio

[Feature Request] Nested maxUsages and disabled Attributes for Taxonomy and Choice Tags

Open
#6,026 2 comments 0 reactions 0 assignees View on GitHub
community:feature-request community:reviewed
Dominant language
TypeScript
Stars
28.3k
Forks
3.7k
Avg merge
14h
Merged PRs (30d)
15

Description

### Is your feature request related to a problem? Please describe.
I'm always frustrated when using the Taxonomy tag in Label Studio and needing to limit the number of selections one level down. Currently, the maxUsages attribute restricts the total number of selections across all levels, which doesn't provide the granularity I need for specific use cases. Additionally, there's no straightforward way to disable certain choices within the taxonomy structure.

### Describe the solution you'd like
I would like an attribute similar to maxUsages that limits the number of selections one level down in the Taxonomy tag. This attribute, which I'll refer to as maxLevelUsages, should allow setting specific limits for each level of the taxonomy. Furthermore, I would like the ability to disable certain choices using a disabled attribute within the Choice tag.

### Describe alternatives you've considered
I have considered manually enforcing selection limits through external validation scripts, but this approach is cumbersome and not integrated within Label Studio's interface. Another alternative is nesting multiple Taxonomy tags with separate maxUsages attributes, but this complicates the labeling schema and user experience.

### Additional context
## Additional Attributes Requested
- maxLevelUsages: An attribute to limit the number of selections at each level of the taxonomy.
- disabled: An attribute to disable certain choices, preventing them from being selected while still allowing selection of other choices within the same category.

## Example with Requested Features
This is a fictional example to illustrate how the feature might work conceptually

```html





















```

## Explanation
- At the top level Living Things, only one item can be selected.
- Under Animal, up to 2 items can be selected.
- Selecting Animal allows choosing up to 2 items under Mammal (e.g., Dog and Cat), or 1 item under Bird (e.g., Eagle).
- Under Plant, up to 2 items can be selected.
- Selecting Plant allows selecting up to 1 item under Tree (e.g., Oak), and 1 item under Flower (e.g., Rose), but not 2 items under Tree.
- disabled: Prevents selection of certain choices (Flower in this example), while still allowing selection of other choices (Rose and Tulip).

Please note that this example is purely fictional and simplified for illustrative purposes. Actual use cases and configurations may vary based on specific labeling tasks and requirements.

These enhancements, including the addition of the disabled attribute, would significantly enhance the flexibility of Label Studio for complex labeling tasks, improving user experience by allowing finer control over choice selections and reducing the need for manual enforcement of selection limits.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.