Member invitations - Improve how to identify users within GitLab

When adding members to a group, the selection box is extremely difficult to work with, and quite frustrating.

Some problems:

  1. When you provide an exact match on GitLab user ID (if you know it), it does not become the first entry. It still tries to match on their name, and if there are a lot of matches, the exact match may not even be in the list.
  2. If you provide the @ as part of the name, it does not attempt to autocomplete by user id. It still does name.
  3. If you do even the complete user id, and try to hit space or tab, it doesn't do anything. In some cases it clears your content, and in others you get the raw text but it clearly is not going to work. (It should populate their name it seems)
  4. Email address searches work strangely. Some accounts are autocompleted, but others only appear in an exact match. By showing a partial result, it seems like the email address is incorrect.

You can see an example of these in the below: Finding_David

The only way to add David was to provide his complete email address. For some reason a partial email address only returned his personal account, and only upon providing the exact match did it actually find the right account.

Proposed solutions

Some suggestions, but not exhaustive:

  1. Exact matches should always be the top hits
  2. It should detect when you start text with @ that you are typing in a GitLab username, and start searching exclusively by that.
  3. Fix what is going on with the email address autocomplete. Why are some profiles showing in autocomplete, and others not? Should we allow autocomplete by email address? In some ways this exposes the email address of the account.

Proposed technical solution:

Update User#search. Currently we strip the @ out of the search query. Instead of striping the @ out of the search query we should prioritize searching by username if the search query starts with @. Otherwise we fallback to searching by name and then public email.

Edited Feb 16, 2022 by Peter Hegman
Assignee Loading
Time tracking Loading