Smooth scroll speed adjustment for Admin UI #4635
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Addressing request from my colleagues (content publishers) to speed up smooth scroll when form is updated and form happens to be quite long (page hight). Current speed is 50px with timeout 20ms is static and sometimes it takes up to 10-15 seconds to wait for smooth scroll to complete. Update takes current scrollY position into consideration to calculate the speed, hence the bigger scrolllY value, the higher smooth scroll speed, slowing down as it approaches top of the page.
Related issues (if any)
Haven't found any.
Testing
npm run test-all
ran successfully.Test fails with error
15:14 Unexpected token =
inwebsite/templates/template-doc-layout.js
.It was there before development started. Error is caused by class method notation being wrong.
I decided to leave as is because it's not related to my issue.