Background
See Epic: T384758: [Epic] Add Tabbed Browsing to the iOS App (Tabs)
Requirements
- Tapping the Tabs icon opens the Tabs overview
- "Done" takes them back to where they were when they opened the Tabs overview
- The minimum amount of tabs is 1 (see how this looks here). If no article has been searched yet, the tab contains the main page.
- The close button for the last remaining tab should be hidden. Users cannot close the last tab.
- Sort tabs by date created, with the most recent at the bottom
- Show all open tabs in the overview
- Show number of open tabs
- New tab entry point (new tab flow to be built in separate task)
- Users can close individual tabs
- Allow users to have Tabs open in multiple languages
- Allow duplicate tabs of the same article
- Filter out non-article detours (talk pages, article history, files), if someone left one of these page, show the last visited article in the Tab
- Support for landscape and iPad
Will be built in separate tasks
Nice to haves, will be built in separate tasks
- Overflow menu (don't add entry point yet)
- Long-press on tab in overview (don't add entry point yet)
iPhone Designs
- Tab items have an aspect ration of 3:4 (portrait)
iPad/Landscape designs
- Tabs should responsively scale based on available space.
- Type and spacing within a “tabs-card” remain the same as an iPhone (font-sizes, top and bottom paddings, etc.).
- iPad and iPhone landscape designs use the entire width and height of the screen.
- iPad Portrait should feature at least 4 tabs in a row.
- iPad and iPhone Landscape and iPhone should feature at least 5 tabs in a row.
Engineering Notes
- [5] T392921 - Modify blank screen created in https://phabricator.wikimedia.org/T390991 to show SwiftUI grid of tabs. Base the number of tabs to display from Tabs Data Controller (which will already have logic to pull tabs from Core Data, that work will be done in T391002).
- If tab indicates there are no articles, instead display a grid item with the "main page" UI.
- Otherwise, display UI of top article summary.
- To pull individual article summary information, call the fetchAllArticleTabs method from the data controller created in T392918. If T392918 is not ready yet, just display mock article UI temporarily.
- Ensure number of tabs lay out well on all device sizes (landscape and iPad), and grid items can handle limited article data (no image, no article description).
- [2] T392922 - Update navigation bar title in tabs overview to reflect the number of tabs.
- [3] T392923 - Add individual X button to tabs, delete tab via data controller when pressed (delete method in data controller will be created in T391002). Ensure tab grid item hides after deleting. Note that we should NOT allow deleting of the last tab item, because we always want at least one currently active tab. Ensure the X button hides when there is only one tab item.
- [1] T392924 - Tab sorting: Ensure tab sorting works as expected. Tabs should be sorted via date created, descending (so the more recent tabs appear at the bottom). The tab date created should already be persisted in the WMFTab Core Data entity.
- [3] T392925 - Upon opening of tabs overview, automatically scroll to current tab (the items returned from the data controller will indicate what the current tab is. That work will be done in T391002).









