bjornregnell / kapten-alloc-web

Find your slot in space and time.
https://cs.lth.se/pgk/kaptenalloc
39 stars 4 forks source link

Make the search field case-insensitive. #12

Closed trilleplay closed 1 year ago

trilleplay commented 1 year ago

Currently the input in the search field is case-sensitive, I've found myself typing in my groups name in lower-case when checking on my phone, which would lead to me not finding any results.

Doing a case-insensitive search shouldn't really cause any unexpected behaviour and wouldn't require the user to make sure they input their search with the characters capitalised the same way.

Because of that I suggest that users should be able to input their search query in whatever casing they wish to.

trilleplay commented 1 year ago

I've taken the liberty to address the issue in PR #13 if it's deemed that this is a use-case that should be supported.

bjornregnell commented 1 year ago

Thanks for taking the time to contribute!

Actually, we have tried this and it is vital to have case-sensitive to be able to single out otherwise equality between parts of other columns and initials of supervisors. And it is not that case sensitivity makes filtering impossible, just that you need to think about it when you filter. So my plan is to close this, or do you have more to add?

bjornregnell commented 1 year ago

Example that needs case sensitivity: ES is the initials for one of the supervisors, while es is part of the word Resurstid.

trilleplay commented 1 year ago

Actually, we have tried this and it is vital to have case-sensitive to be able to single out otherwise equality between parts of other columns and initials of supervisors.

So a breaking case would be if a supervisor has "PG" as their initials then if I understand it correctly? That would seem to be the case, Github didn't show your next comment until after I posted my reply.

And it is not that case sensitivity makes filtering impossible, just that you need to think about it when you filter. So my plan is to close this, or do you have more to add?

I agree. I do believe that being able to filter group case-insensitively would be a UX improvement, but if it affects the current workflow with Kapten Alloc the gain of implementing the feature would probably be negated by the problematic behaviour with supervisors initials.

One way of addressing it would be to do some pattern check if we're comparing against a group column in a row or checking if the input string looks like a group id, but the overhead required to introduce that (probably with regex), might not make it worth implementing. It would also be an additional constant to maintain if for whatever reason the format for group ID's were to change (however unlikely that may be). In addition it would probably confuse some users, with only group being case-insensitive, as opposed to the other parameters.

Feel free to close!