wikipedia-ios icon indicating copy to clipboard operation
wikipedia-ios copied to clipboard

Fix navigation bar in specific scroll situation

Open mcleinman opened this issue 2 years ago • 0 comments

Phabricator: https://phabricator.wikimedia.org/T306124

Notes

  • We scroll away the top bar in Notifications Center, Explore Feed, and articles. We only re-show it if the user is scrolling and removes their finger while scrolling is still happening (in other words, a flick up). If a user is slowly scrolling up - finger down, scroll up, stop scrolling, finger up - they don’t get the bar back. This isn’t how I’ve seen this work in other apps - I usually see it reappear as soon as a user starts to scroll up.
  • This requires some different math when we have an underbar - as we show the underbar after the nav bar, but hide the underbar before the navbar.
  • If you think I should add some comments or additional variables to this for future reference, please let me know.

Test Steps

  1. Open an article.
  2. Flick down. Ensure it hides the nav bar.
  3. Flick up. Ensure it shows the nav bar.
  4. Slowly scroll down, without flicking. Ensure it slowly and smoothly hides the nav bar.
  5. Slowly scroll up, without flicking. Ensure it slowly and smoothly shows the nav bar.
  6. Open Explore feed (which has an under bar view), repeat steps 2-5.

mcleinman avatar Jun 02 '22 00:06 mcleinman