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)
Merge request reports
Activity
Added 22 commits:
-
288137d1...14174375 - 21 commits from branch
master
- fff6cc70 - Added forceLoad ability to singleFileDiffs, added callback to getContentHTML, ad…
-
288137d1...14174375 - 21 commits from branch
Added 3 commits:
-
fff6cc70...d01cbe0c - 2 commits from branch
master
- bc159576 - Added forceLoad ability to singleFileDiffs, added callback to getContentHTML, ad…
-
fff6cc70...d01cbe0c - 2 commits from branch
Reassigned to @jschatz1
Milestone changed to %8.12
Milestone changed to %8.13
- Resolved by Luke "Jared" Bennett
- Resolved by Luke "Jared" Bennett
Mentioned in issue #20327 (moved)
Reassigned to @lbennett
Added 2513 commits:
-
bc159576...1e66061b - 2512 commits from branch
master
- b0bc4395 - Added forceLoad ability to singleFileDiffs, added callback to getContentHTML, ad…
-
bc159576...1e66061b - 2512 commits from branch
Added 1 commit:
- d2ee3808 - Added forceLoad ability to singleFileDiffs, added callback to getContentHTML, ad…
Reassigned to @jschatz1
Reassigned to @jschatz1
Milestone changed to %8.14
@jschatz1 Assigned this to myself and I will review tomorrow.
Reassigned to @fatihacet
Tested locally and works good