wikipedia-ios
wikipedia-ios copied to clipboard
Fix navigation bar in specific scroll situation
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
- Open an article.
- Flick down. Ensure it hides the nav bar.
- Flick up. Ensure it shows the nav bar.
- Slowly scroll down, without flicking. Ensure it slowly and smoothly hides the nav bar.
- Slowly scroll up, without flicking. Ensure it slowly and smoothly shows the nav bar.
- Open Explore feed (which has an under bar view), repeat steps 2-5.