Skip to content

Share iPad navigation across window sizes - #26440

Draft
crazytonyli wants to merge 6 commits into
trunkfrom
task/adaptive-ipad-navigation
Draft

crazytonyli wants to merge 6 commits into
trunkfrom
task/adaptive-ipad-navigation

Conversation

@crazytonyli

@crazytonyli crazytonyli commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

Resizing an iPad window currently switches between separate navigation stacks. This PR keeps the same My Site, Reader, and Notifications screens and Back history as the window changes width.

WPTabBarController uses UIKit's .tabSidebar mode on iPhone and iPad. UIKit controls the tab bar and sidebar presentation. Each of these three destinations uses an adaptive UISplitViewController to retain its list and detail navigation controllers across width changes.

  • My Site keeps the dashboard beneath its detail screens. For example, open Stats in a wide window, resize to compact width, and tap Back to return to the dashboard. Dashboard quick actions appear when the site menu is hidden. Selecting another site starts that site's navigation afresh.
  • Reader preserves the feed beneath an article, including deep links and feeds that finish loading after navigation. Notifications retains its selected detail while resizing and clears the selection when returning to the compact list.
  • Tab visibility follows the retained detail after resizing. Navigation bars stay below top tabs, notices avoid unnecessary bottom spacing, and content split views hide their sidebar buttons to avoid duplicate controls.

Comparison screenshots

Jetpack on the same iPadOS 27.2 simulator in landscape, with a 1180 × 820 window. Before: PR base dbd0270fbd (task/native-tab-definitions). After: PR head 277a7e4e61.

Each pair uses the same screen, test site or feed, and scroll position. Click an image to view it at full size.

My Site Dashboard

Before After
Jetpack Dashboard on the PR base, with the site menu visible and app sidebar hidden. Jetpack Dashboard after this PR, with the site menu visible and app sidebar hidden.

Posts, Published filter

Before After
Jetpack Posts on the PR base, with the site menu visible and Published selected. Jetpack Posts after this PR, with the site menu visible and Published selected.

Reader, Recent feed

Before After
Jetpack Reader on the PR base, with the Reader menu beside the Recent feed. Jetpack Reader after this PR, with the Reader menu beside the Recent feed.

App sidebar open

Before After
Jetpack on the PR base with the custom app sidebar, site menu, and Dashboard visible. Jetpack after this PR, with the native app sidebar, site menu, and Dashboard visible.

What I ran

Automated verification used Xcode MCP with the WordPress scheme, WordPressUnitTests plan, and an iPadOS 26.2 simulator at 277a7e4e61.

Suite Passed Skipped
AdaptiveNavigationTests 10 0
AdaptiveReaderTests 4 1
MySitesNavigationTests 4 0
WPTabBarControllerTests 11 1
ReaderPresenterTests 5 0
ReaderSidebarSavedTests 5 0
RootViewCoordinatorTests 16 0

Result: 57 tests: 55 passed, 0 failed, 2 skipped, 0 expected failures, 0 not run. The two skipped tests require an iPhone.

All six commits built during verification.

Testing instructions

  1. In Jetpack, select a WordPress.com site. In a wide iPad window, open Dashboard → Stats, resize to compact width, and tap Back. Confirm the dashboard returns, its quick actions appear, and expanding the window hides those actions when the site menu is visible.
  2. Open a Reader article. Resize repeatedly and rotate, both with Reader selected and while another tab is selected. Return to Reader and navigate Back through the feed and list. Check the article is preserved and bottom tabs return at the appropriate screen.
  3. Open a notification detail and repeat the width and tab changes. Check the selection and Back navigation. Also test an empty notification list.
  4. Select another site. Confirm My Site starts at that site's home while Reader and Notifications keep their navigation state. Repeat applicable flows with a self-hosted site and in WordPress, including signing in and out.
  5. Test portrait and landscape on a regular iPhone, a large iPhone, and iPhone Duo. Check the native tab/sidebar presentation, sidebar reopening, compact Back navigation, and tab visibility on detail screens.
  6. Toggle the app sidebar and resize while each main tab is selected. Check navigation bars do not overlap top tabs, no duplicate sidebar buttons appear, and notices sit correctly above bottom tabs or near the bottom edge when tabs are at the top.

@crazytonyli
crazytonyli added this pull request to stack #26443 November 22, 2026 21:51
@dangermattic

dangermattic commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@crazytonyli crazytonyli changed the title task/adaptive ipad navigation Share iPad navigation across window sizes Nov 22, 2026
@crazytonyli
crazytonyli force-pushed the task/adaptive-ipad-navigation branch 2 times, most recently from 277a7e4 to d72515f Compare November 25, 2026 23:59
Base automatically changed from task/native-tab-definitions to trunk November 26, 2026 08:17
@crazytonyli
crazytonyli force-pushed the task/adaptive-ipad-navigation branch from d72515f to e6a2e42 Compare November 26, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants