zulip/zulip-mobile

User search screen should order prefix matches first

Open

#4,869 opened on Jul 6, 2021

View on GitHub
 (6 comments) (0 reactions) (0 assignees)JavaScript (673 forks)github user discovery
P1 high-priorityhelp wanted

Repository metrics

Stars
 (1,348 stars)
PR merge metrics
 (PR metrics pending)

Description

At present, user search results are shown with all matches in alphabetical order. This doesn't match what the user is trying to do, which is usually to put in the start of someone's name. It looks especially "broken" when the user first start typing, as it's unclear why these particular names are being shown, or why the name list didn't seem to change (or change much) when the first letter was typed.

We should change the ordering to show prefix matches with any part of the name above other results, the way we currently do in the right sidebar of the web app. It should be fine to just use <space> as the separator, or match whatever implementation we have in the web app.

Contributor guide