Skip to content

Migrate to native window scrolling

Lukas 'ai-pi' Eipert requested to merge 19997-remove-jQuery-scrollTo into master

What does this MR do?

We are currently using jquery.scrollTo in a few places. It uses jQuery animations under the hood.

In order proceed with the removal with jQuery (&3418), we need to move to native functions, as this MR does.

Screenshots

There are a few places which just scroll to the top of the page. I haven't created videos for those.

Before After Context
issue-note-before issue-note-after Scrolling to an issue note. Scrolling is now smooth and not instant on browsers that support it
loc-before loc-after Scrolling to a line of code. Scrolling is now smooth and not instant on browsers that support it
mr-commit-list-before mr-commit-list-after Scrolling to a commit in a list of MR commits. It's unclear how one triggers this through the UI, but it works 🤷
mr-diff-note-before mr-diff-note-after Scrolling to an MR diff note. Unfortunately video recording doesn't show scrolling from the same direction, but 🤷
mr-loc-before mr-loc-after Scrolling to a line of code in an MR diff. The behaviour is a bit weird due to jumps, but at least it is weird before and after 😆
mr-note-before mr-note-after Scrolling to an MR note, same as an issue note.
zen-comment-before zen-comment-after This one is a bit interesting. If you are editing a note in Zen mode (full screen mode), you can still scroll the page in the background. All that this does, is scrolling back to the edit field if you close the Zen mode.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #19997 (closed)

Edited by Lukas 'ai-pi' Eipert

Merge request reports