Skip to content

Conversation

@jaclync
Copy link
Contributor

@jaclync jaclync commented Sep 22, 2025

Part of WOOMOB-1316

Just one review is required.

Description

The custom Menu tab "dot" badge causes a crash due to the UITabBar view hierarchy changes when Liquid Glass design is enabled in iOS 26+ (more details in p91TBi-dvw-p2). This PR replaces the fragile custom tab dot implementation with native iOS tab bar badge to fix the crash while maintaining the notification UI on the Menu tab. The change is gated behind a local feature flag (liquidGlassDesign) so that tab dot UI remains available while Liquid Glass design is still disabled in production.

The native badge uses a simple dot character ("•") to replicate the tab dot as best as it can. The native tab badge design was confirmed in p91TBi-dvw-p2#comment-14429.

Steps to reproduce

Prerequisites: In Info.plist, remove UIDesignRequiresCompatibility entry like in 417ae75 to ensure Liquid Glass is enabled. Also, manually enable the tab dot in the Menu tab by replacing this line to if true:

  1. Launch the app --> the app should not crash, and the Menu tab dot is now replaced by a native badge with a dot
  2. Test on iOS 26 and below

Testing information

I tested the following scenarios:

  • With feature flag OFF + Liquid Glass disabled in iOS 26: custom tab dot should appear as before
  • With feature flag ON + Liquid Glass disabled in iOS 26: native tab badge should appear
  • With feature flag OFF + Liquid Glass enabled in iOS 26: crash
  • With feature flag ON + Liquid Glass enabled in iOS 26: native tab badge should appear on Liquid Glass tab bar
  • With feature flag ON + Liquid Glass enabled in iOS 18.4: native tab badge should appear on legacy tab bar

Screenshots

Before: Custom dot implementation

dark light
Simulator Screenshot - iPad Air 11-inch (M3) - 2025-10-08 at 21 40 09 Simulator Screenshot - iPad Air 11-inch (M3) - 2025-10-08 at 21 41 45

After: Native tab badge implementation

Liquid Glass disabled - iOS 26 Liquid Glass enabled - iOS 26 Liquid Glass enabled - iOS 18.4
Simulator Screenshot - iPad Air 11-inch (M3) - 2025-10-08 at 21 36 08 Simulator Screenshot - iPad Air 11-inch (M3) - 2025-10-08 at 21 45 57 Simulator Screenshot - iPad (A16) - 2025-10-08 at 21 50 39

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@jaclync jaclync added type: task An internally driven task. status: feature-flagged Behind a feature flag. Milestone is not strongly held. labels Sep 22, 2025
@jaclync jaclync added this to the 23.4 milestone Sep 22, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 22, 2025

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16161-d968d88
Version23.4
Bundle IDcom.automattic.alpha.woocommerce
Commitd968d88
Installation URL7siu6q2ago5t0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@jaclync jaclync changed the title Replace custom tab dot with native tab badge under feature flag [iOS 26] Fix crash from custom tab dot when Liquid Glass design is enabled Sep 23, 2025
@staskus staskus modified the milestones: 23.4, 23.5 Oct 3, 2025
@jaclync jaclync changed the title [iOS 26] Fix crash from custom tab dot when Liquid Glass design is enabled [iOS 26] Replace custom tab dot with native tab badge when Liquid Glass design is enabled Oct 8, 2025
@jaclync jaclync requested review from joshheald and staskus October 8, 2025 13:54
@staskus staskus self-assigned this Oct 9, 2025
Copy link
Contributor

@staskus staskus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it all works.

I tested with iPad Air M2 26.0 device and iOS 18.5 simulator for safety. Also tested multiple combinations with different flags/enabled disabled validating my feature flag suggestion.

case .ciabBookings:
return buildConfig == .localDeveloper || buildConfig == .alpha
case .liquidGlassDesign:
return buildConfig == .localDeveloper || buildConfig == .alpha
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest having something a bit different logic from a normal feature flag.

Suggested change
return buildConfig == .localDeveloper || buildConfig == .alpha
let requiresCompatibility = Bundle.main.infoDictionary?["UIDesignRequiresCompatibility"] as? Bool ?? false
let isIOS26OrHigher = ProcessInfo.processInfo.operatingSystemVersion.majorVersion >= 26
return !requiresCompatibility && isIOS26OrHigher

Since we already have a flag within the Info.plist that will enable Liquid Glass, I think at that point we will want to have our changes such as this enabled as well, otherwise the app could crash in production if we keep it as buildConfig == .localDeveloper || buildConfig == .alpha.

With the updated logic, our liquid glass design changes will only be enabled if:

  • UIDesignRequiresCompatibility flag doesn't exist or is set on NO
  • User is on iOS 26 or higher version. We don't want our new badges to be shown to users who are on iOS 18.5 even if we enable liquid glass for iOS 26 users.

Wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. Originally, I used a local feature flag so that it's more obvious that the code can be removed once the Liquid Glass design is launched. However, it does rely on a strict sync with the removal of the Info.plist entry, which cannot be guaranteed if some miscommunication happens. I made an update in d968d88 to replace the feature flag check with the Info.plist check as you suggested.

Regarding the iOS 26+ check, I'm leaving it out so that the native tab badge is applied to all iOS versions once the Liquid Glass design is enabled. iOS version adoption is usually pretty fast, and I don't think showing the native tab badge design causes critical UI/UX issues. We can remove the legacy fragile code sooner.

# Conflicts:
#	Modules/Sources/Experiments/DefaultFeatureFlagService.swift
#	Modules/Sources/Experiments/FeatureFlag.swift
@jaclync
Copy link
Contributor Author

jaclync commented Oct 13, 2025

Thanks for testing & review Povilas, I responded to your comment, updated the PR, and tested on iOS 26 and iOS 18.5 with and without the Info.plist entry. Please lemme know if you have any questions/concerns about the change.

Copy link
Contributor

@staskus staskus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates!

@jaclync jaclync merged commit ffa4ef6 into trunk Oct 14, 2025
13 checks passed
@jaclync jaclync deleted the backlog/WOOMOB-1223-ios26-tabbar-badge-fix branch October 14, 2025 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: feature-flagged Behind a feature flag. Milestone is not strongly held. type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants