In T414518, the Editing Team introduced a new View Suggestions button to indicate when the 1st suggestion available is outside the viewport. The decided behavior was that, upon clicking the button, the user would be navigated to the first suggestion of the whole article.
In T422979, we extended the implementation of the View Suggestions button so that it appears as well when the 1st suggestion available is outside the current section being edited. For this task the decided behavior was that the user would be navigated to the most proximate suggestion to their current position in the article.
Now there is an inconsistency in where the 'View Suggestions' button scrolls the user to[i], and we decided offline that in both cases the user should be scrolled to the most proximate suggestion. This task involves the work of implementing that behavior in the outside-viewport case.
i. For example, if you're editing only the Sports section (which has no suggestions as of the time of this ticket) of Culture of Wales on mobile and you click View Suggestions, it brings you to the nearest suggestion, which is in the Arts section. However, if you're in the full-page editor but you're positioned in the Sports section, and you click View Suggestions, it will navigate you to the first suggestion of the article.
Requirements
- 'View Suggestions' button navigates to the most proximate suggestion when there are no suggestions in the current viewport or in the current section