Collapse unchanged lines in suggestions
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Situation
Sometimes, you want to make a suggestion where you change two lines at opposite ends of a files within the same suggestion. Currently, this results in a very large diff, the assignee has to wrap their head around.
This leads to solutions like
- Creating multiple suggestions in different comments
- Add textual instructions with additional chores to the suggestion
This is all not very ideal as it can lead to partially applied changes that will result in the pipeline failing, which may not be obvious to the assignee
Solutions
- Automatically collapse unchanged lines
1 import A from 'a'
+ import B from 'b'
…
25 a = new A();
+ b = new B();
- Denote relevant lines
```suggestion lines="1"
import A from 'a'
import B from 'b'
```
```suggestion lines="2"
a = new A();
b = new B();
```
Part of &832
Edited by 🤖 GitLab Bot 🤖