feat: add commenting ranges for new file versions in diff
This MR is a follow up for !232 (merged). It introduces the commenting range (grey vertical lines) for new files (highlighted orange on the screenshot).
We parse the MR version REST API response into hunks. These hunks tell us what lines have been added in the new file version on the diff. We then convert these lines in VS Code Ranges and return them as ranges on which the user might leave a comment.
Feature flags
We can't show the commenting ranges till we implement #342 (closed). Otherwise, users would think they can comment on any line.
The commenting ranges feature is hidden behind commenting-ranges
feature flag. You can enable it by adding the following config to your settings.json
VS Code settings:
{
"gitlab.featureFlags": ["commenting-ranges"]
}
Related to #340 (closed)
Edited by Tomas Vik