Refactor scroll functions to make them easier to use
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The following discussion from !207880 (merged) should be addressed:
-
@eduardosanz started a discussion: (+1 comment) @jachapman, thanks for your work! @mrincon, mentioned this is very pressing, so I am approving.
There are a couple of changes that could be considered:
- Make all this scrolling smooth.
- Instead of passing the element as an argument, could we create two different functions,
scrollMainPanel,scrollOtherPanel? - Modify
smoothScrollTopto accept the element argument. This is still broken here: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/javascripts/vue_shared/access_tokens/stores/access_tokens.js#L94 - Implement an eslint rule to forbid the use of
window.scrollToand instead hint to usescrollToutility.
Edited by 🤖 GitLab Bot 🤖