Allow search for full name in mentions in comments
Problem to solve
When trying to mention a user, I should be able to search by the user's full name and not just the full username / first name. The current behaviour doesn't allow that
Intended users
Anyone who comments on issues / MRs.
Further details
Including an internal conversation on Slack (edited for brevity):
sstern 13 hours ago
is there a ticket to @ a user and search for a combination of their name and username? Some users have a username that doesnt logically map to their full name and it makes it difficult to @ someone if you know their name but not their exact username
charlie:charlieshat: 12 hours ago
I had this issue yesterday. I ended up searching via the assignment box :sweat_smile:
sstern 11 hours ago
ya it happens to me in issues a lot, its like what was their user name? If you only type 1 char too it returns nothing.
The assignment box doesn't search by name does it?
charlie:charlieshat: 10 hours ago
It does! Give it a go :slightly_smiling_face:
sstern 10 hours ago
awesome, we should make a ticket to add that to the comments
charlie:charlieshat: 10 hours ago
I suspect that we use a mentions library and it might involve an upstream PR. :thinking_face: please raise one anyway!
sstern 10 hours ago
thanks for the context!
:charlieshat:
heinrich 10 hours ago
I think it already does, even in the comment boxes
sstern 10 hours ago
so… playing with it it looks like it matches first name but if there are n “Paul’s” and i type Paul Space start last name that does not work
heinrich 10 hours ago
Yeah, space is tricky because it would be like the end of a mention
heinrich 10 hours ago
Same thing happens for label names with spaces
sstern 10 hours ago
so if there were 100 Heinrichs, and its limiting 5, and you were number 6
sstern 10 hours ago
see my point?
charlie:charlieshat: 10 hours ago
:thinking_face: I think the behaviour is different. Yes, the space is treated as the end of the word. I use the assignee search if I give up in the comment mentions - it’s definitely easier since it’s more dedicated.
heinrich 10 hours ago
Yeah, the assignee search uses the whole term there because we know the whole string is for the assignee
charlie:charlieshat: 10 hours ago
Not sure what the answer is here, it’s definitely an interesting UX problem, and probably worth bringing up as an issue.
charlie:charlieshat: 10 hours ago
thank you so much for further context @heinrich :heart:
Justin Ho 4 hours ago
Probably a good question to ask UX about. Maybe something like Slack would be nice? Where as long as you start typing @, it begins a mention search even after clicking space. To stop it, you just click escape or continue typing. It even highlights the @mention with a tooltip indicating it might be an invalid mention.
Proposal
- We can use a Slack-like mention, where once you type the
@
character, the search continues even after you click space. You can dismiss the search with theEsc
key. - We can allow to search for name without spaces. For example, if I search for
@justinho
, it should still return my account even though it doesn't match my username exactly (but it matches my name).
Permissions and Security
No change.
Documentation
Testing
What does success look like, and how can we measure that?
Mentions allow for a wider search scope and are easier to use.
What is the type of buyer?
Individual Contributors
Links / references
Release Notes
It's uncommon for GitLab users to use their full name as their username. This makes it painfully difficult to find the individuals you want to @
mention because the autocomplete only matches against usernames. As a first step towards making autocomplete smarter, you can now search for people to mention based on their username or full name.
https://docs.gitlab.com/ee/user/project/issues/issue_data_and_actions.html#mentions
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.