Line counting in dynamically created diff headers should be more accurate
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Currently we have the following line counting slightly inaccurate in a few places.
-
When clicking on ... (once or multiple times) we see it sticking to the
20
valueThis is the size of blob lines being requested and inserted in the diff lines. But if we're willing to present an accurate value (following git standards) we should calculate how many lines it has until the next match line. So if it has
6
lines before the click and we're expanding20
, it should be26
, not20
. Second click, if we're expanding more20
, it should be46
, not20
. -
After leaving a comment in an expanded line and reloading the page, the backend creates top and bottom diff headers dynamically (based on comment positions), but the line counts in these headers are not accurate as well in a few scenarios
This is being handled by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22852.