Account for fixed position MR when scrolling to elements
What does this MR do?
This MR accounts for the new merge request fixed affix bar when scrolling to an element on the MR page.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
The fixed MR tabs bar was not being taken into account when shifting permalink scroll targets so that they are unobscured by navigation elements.
Screenshots (if relevant)
Merge request discussion permalink:
Commit diff page permalinks work as well, but aren't highlighted currently (see: #23696 (closed))
Does this MR meet the acceptance criteria?
-
CHANGELOG entry added - Tests
-
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #23520 (closed)
Merge request reports
Activity
Mentioned in issue #23101 (closed)
Reassigned to @iamphill
Milestone changed to %8.13
Reassigned to @fatihacet
@lbennett Screenshot and todo list checkmarks are missing?
Reassigned to @lbennett
Reassigned to @mikegreiling
Taking over this one as @lbennett is on holiday
Mentioned in merge request !7090 (merged)
Added 1 commit:
- 687536c5 - account for merge request fixed affix bar when adjusting scroll targets
Marked the task CHANGELOG entry added as completed
Reassigned to @fatihacet
Added 188 commits:
-
687536c5...3d174c71 - 187 commits from branch
master
- acf9b5a2 - Merge branch 'master' into '23520-mr-sticky-tabs-overlap-discussion-from-anchor'
-
687536c5...3d174c71 - 187 commits from branch
@lbennett build failed.
Reassigned to @lbennett
Added 58 commits:
-
acf9b5a2...356a57c2 - 57 commits from branch
master
- a21cfd85 - account for merge request fixed affix bar when adjusting scroll targets
-
acf9b5a2...356a57c2 - 57 commits from branch
Added 32 commits:
-
a21cfd85...f8793198 - 31 commits from branch
master
- 850ec0da - Account for merge request fixed affix bar
-
a21cfd85...f8793198 - 31 commits from branch
Added 32 commits:
-
a21cfd85...f8793198 - 31 commits from branch
master
- 850ec0da - Account for merge request fixed affix bar
-
a21cfd85...f8793198 - 31 commits from branch
Added 29 commits:
-
850ec0da...8b0cdf4c - 28 commits from branch
master
- 1e260240 - Account for merge request fixed affix bar
-
850ec0da...8b0cdf4c - 28 commits from branch
Added 64 commits:
-
1e260240...b216d9bf - 63 commits from branch
master
- 7ecce2dd - Account for merge request fixed affix bar
-
1e260240...b216d9bf - 63 commits from branch
Reassigned to @fatihacet
@lbennett it looks like you reverted the changes I had made. Was this intentional?
@mikegreiling This wasn't intentional. :( Twice I've done this now!
Reassigned to @lbennett
@mikegreiling I cherry picked a21cfd85, let me know if I missed anything. :)
- Resolved by Luke Bennett
Reassigned to @lbennett
Mentioned in issue #23759 (closed)
Reassigned to @fatihacet
Mentioned in issue #22781 (closed)
@lbennett Please consider assigning to someone else if @fatihacet is not available to review this! ;)
@lbennett Conflicts
Reassigned to @lbennett
Mentioned in merge request !7318 (merged)
Added 514 commits:
-
97e7f3ef...0c99e5d0 - 513 commits from branch
master
- f02f08f5 - Account for merge request fixed affix bar
-
97e7f3ef...0c99e5d0 - 513 commits from branch
Reassigned to @fatihacet
Tested this works good Thanks @lbennett
Mentioned in commit 41899c2a
Mentioned in issue #24326 (closed)
Mentioned in commit b4db3888
58 58 document.addEventListener('page:fetch', gl.utils.cleanupBeforeFetch); 59 59 window.addEventListener('hashchange', gl.utils.shiftWindow); @lbennett did you leave this there intentionally? this also does
scrollBy(0, -100);
I don't remember this code anymore.
Is it causing a bug? Seems intentional as I moved it from here.@lbennett It may be the reason for scrolling too far when clicking on a line number.
@winniehell I can't reproduce that. In fact I swear I fixed that recently too?
I opened #24876 (closed)
Somehow a bad conflict resolution crept into this merge... The
shiftWindow
method which I replaced withadjustScroll
was kept in for some reason, and now we have two adjustments being made on thehashchange
event.I fixed this duplication in a pending MR !7631 (merged) since I was touching that code again anyway.
Edited by Mike Greiling
mentioned in commit ff23636c
mentioned in commit 460f6527