biigle / core

:large_blue_circle: Application core of BIIGLE
https://biigle.de
GNU General Public License v3.0
12 stars 16 forks source link

Improve typeahead component #127

Closed mzur closed 6 years ago

mzur commented 6 years ago

The typeahead component is used to select volumes, label trees, users, labels etc by their name. But sometimes the names of these items are not unique. Improve the typeahead component so it can show additional information (like the label ID or user email) in .text-muted along with the actual name. Update the existing typeaheads to include this additional information.

mzur commented 6 years ago

This is not an easy one to resolve. The typeahead is used in the following places:

☑️ Select users by name

The username is not unique in BIIGLE. The email address is. But I'd rather not make the email address public for all BIIGLE users. Maybe we display either the part before the @ or the part after the @ along with the name? Or we introduce new unique usernames in addition to the email address and then select users only by their username?

🔲 Select volumes by name

We could display the name of a project where the volume is attached. But which project do we choose if the volume is already attached to multiple projects? This will become obsolete when we implemented #53, where we can simply display the volume description along with the name (similar to projects and label trees).

☑️ Select labels by name

A label name can be ambiguous when it occurs multiple times in a single label tree or in a collection of label trees in a label trees component. The latter would be solved if we display the label name like <tree name>/<label name> but this would not help if the label name occurs multiple times in the same tree. We could also try to display the label color along with the name in the typeahead.

Update: I chose to resolve this by displaying the label color in the dropdown.

☑️ Select projects by name

We could display the project description along with the project name.

☑️ Select label trees by name

We could display the label tree description along with the label tree name.

mzur commented 6 years ago

We can use the new user affiliation to uniquely identify users in the typeahead.

mzur commented 6 years ago

The annotation filter of the annotation tool cannot display the user affiliation because it grabs the user names from the existing annotations. And the annotations do not contain user affiliations.

Also I don't think we can solve the point "Select volumes by name". So I'm closing this as resolved.