-
Notifications
You must be signed in to change notification settings - Fork 121
[iOS 26] Replace custom tab dot with native tab badge when Liquid Glass design is enabled #16161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
# Conflicts: # WooCommerce/Classes/ViewRelated/MainTabBarController.swift
staskus
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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.
| 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:
UIDesignRequiresCompatibilityflag doesn't exist or is set onNO- 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?
There was a problem hiding this comment.
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
…e with Info.plist check.
|
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. |
staskus
left a comment
There was a problem hiding this 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!

Part of WOOMOB-1316
Just one review is required.
Description
The custom Menu tab "dot" badge causes a crash due to the
UITabBarview 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
UIDesignRequiresCompatibilityentry like in 417ae75 to ensure Liquid Glass is enabled. Also, manually enable the tab dot in the Menu tab by replacing this line toif true:woocommerce-ios/WooCommerce/Classes/ViewModels/MainTabViewModel.swift
Line 223 in 10ec6fc
Testing information
I tested the following scenarios:
Screenshots
Before: Custom dot implementation
After: Native tab badge implementation
RELEASE-NOTES.txtif necessary.