Skip to content

feat: render suggestions in MR reviews

This MR improves the rendering of suggestions in the MR review.

This comment:

Adding a line12

```suggestion:-1+0
function containingFunctionABCD(): void{
    function subFunctionDEF(): void{
```

And here

Get's rendered as

Cursor_and__Extension_Development_Host__-_test_js___test_ts___test-project

The new suggestion rendering can't be on feature-parity with the web version, because we don't have access to the same data through API. I created an issue for that: gitlab#347504

We only show the suggested lines, not a full diff. And we also can't apply the suggestion from the comment. I added a link to open the comment on the web.

web before after
single suggestion MR_7_rename_a_few_changes_on_the_diff___7____Merge_requests___Tomas_Vik___test_project___GitLab Cursor_and__Extension_Development_Host__-_test_js___test_ts___test-project Cursor_and__Extension_Development_Host__-_test_js___test_ts___test-project
multiple suggestions MR_7_rename_a_few_changes_on_the_diff___7____Merge_requests___Tomas_Vik___test_project___GitLab Extension_Development_Host_-_test_js___test_ts___test-project Extension_Development_Host_-_test_js___test_ts___test-project

Editing suggestion:

editing-suggestion

Related to #371 (closed)

Edited by Tomas Vik (OOO back on 2024-08-12)

Merge request reports