Background
The recent design for moved paragraphs in mobile diffs (T197491) called for an animated scroll when clicking from one instance of the paragraph in question to the other. The purpose of this animation is to help the user stay oriented in terms of where the paragraph got moved to.
We initially thought this behavior would benefit Minerva in general (e.g. when using the table of contents to navigate to a page section it would be awesome to animate the scroll), but after trying it out decided to scope this change just to the mobile diffs view for now.
Developer notes
https://phabricator.wikimedia.org/T200927#4590778 provides a simple lightweight solution to this.
Let's try it out.
If it doesn't have the desired effect we should not spend time investigating alternatives. Instead we should put it back in the backlog and re-evaluate and estimate.
Note it's important that scroll-behaviour applies to a scrollable element, otherwise it won't work as we found out when we previously attempted this task.
QA instructions
*Note that this feature is not intended to work on iOS
Environment: staging
Browser & device: Android/Chrome
Skin: MFE
Steps:
- visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Special:MobileDiff/388527#movedpara_1_1_lhs
- scroll down to the bottom of the first yellow paragraph
- tap the downwards-pointing yellow triangle
- the view should scroll smoothly to the top of the second yellow paragraph
- click the upwards-pointing yellow triangle (at the top of the second yellow paragraph)
- the view should scroll smoothly to the top of the first yellow paragraph