Skip to content

Keep the iPad Reader and Notifications behind the Jetpack features removal - #26302

Draft
jkmassel wants to merge 1 commit into
jkmassel/wptabbarcontroller-build-tabs-oncefrom
jkmassel/ipad-tab-bar-follows-app-ui-type
Draft

jkmassel wants to merge 1 commit into
jkmassel/wptabbarcontroller-build-tabs-oncefrom
jkmassel/ipad-tab-bar-follows-app-ui-type

Conversation

@jkmassel

@jkmassel jkmassel commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Fixes the iPad split view so the Reader and Notifications follow the same Jetpack features removal rules as the iPhone. Before this change, narrowing the window, or opening some app URLs, got around the feature flags. Stacked on #26301.

Summary

In the WordPress app on iPad, these places showed the live Reader or Notifications where the iPhone shows the Moved-to-Jetpack poster:

Where Before After
Narrow window (compact tab bar), static screens or simplified UI Live Reader and live Notifications Posters
Narrow window, static screens with Reader Live Reader, Notifications poster Unchanged
Wide window, showReader(path:) without the Reader (e.g. a viewpost app URL or Spotlight) Opened the live Reader, though the sidebar has no Reader row Reader poster as a sheet
Wide window, showNotificationsTab in static screens or simplified UI Opened the live list, though the sidebar has no Notifications row Notifications poster as a sheet (already the case for static screens with Reader)
Sidebar restoring a saved Reader selection Restored it even when the Reader is off Restores it only when the Reader is available

Jetpack is unchanged: its app UI type is always normal.

Reader links (/read/...) were not a way around the flag. UniversalLinkRouter already blocks Jetpack-powered routes in static screens. Two callers skip the router, though: viewpost app URLs and Spotlight.

Root Cause

SplitViewRootPresenter created its compact tab bar with staticReader: false. It only showed the Notifications poster for staticScreensWithReader. A comment called this pre-existing and "kept as is". Its showReader and showNotificationsTab only checked for staticScreensWithReader.

Changes

  • SplitViewRootPresenter.swift: the compact tab bar, appUITypeDidChange(), showReader(path:) and showNotificationsTab all use JetpackFeaturesRemovalCoordinator.isReaderAvailable() and jetpackFeaturesEnabled(), the same checks the rest of the app uses. The Notifications poster sheet now also shows the Reader poster.
  • SidebarViewModel.swift: resetSelection() only restores a saved Reader selection when isReaderAvailable().
  • WPTabBarController: shouldUseStaticReader is settable. Like shouldUseStaticNotifications, it replaces only the Reader tab's first screen (Build the tab bar's tabs once #26301).

Test plan

  • New and updated tests in RootViewCoordinatorTests:
    • the compact tab bar for each app UI type
    • switching from normal to staticScreens, and from static screens with Reader to simplified, keeps the tabs and the selected tab
    • wide showReader and showNotificationsTab in static screens present the poster
    • wide showReader with Reader selects the Reader
    • the sidebar doesn't restore an unavailable Reader
    • shouldUseStaticReader swaps the first screen both ways
  • Six new behaviour tests fail on the parent commit, every time across three retries: Executed 40 tests, with 63 failures. The setter test can't compile there.
  • RootViewCoordinatorTests, NotificationsViewControllerTests and MovedToJetpackViewModelTests pass, with no skips: Executed 48 tests, with 0 failures and Test run with 2 tests in 1 suite passed.
  • iPad Pro 13-inch (M5) iOS 27.0 simulator, WordPress app, first session after a fresh install. The remote Reader flag isn't cached yet, so the app runs as staticScreens:
    • narrow window: the Reader and Notifications tabs show posters
    • wide window, wpdebug://viewpost?blogId=…&postId=…: the Reader poster sheet opens, and the live Reader does not
    • a /read/discover link still shows the router's Jetpack overlay, as before
  • Same simulator after a relaunch, with the flag cached (staticScreensWithReader): the narrow Reader is live and Notifications shows the poster. The same viewpost URL opens the live Reader post in the wide layout.
  • Jetpack on the same simulator, signed in to WordPress.com (normal): the compact tab bar has the live Reader and the live list.
Narrow, Reader Narrow, Notifications Wide, viewpost URL
Narrow iPad window, Reader tab showing the Moved-to-Jetpack poster Narrow iPad window, Notifications tab showing the Moved-to-Jetpack poster Wide iPad window, Reader poster sheet opened by a viewpost URL

Not tried: a physical device, and Spotlight results. Spotlight calls the same showReader(path:) as viewpost, which is covered above and by the tests.

Related issues

  • Follow-up to Build the tab bar's tabs once #26301. Found while testing it.
  • Separate, still to do: the Reader flag is read once per launch, so a fresh install's first session runs as staticScreens even after the flag arrives.

…l phases

On iPad the split view showed the live Reader and Notifications in places the
iPhone shows the Moved-to-Jetpack poster:

- the compact tab bar, shown when the window is narrow, always had a live
  Reader, and a live Notifications list outside staticScreensWithReader
- in the wide layout, Reader links selected the live Reader even when the
  sidebar has no Reader row
- in the wide layout, Notifications entrances selected the live list in
  static screens and the simplified UI
- the sidebar restored a saved Reader selection without checking whether the
  Reader is available

Narrowing the window or opening a link got around the feature flags. The
split view now follows the same rules as the iPhone: the Reader is live when
isReaderAvailable() and Notifications when jetpackFeaturesEnabled(); otherwise
they show the poster, as a tab or a sheet. WPTabBarController's
shouldUseStaticReader is settable so appUITypeDidChange can update both tabs.
@jkmassel jkmassel added this to the 27.5 milestone Oct 29, 2026
@jkmassel jkmassel self-assigned this Oct 29, 2026
@dangermattic

Copy link
Copy Markdown
Collaborator
1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants