[VS Code] Spike: Support Username Autocomplete
Problem to Solve
When reviewing merge requests or leaving comments, users often need to manually input another user's GitLab handle, which can be time-consuming and prone to errors. To make the review process more efficient, we'll need to add a username autocomplete feature to merge requests and comments. This will save users time and reduce the possibility of errors.
Solution
It should be possible to implement CompletionItemProvider
and make it only auto-complete in MR/Issue comments.
We can inspire ourselves with the MIT-Licensed userCompletionProvider.ts
Spike output
- Clearly defined steps for implementing the user completion provider.
- POC code that does user autocompletion.
- Extra: If time allows, add a hover provider, which would show user details on hover over the
@viktomas
handle
Original Request
Summary
@username mentions work, but only if you know the exact username you are trying to tag. Auto-complete does not work like it does in the Web GUI, which makes it very difficult to use.
Example of how GitHub PullRequest extension does it:
The VS Code API for the username autocomplete might be not available to our extension (it might be "proposed API"). We need to investigate that before starting with implementation.
Original description
\### Steps to reproduce- Create merge request review
- In Visual Studio Code add a Comment using @ syntax, and start typing a username
What is the current bug behavior?
Typing @ followed by the first few characters of a username doesn't bring up any auto-complete.
- If you get the username correct and save the comment, it will tag them.
- If you get the username incorrect, it will just save it as a comment.
What is the expected correct behavior?
Typing @ followed by the first few characters of a username, or their real name, should bring up some autocomplete (similar to the Web GUI)
Relevant logs and/or screenshots
N/A
Possible fixes
N/A