Skip to content

Show the Account and settings button on every iPhone with no sites - #26216

Open
jkmassel wants to merge 2 commits into
trunkfrom
jkmassel/duo-no-sites-account-button
Open

jkmassel wants to merge 2 commits into
trunkfrom
jkmassel/duo-no-sites-account-button

Conversation

@jkmassel

@jkmassel jkmassel commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
  • Fixes CMM-2629: No way to reach account settings with no sites on a wide iPhone screen

Fixes the WordPress app hiding the "Account and settings" button on the no-sites screen on wide iPhone screens, which left no way to reach account settings or sign out.

One of ten fixes for wide and folding iPhone screens, together with #26207, #26208, #26209, #26210, #26211, #26212, #26213, #26214, #26215. None depends on another, so they can merge in any order.

Root cause

The WordPress app's reduced layout has no tab bar. Someone signed in there with no sites reaches their account through the "Account and settings" button on NoSitesView. The button is only shown at a compact width, on the assumption that a regular width means an iPad, where the sidebar links to the account. On the iPhone Duo's inner screen and on Plus and Pro Max models in landscape, there's no sidebar.

Fix

Hide the button only in an expanded split view, by asking the split view whether it's collapsed (splitViewController?.isCollapsed), the same check #26215 uses:

  • NoSitesView.swift: the SwiftUI view can't ask the split view, so a new NoSitesHostingController sets isInExpandedSplitView when the view appears and on layout. A size-class change callback runs before the split view collapses or expands, so it would still see the old isCollapsed. Both places that show NoSitesView use it.

iPad behaviour is unchanged: on iPad the no-sites view is the split view's detail column, whose size class matches the split view's.

Screenshots

iPhone 18 Pro Max in landscape, WordPress app, signed in with no sites:

Trunk This PR
Trunk: no Account and settings button This PR: Account and settings button at the bottom

iPad, WordPress app, signed in with no sites (trunk looks the same in both):

Full-screen window Narrow window
iPad full screen: split view, no button; the sidebar links to the account iPad narrow window: tab bar layout, Account and settings button shown

The account has sites, so every build had a temporary local change that hid them from My Site (not committed). The reduced layout was forced with "-ff-override-Jetpack Features Removal Phase Four" YES.

Test plan

  • In the WordPress app, sign in with an account that has no sites, rotate a Plus or Pro Max iPhone to landscape: the "Account and settings" button is there and opens the account screen. Checked on an iPhone 18 Pro Max simulator (iOS 27.0), portrait and landscape; on trunk the button is missing in landscape.
  • NoSitesHostingControllerTests: the button shows without a split view at either width, hides in an expanded split view, and comes back when the split view collapses.
  • iPad: with no sites, the button is hidden in a full-screen window and shown in a narrow one, and hidden again after widening. Checked on an iPad Pro 13-inch (M5) simulator (iOS 27.0), with the same result on trunk.
  • Re-checked all of the above in the app after rebasing onto trunk (c2aaff48e6): same results, and the screenshots above are unchanged.

@wpmobilebot

wpmobilebot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number35270
VersionPR #26216
Bundle IDorg.wordpress.alpha
Commitc2aaff4
Installation URL4pl8n3f8ejn8g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot

wpmobilebot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor
App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number35270
VersionPR #26216
Bundle IDcom.jetpack.alpha
Commitc2aaff4
Installation URL7qop3mrkpsj3g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@crazytonyli

Copy link
Copy Markdown
Contributor

This PR would have conflict with #26215

In the WordPress app's reduced layout there is no Me tab, and someone with no sites reaches their account through the "Account and settings" button. It was only shown at compact width, so on a regular-width iPhone screen there was no way to reach account settings or sign out.

Hide it only on iPad at regular width, where the sidebar links to the account.
Ask the split view whether it's collapsed instead of adding an `isPad()` check, matching the notification and My Site screens. `NoSitesView` can't read it, so a small hosting controller sets `isInExpandedSplitView` when the view appears and on layout. A trait change callback runs before the split view collapses or expands, so it would still see the old value.
@jkmassel
jkmassel force-pushed the jkmassel/duo-no-sites-account-button branch from 72233e9 to c2aaff4 Compare October 27, 2026 09:42
@jkmassel

Copy link
Copy Markdown
Contributor Author

This PR would have conflict with #26215

Should be sorted now, thanks!

@crazytonyli

Copy link
Copy Markdown
Contributor

I feel like there is other issue here. I think the tab bar should show up on regular width iPhone, like the iPhone 18 Pro landscape screenshot.

@wpmobilebot wpmobilebot modified the milestones: 27.5, 27.6 Nov 20, 2026
@wpmobilebot

Copy link
Copy Markdown
Contributor

Version 27.5 has now entered code-freeze, so the milestone of this PR has been updated to 27.6.

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.

3 participants