Fixed anchoring diff lines in collapsed diffs
What does this MR do?
This MR adds the ability to forceLoad
a collapsed diff from instantiation, on top of this, if it is force loaded, we can pass a callback function to be invoked when the content is loaded.
Now when a MR is loaded, we check for a diff line anchor that is currently within a collapsed diff, we re-instantiate the singleFileDiff
with the forceLoad
option. We also pass a callback function that in responsible for highlighting and scrolling to the specified anchor.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
We currently cannot anchor link to collapsed diff lines as the do not auto-expand.
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if you do - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #21633 (closed)