huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
241 stars 80 forks source link

Add a search box to the Single Select property #6591

Closed serena-huridocs closed 7 months ago

serena-huridocs commented 7 months ago

When documenting legal cases and violations, lawyers and human rights defenders often deal with humongous thesauri. Some thesauri that they use contain types of documents they receive; others list regional branches of the law enforcement authorities that issue documents. Sometimes thesauri contain positions of government employees who might have been involved in violations.

Issues

Dealing with humungous thesauri can be cumbersome; it takes time to scroll all down through the list and find an option one is looking for. Dividing thesauri and, consequently, creating numerous additional properties with respective items does not appear to be a good solution as it can potentially result in producing clutter in templates. In such a case, a user risks to end up having 50-100 properties in a template instead of 10-20.

Alternatives

In Uwazi, a search box is only available for the Multiple Select property. In case an admin deals with a humongous thesaurus, they may find it appealing to use the Multiple Select field instead of the Single Select as it provides a search box, accompanying the thesauri items.

Screenshot 2024-03-14 at 15 26 55

Yet, the pros of this decision are questionable. Thus, a simple misclick (e.g. instead of only one option, a user chooses two) can result in entering incorrect data. Due to the related risk, a database manager will have to be taking time to view the created records and make sure that the user filled in everything correctly. At the same time, users often need to use precisely the Single select property when entering info because they receive a document of one type (not multiple), from one institution (not multiple), in one city (not multiple), and so on.

Solution

Adding a search box to a single select property could make this exercise a lot easier by allowing users to type a required thesauri item through the search box.

txau commented 7 months ago

@serena-huridocs thanks for the feedback. I think this is being addressed as part of the new select properties. @juanmnl please note this feedback, maybe we need a single select field that can be restricted to a single value.

RafaPolit commented 7 months ago

cc @juanmnl Do you think this is a desired flow? Should we delegate to browser selects?

juanmnl commented 7 months ago

@RafaPolit I think we can find a way to solve this with a similar pattern as the one we are adding to the combo-box of the selects in v2.