search ui: scroll to top of search result when hiding matches
Created by: limitedmage
Fixes https://github.com/sourcegraph/sourcegraph/pull/38900#pullrequestreview-1040743166
Only visible with the "Simple UI" toggle enabled (coreWorkflowImprovementsEnabled
).
When collapsing a search result's matches, scroll to the top of the search result. If the user hasn't set "reduce motion", the scrolling will be smooth. If the top of the search result is visible already, no scrolling will occur.
https://user-images.githubusercontent.com/206864/179321431-c3f2bab6-1c2f-4edd-a413-455783a42a86.mp4
Test plan
Manually test with "Simple UI" toggle enabled
App preview:
Check out the client app preview documentation to learn more.