Skip to content

Remove the compact Jetpack menu card and unused branded screen properties - #26311

Draft
jkmassel wants to merge 2 commits into
trunkfrom
jkmassel/remove-jetpack-branding-dead-code
Draft

jkmassel wants to merge 2 commits into
trunkfrom
jkmassel/remove-jetpack-branding-dead-code

Conversation

@jkmassel

Copy link
Copy Markdown
Contributor

Removes two pieces of Jetpack branding code that can no longer run since #26281 deleted the unreachable removal phases. Users see no change.

Changes

  • Compact menu card: only phase four used it, so cardConfig() now only ever returns the expanded card. Removes Config.CardType, the seven switch properties in JetpackBrandingMenuCardCell, Metrics.Compact, and the compact-only views and strings. Metrics.Expanded is now just Metrics.
  • JetpackBrandedScreen: featureName and isPlural only built the phase three badge text. With both gone the protocol is empty, so it goes too. JetpackBannerScreen and JetpackBadgeScreen stay, because their raw values are the screen analytics property.
  • BlogDashboardCardFrameView.removeButtonContainerStackView(): the compact card was its only caller.

The "Activity", "Menus" and "Sharing" strings no longer have an NSLocalizedString call using them as a key. Localizable.strings is generated at release time, so this PR doesn't edit it.

The second commit only runs swift-format on the two files that weren't formatted yet. Review the first commit for the actual change.

Test plan

  • JetpackBrandingMenuCardPresenterTests and JetpackBrandingVisibilityTests on an iPhone 18 Pro (iOS 27.0) simulator: 8 tests, 0 failures. The full suite was not run locally; CI covers it.
  • The card renders identically to trunk. A temporary test, not committed, rendered the real cell in a table view on both builds, in light mode, dark mode and an accessibility text size. All three PNGs are byte-identical to trunk's, and so is a dump of the view tree (frames, fonts, colours, stack settings, and the "Remind me later" and "Hide this" menu items).
  • swift-format and SwiftLint clean on every touched file
  • Tapping "Learn more" and the … menu items on a device or simulator: not done. This PR doesn't change that code, and the menu items are covered by the view tree comparison above.

…ties

The compact card was only used in phase four, and featureName and
isPlural only built the phase three badge text. Both phases are gone,
so this code can no longer run.
@jkmassel jkmassel added this to the 27.5 milestone Oct 30, 2026
@jkmassel jkmassel self-assigned this Oct 30, 2026
@dangermattic

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.
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