giellatekno / neahttadigisanit

Saami dictionary webapp
Other
2 stars 2 forks source link

Searches are not trimmed, leading to confusion #2

Closed Phaqui closed 1 year ago

Phaqui commented 1 year ago

As pointed out by a user, if the search input ends with a space, as in for example "viessu" vs "viessu ", suddenly there is no search hits, which is certainly confusing.

It is partially fixed after commit 5b80adaef964975b73a325575c73a91333cbcd9a. A search for "viessu " will after this commit yield the hit for "viessu", instead of no match at all.

What's left is to maybe update the autocomplete dropdown to show autocomplete matches even when the input box ends with a space. As of right now, typing in the word "viessu" leads to fewer and fewer autocomplete results showing, up until you have finally typed out the word, and it's left with just that one word in the autocomplete list. This is all fine, the problem is if then you type an additional space. Then the autocomplete suggestion for "viessu" will disappear. One can image the users expecting to see the autocomplete suggestion, even if they have ending spaces in their search field (perhaps by mistake of copy and pasting).

There are some considerations as to how to handle what to see in the autocomplete dropdown when the input field ends with spaces, because some search terms have spaces in them, so we cannot "just always strip the search input at all times".

Phaqui commented 1 year ago

Fixed as of 651f001a170c57131b135661099ef46d1a92ab7e.