Added capability to mention users by username #3253
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #2625
Added functionality for mentioning users by typing their username instead of only by display name. This feature was achieved by modifying the
/get-users/
API to return the usernames of all UserProfile objects in addition to the preexisting fields. The suggestedUsers filter function was modified to first check for a matching username (if it exists), then checking for a matching display name.To reproduce results: After starting up the server, navigate to any team/project. Select any string that has an existing translation. Click the "COMMENT" button, and then inside the text editor field, type
@[any string of letters]
to display a list of users whose display name or username contains that string of letters. If you know a specific user's username, try typing their full username or a subset of it, and their profile will appear just as if you typed their display name instead.