Open gnprice opened 1 month ago
If we decide to get rid of the case-sensitive behavior, we might want to do the same for web.
Case-insensitive does seems especially helpful for mobile, where managing capitals vs. lowercase letters is often a bother.
In the initial implementation of #310 (in #627), we'll order the suggested topics purely by recency (see https://github.com/zulip/zulip-flutter/pull/627#discussion_r1713064079). That matches zulip-mobile's behavior, and is enough to be quite useful.
In Zulip web, though, there's some further ranking: an exact match comes first, then prefix matches, then matches that start at a word boundary. (Plus prefix matches are further split by case-exact vs. case-insensitive.) See
initialize_topic_edit_typeahead
inweb/src/composebox_typeahead.ts
; and then follow the indirections totriage_raw
inweb/shared/src/typeahead.ts
for the implementation.I'm not sure all the nuances of that are good to copy — in particular the case behavior, which should perhaps just be all case-insensitive. But we should do either that or something like it.
The additional ordering should, like in web, be stable — results that have the same priority in this ranking should remain ordered by recency.
This is a post-launch issue because the zulip-mobile legacy app doesn't do this ranking.