Skip to content

Resolve "Line numbers are off in dynamically loaded diff chunks"

What does this MR do?

Fixes line number rendering error on dynamically loaded diff chunks.

Are there points in the code the reviewer needs to double check?

Best way to test this is to visit the following MR in your GDK: http://localhost:3000/gitlab-org/gitlab-test/merge_requests/9/diffs (if your MR ids are different, this is the "Cannot be automatically merged" MR within the Gitlab Test project)

Check the file files/ruby/regex.rb file and click the diff unfolding links at the bottom of the file (make sure to do this twice - the second ellipsis generated after unfolding the first time actually gets rendered by a different view file and it needs to be tested as well)

Do the same for both parallel and inline diff views (these are also separate view files)

Screenshots (if relevant)

Before unfolding:

folded

Before (incorrect line numbers):

before

After (correct line numbers):

after

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #26300 (closed)

Merge request reports