Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve attach volume/label tree input #876

Open
mzur opened this issue Jul 9, 2024 · 4 comments · May be fixed by #927
Open

Improve attach volume/label tree input #876

mzur opened this issue Jul 9, 2024 · 4 comments · May be fixed by #927
Assignees

Comments

@mzur
Copy link
Member

mzur commented Jul 9, 2024

Currently the attach label tree (and volume) input of the project overview loads a complete list of available label trees on the focus event and then a typeahead is used to search and select the label tree. This has two problems:

  1. The input loses focus again after the label trees were loaded. The user has to focus the element again afterwards.

  2. There may be many label trees or volumes with similar names. If the user searches for generic "fauna", for example, the label tree may not show up in the top 5 of the typeahead results.

To fix these issues, implement a fuzzy search API endpoint for label trees. The endpoint is queried after the user has entered at least 4 characters and stopped typing for 500 ms (?). As long as the user is not typing, up to 50 returned label trees are shown in a (scrollable) dropdown.

@lehecht
Copy link
Contributor

lehecht commented Sep 12, 2024

@mzur

  1. The input loses focus again after the label trees were loaded. The user has to focus the element again afterwards.

When I click on the input to emit the focus event it remains focused after it finished loading. Or did you mean something different?

@mzur mzur changed the title Improve attach volume input Improve attach volume/label tree input Sep 16, 2024
@mzur
Copy link
Member Author

mzur commented Sep 16, 2024

This issue was originally meant for the label tree input but there was an error in the description. Now the volume and label tree inputs both should be updated.

@lehecht
Copy link
Contributor

lehecht commented Sep 20, 2024

@mzur
How should the fuzzy search be implemented?
Should it be a simple fuzzy search by using the SQL operaor LIKE or should I use the Levenshtein distance with a given threshold for the maximal number of differences?

@mzur
Copy link
Member Author

mzur commented Sep 20, 2024

Do whatever you think works best 😉 The only important thing is that it should work in a DB query (i.e. you don't have to fetch all the data from the DB and process it with PHP).

@lehecht lehecht linked a pull request Sep 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Medium Priority
Development

Successfully merging a pull request may close this issue.

2 participants