Skip to content

Remove the Jetpack features removal phases no one can reach - #26281

Merged
jkmassel merged 1 commit into
trunkfrom
jkmassel/remove-unreachable-jetpack-phases
Oct 30, 2026
Merged

jkmassel merged 1 commit into
trunkfrom
jkmassel/remove-unreachable-jetpack-phases

Conversation

@jkmassel

@jkmassel jkmassel commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Deletes the Jetpack features removal phases that no one can reach after #26280. Stacked on #26280. No behaviour change.

Summary

After #26280 the phase is fixed, so GeneralPhase only ever takes normal, selfHosted or staticScreens, and SiteCreationPhase only normal or two. This deletes the other phases and everything that only they used.

Changes

  • GeneralPhase: removes .one, .two, .three, .four and .newUsers, plus frequencyConfig (every remaining phase used the default). SiteCreationPhase: removes .one.
  • JetpackFullscreenOverlayGeneralViewModel: keeps the self-hosted copy and the feature-specific animations and button titles. Phase one to four and new-users copy is gone, along with the removal-deadline subtitle and the blog post links.
  • JetpackNewUsersOverlaySecondaryView: deleted; only the new-users overlay showed it.
  • JetpackOverlaySource.phaseFourOverlay and the phase-four branch in MySiteViewController are gone; My Site always uses .appOpen.
  • JetpackBrandingTextProvider: always returns "Jetpack powered". Static screens and normal phases both used that text, and the "moving soon" / "moving in N days" text was phase three only. The screen: argument is gone, so the nine callers change by one line each.
  • JetpackBrandingMenuCardPresenter: only the self-hosted card is left. shouldShowBottomCard() could never return true, so it and the bottom card section in BlogDetailsTableViewModel are removed. The unused remoteConfigStore parameter is gone too.
  • JetpackBrandingCoordinator.shouldShowBannerForJetpackDependentFeatures() is now phase == .staticScreens.
  • RemoteConfigParameter: removes jetpackDeadline, phaseFourOverlayFrequency and the five phase…BlogPostUrl parameters. removalDeadline() goes with them: no remaining phase shows the deadline. phaseNewUsersBlogPostUrl and phaseSelfHostedBlogPostUrl were already unused on trunk.
  • Strings for the deleted phases are removed at their NSLocalizedString call sites only. Localizable.strings is regenerated at release time. The self-hosted menu card keeps its jetpack.menuCard.newUsers.title key so existing translations still apply.

currentAppUIType and the "based on current phase" fallbacks still have a job: the phase changes at runtime when someone signs in to or out of WordPress.com (.selfHosted ↔ .staticScreens), and reloadUIIfNeeded relies on that. They are unchanged apart from simpler switches.

Left for a follow-up

  • JetpackBrandingMenuCardCell still lays out a .compact card type that nothing creates now.
  • JetpackBrandedScreen.featureName and isPlural only fed the phase three badge text and are now unused.

Formatting

Only the two overlay view models were run through swift-format, since most of their lines changed. The other touched files still had formatting drift on trunk; this PR adds none, and reformatting them would bury the real change.

Test plan

  • Unit tests: full WordPressUnitTests plan on an iPhone 17 Pro (iOS 27.0) simulator — 4,173 passed, 0 failed, 5 skipped
  • SwiftLint clean on every touched file
  • JetpackBrandingMenuCardPresenterTests rewritten around the self-hosted card; JetpackBrandingTextProviderTests deleted (the text is a constant); the negative-frequency OverlayFrequencyTrackerTests case now uses the .stats source
  • Simulator (iPhone 18 Pro, iOS 27.0), WordPress app: self-hosted sign-in shows the simplified UI; signing in to WordPress.com switches to static screens (Reader poster); site creation with an existing site shows the Jetpack overlay
  • Before/after on simulators (iPhone 18 Pro, iOS 27.0), trunk vs this PR, for every screen this PR touches: the self-hosted Jetpack menu card and its overlay, the static-screens posters, the "Jetpack powered" badges and banner, both site creation paths, and the Jetpack app. All 15 pairs are pixel-identical below the status bar.
Trunk vs this PR screenshots
Trunk #26281
WordPress app, self-hosted site with Jetpack: menu card Trunk: WordPress app, self-hosted site with Jetpack: menu card #26281: WordPress app, self-hosted site with Jetpack: menu card
…menu card → Learn more overlay Trunk: …menu card → Learn more overlay #26281: …menu card → Learn more overlay
Static screens: My Site Trunk: Static screens: My Site #26281: Static screens: My Site
Static screens: Reader poster Trunk: Static screens: Reader poster #26281: Static screens: Reader poster
Static screens: Notifications poster Trunk: Static screens: Notifications poster #26281: Static screens: Notifications poster
Static screens: Me, "Jetpack powered" badge Trunk: Static screens: Me, 'Jetpack powered' badge #26281: Static screens: Me, 'Jetpack powered' badge
Static screens: App Settings badge Trunk: Static screens: App Settings badge #26281: Static screens: App Settings badge
Static screens: WordPress.com site menu Trunk: Static screens: WordPress.com site menu #26281: Static screens: WordPress.com site menu
Static screens: Menus banner Trunk: Static screens: Menus banner #26281: Static screens: Menus banner
Site creation with sites: Jetpack overlay Trunk: Site creation with sites: Jetpack overlay #26281: Site creation with sites: Jetpack overlay
WordPress.com account with no sites Trunk: WordPress.com account with no sites #26281: WordPress.com account with no sites
…then Create WordPress.com site Trunk: …then Create WordPress.com site #26281: …then Create WordPress.com site
Jetpack app, self-hosted sign-in Trunk: Jetpack app, self-hosted sign-in #26281: Jetpack app, self-hosted sign-in
Jetpack app, Reader Trunk: Jetpack app, Reader #26281: Jetpack app, Reader
Jetpack app, site creation Trunk: Jetpack app, site creation #26281: Jetpack app, site creation

The self-hosted site is a local WordPress that reports a connected Jetpack through wp.getOptions. On first launch this PR also showed the app-open overlay (screenshot); trunk shows the same overlay from the menu card above. The Reader screenshots are cropped to hide followed P2 names. On both builds the Menus banner sits under the tab bar; that's pre-existing.

@jkmassel jkmassel added this to the 27.5 milestone Oct 29, 2026
@jkmassel jkmassel self-assigned this Oct 29, 2026
@dangermattic

dangermattic commented Oct 29, 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.

Generated by 🚫 Danger

@jkmassel
jkmassel marked this pull request as ready for review October 29, 2026 04:27
@jkmassel
jkmassel requested a review from crazytonyli October 29, 2026 04:27
@jkmassel
jkmassel added this pull request to stack #26292 October 29, 2026 04:27
@jkmassel
jkmassel force-pushed the jkmassel/remove-unreachable-jetpack-phases branch from 05999c7 to 5e6f21a Compare October 29, 2026 21:26
Base automatically changed from jkmassel/remove-jetpack-removal-flags to trunk October 29, 2026 23:07
With the phase now fixed, only `normal`, `selfHosted` and
`staticScreens` can happen. This deletes phases one to four and
new users, plus everything that only they used: per-phase overlay
copy and frequencies, the removal deadline, the phase four overlay,
the bottom menu card, the "moving soon" badge text, and the remote
config parameters behind them.
@jkmassel
jkmassel force-pushed the jkmassel/remove-unreachable-jetpack-phases branch from 5e6f21a to 87bdc5f Compare October 29, 2026 23:07
@jkmassel
jkmassel added this pull request to the merge queue Oct 30, 2026
Merged via the queue into trunk with commit 23dc555 Oct 30, 2026
21 checks passed
@jkmassel
jkmassel deleted the jkmassel/remove-unreachable-jetpack-phases branch October 30, 2026 02:57
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