We have a legacy custom navigation bar component that provides title shrinking, fading, snapping and loading behavior across all of our features. This component is difficult to maintain, and often results in UI layout quirks that cause us to spend time investigating, then patching or ignoring. We also don’t benefit from new system navigation bar changes, causing us to either lose out on new free abilities or to put in extra effort to add the abilities in manually.
iOS 11+ navigation bar supports large titles and integrated search bars, so we may be able to recreate much (but likely not all) of this functionality out-of-the-box.
This work will pave the way for a smoother navigation restructuring that we plan to do later this year.
Engineering Notes
- Spike: determine we should use system SwiftUI navigation behavior or UIKit. A big component of this is whether embedded UIKit scroll views communicate properly up to the SwiftUI navigation bar. If not, we will need to use UIKit, as we won't have time to rewrite all existing views with SwiftUI.
- Deploy prototype of changes to get early feedback on design choices
- Spike on prototype branch and answer design questions: 1. Is it possible to remove the "stickyness" of hidden navigation bars on Explore and Article? 2. Is it possible to fade out navigation bar as it hides on Explore, Article, and Saved? 3. Is it possible to add sort capability to reading lists tab? 4. Can we bring back the old horizontally scrolling languages bar on Search?
Once design is good with final prototype answers, go through each of these screens and confirm all is working as expected. Push updates / bug fixes to prototype/system-nav-bar branch.
Easiest
- EditPreviewViewController - Remove custom navigation bar and ViewController superclass. Be sure preview still works in both the editor and image recommendations flow.
- DescriptionHelpViewController - Remove custom navigation bar and ViewController superclass.
- Notifications Center - Remove custom navigation bar and ViewController superclass from notifications center views (main list view and detail view). Ensure loading states and empty states look good. Navigation bar hiding upon scroll can be removed.
- On This Day list view controller - Remove custom navigation bar and ViewController superclass from on this day list view (which is pushed on from Explore feed).
- In the News list view controller - Remove custom navigation bar and ViewController superclass from on this day list view (which is pushed on from Explore feed).
- SinglePageWebViewController - Remove custom navigation bar and ViewController superclass.
- URL list view controller (ArticleURLListViewController) - Remove custom navigation bar and ViewController superclass from url list view (which is pushed on from Explore feed).
- Location list view controller (ArticleLocationCollectionViewController) - Remove custom navigation bar and ViewController superclass from url list view (which is pushed on from Explore feed). Ensure loading and empty state look good.
- Settings detail views - Remove custom navigation bar and ViewController superclass from settings detail views (e.g. Account, Explore feed settings, etc). Navigation bar hiding upon scroll can be removed.
Maybe difficult
Maybe difficult because this view navigates to our search view controller, which is in the final category and is one of our most reused view controllers.
- EditLinkViewController - Remove custom navigation bar and ViewController superclass. Be sure screen still works in both talk page and editor flow.
Slightly more difficult
This is a bit harder because the navigation bar needs to hide upon scroll. This is already happening in the prototype, but we need to put in additional work to ensure it doesn't get "stuck" in a hidden state. We should listen to the scroll view content offset and ensure when it is scrolled to the top, the navigation bar is always displayed.
- ArticleViewController - Remove custom navigation bar and ViewController superclass. Navigation bar will need to hide upon scroll.
- RandomArticleViewController - Remove custom navigation bar and ViewController superclass. Navigation bar will need to hide upon scroll.
Harder
Harder because these screens currently lean on the custom navigation bar's underbar view and extended view. We need to break these views out of the custom navigation bar and instead insert them as normal collection view cells or collection view header cells.
- AddArticlesToReadingListViewController - Remove custom navigation bar and ViewController superclass. Ensure empty state looks good.
- Talk Pages - Remove custom navigation bar and ViewController superclass from talk pages classes (including coffee roll and archives screens). Ensure loading states and empty states look good.
- Article History - Remove custom navigation bar and ViewController superclass from article history views. Ensure loading states and empty states look good.
- Diff - Remove custom navigation bar and ViewController superclass from diff views. Ensure loading states and empty states look good.
- Insert Media classes - Remove custom navigation bar and ViewController superclass from the Insert Media classes (flow after tapping editor > insert media button). Ensure loading states and empty states look good. Be sure screens still work in both the editor and image recommendations flows.
- ReadingListDetailViewController - Remove custom navigation bar and ViewController superclass. Ensure empty state looks good.
Hardest
Hardest because of the design dependencies. These screens will experience the most design changes so we are saving it till the end.
Then wrap up views that need to use the large display title and search scopes:
- History tab - Remove custom navigation bar and ViewController superclass. History will have system large title display type. Ensure empty states look good.
- Saved tab - Remove custom navigation bar and ViewController superclass. Use UISearchController to display search bar. Use search scopes to add "All articles" and "Reading list" tabbed options. Both sets of data should now be searchable and sortable. Use system large title display type. Ensure empty states look good.
- Places tab - Remove custom navigation bar and ViewController superclass Use UISearchController to display search bar. Use search scopes to add "Map" and "List" tabbed options. Ensure loading and and empty states look good.
These may need to be done in tandem because they heavily depend on each other:
- Search tab - Remove custom navigation bar and ViewController superclass. Use UISearchController to display search bar. Try to add custom languages picker bar back in, if that fails lean on search scopes to display language search options. Confirm loading and empty states look good. Confirm searching from Article > search navigation button looks good. Confirm searching from Editor > Add or Edit link looks good.
- Explore tab - Remove custom navigation bar and ViewController superclass. Use UISearchController to display search bar (note: this leans on SearchViewController from Search tab).
Background Information: Apps Debt
Known bugs
Add bugs here as we review, to be addressed during this work. If not addressed, create separate task
- Mis-alignment of "Tap to go back" tooltip on "W" home icon
- Check other Tooltips on custom nav items
- Check empty states / error states alignment
- Settings content goes underneath tab bar when Explore feed is disabled
- Swiping back from Image Recommendations causes weird full modal state.
- Can't swipe back from Notifications
- Tapping cancel from Insert Link shows blank screen, should automatically dismiss and go back to editor
- iPad article bounces (when TOC is closed) and causes swipe back to fail.
- Sometimes "Edit" on Reading Lists causes assertion failure
- Do an audit of all back buttons, confirm default handling for label exists, and some sort of title appears during long press.
- Audit and fix any unlocalized strings (flagged as todo in code)
- Opening username from Revision History crashes app
Design feedback Todo
- Finalize Done button styles / behavior on all screens (see https://phabricator.wikimedia.org/T363606#10417646)
- Update search field placeholders https://phabricator.wikimedia.org/T363606#10409759
- Use magnifying glass instead of "Search" for floating tab bar search button. https://phabricator.wikimedia.org/T363606#10405975
- Hide all main view headers upon scroll (like Explore and Article). https://phabricator.wikimedia.org/T363606#10409759
- Left align iPad Wikipedia logo on Explore https://phabricator.wikimedia.org/T363606#10409759
- Fix bottom background area on iPad OS 18 https://phabricator.wikimedia.org/T363606#10409759
- Align Places search label https://phabricator.wikimedia.org/T363606#10409759