Page MenuHomePhabricator

Mentor dashboard: Search bar issues
Closed, ResolvedPublic

Description

DONE (1) It seems that the search for a user can be performed only from the first page (the page number 1).

(moved to T289916: Mentor dashboard M1: Searching and filtering does not work reliably outside of first page)

(2) (the edge case) Searching for a user name that is a sub string of several user names will display all usernames that have that substring.

  • my mentee list includes users - ET2 and ET24.
  • type ET2 in the Search field; the suggested list includes ET2 and ET24

Screen Shot 2021-08-26 at 6.36.54 PM.png (1,454×654 px, 112 KB)

  • (important) without selecting any of the suggestions, hit Enter, both usernames will be displayed:

Screen Shot 2021-08-26 at 6.38.37 PM.png (1,442×774 px, 115 KB)

Since I have users - ET12, ET121b, ET12c1, and ET1234 - they all be displayed if in the above scenario I enter "ET12" and hit Enter.

Note There are several users that start with ET, but I do not have a user with the username that is exactly ET. So, entering "ET" (a long suggestion list will be displayed) and hitting Enter won't display all usernames that have ET - only the first suggestion.

ImpactPressing enter during input search uses a prefix search, so even though the mentor thinks they're selecting a single user, multiple users might be displayed in the table
What happens if we don't do this taskThe UX might be confusing in the event of multiple users sharing a common prefix
Who needs to decide about moving the task forward@Urbanecm_WMF

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Etonkovidova renamed this task from Mentro dashboard: Search bar issues to Mentor dashboard: Search bar issues.Aug 27 2021, 1:54 AM

@Etonkovidova Thanks for noticing the first issue, that's really a total oversight on my end (and great catch on your end :-)). Split that to T289916: Mentor dashboard M1: Searching and filtering does not work reliably outside of first page, as that's a separate underlying problem, and I think the edge case will need some discussion.

mewoph subscribed.

Moving into Needs Discussion per @Urbanecm_WMF 's comment

kostajh subscribed.

@Etonkovidova Thanks for noticing the first issue, that's really a total oversight on my end (and great catch on your end :-)). Split that to T289916: Mentor dashboard M1: Searching and filtering does not work reliably outside of first page, as that's a separate underlying problem, and I think the edge case will need some discussion.

What discussion is needed?

You could maybe use https://doc.wikimedia.org/oojs-ui/master/js/#!/api/OO.ui.TagMultiselectWidget with a limit of 1 item, if you want to make it more clear that the filled in text in the search input corresponds to a username.

Alternatively or in addition, while using prefix search makes sense during the typing input phase (e.g. these queries /w/rest.php/growthexperiments/v0/mentees/prefixsearch/Mente?limit=10) after enter is pressed on a menu item, it should probably not use a prefix search but instead do an exact match.

Hello @kostajh, thanks for asking. This needs decision about how it should work like. My intention was to both allow a prefix search and exact username search, but maybe prefix search is not that useful, considering mentees are unlikely to share a common prefix? If restricting the interface to a single username is decided to be a good option, it can be easily implemented (using what you suggest, or something else). I don't think I should be listed as the decision-maker here, as designing things is out of my expertise.

@OTichonova -- do you have an opinion on whether the prefix search is important?

@OTichonova -- do you have an opinion on whether the prefix search is important?

Hey, 
I think prefix search is important, if the mentor doesn’t remember the full username this will allow them to find the right person by seeing the list of people with similar usernames but they might recognise the person they are looking for by their tenure or number of blocks etc. 
Also when there is a list of names in a search recommendation I would expect the user to select the specific name they are interested in. In the case above when the user is looking for ET2, types that, and ET2 & ET24 shows up I would expect them to type ET2 followed by a [space] indicating that they are looking for just that specific username and not ET+anything that follows. But not sure if this is intuitive…

Etonkovidova claimed this task.

@OTichonova -- do you have an opinion on whether the prefix search is important?

Hey, 
I think prefix search is important, if the mentor doesn’t remember the full username this will allow them to find the right person by seeing the list of people with similar usernames but they might recognise the person they are looking for by their tenure or number of blocks etc. 
Also when there is a list of names in a search recommendation I would expect the user to select the specific name they are interested in. In the case above when the user is looking for ET2, types that, and ET2 & ET24 shows up I would expect them to type ET2 followed by a [space] indicating that they are looking for just that specific username and not ET+anything that follows. But not sure if this is intuitive…

I re-checked (2) prefix search for user names - and it seems that it works as described in the comment.
e.g.

  • a mentor has two mentees - ET83 and ET84

Screen Shot 2022-10-28 at 3.17.40 PM.png (1,262×1,128 px, 222 KB)

  • typing ET will give suggestions: ET83 and ET84
  • pressing "Enter" will close the suggestions and won't perform the search

A mentor is forced to select a specific user name.