[WOOMOB-2413] Hide push notifications benefit behind flag#15498
Conversation
654e118 to
20c35c5
Compare
There was a problem hiding this comment.
Pull request overview
This PR hides the “Push Notifications” benefit entry in the Jetpack installation benefits dialog when the WOO_PUSH_NOTIFICATIONS_SYSTEM_M2 feature flag is enabled, so users don’t see the legacy benefit messaging while the new push system is active.
Changes:
- Add a new
ViewStateboolean to control whether the Push Notifications benefit is shown. - Conditionally render the Push Notifications benefit entry in the Compose UI based on that state.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/jetpack/benefits/JetpackBenefitsViewModel.kt |
Introduces isPushNotificationsBenefitVisible into the screen state and initializes it from the feature flag. |
WooCommerce/src/main/kotlin/com/woocommerce/android/ui/jetpack/benefits/JetpackBenefitsScreen.kt |
Wraps the Push Notifications benefit UI in a conditional check and updates previews to include the new state. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...erce/src/main/kotlin/com/woocommerce/android/ui/jetpack/benefits/JetpackBenefitsViewModel.kt
Show resolved
Hide resolved
|
|
20c35c5 to
9f50342
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #15498 +/- ##
============================================
- Coverage 39.42% 39.41% -0.01%
+ Complexity 11149 11148 -1
============================================
Files 2247 2247
Lines 128805 128807 +2
Branches 17993 17994 +1
============================================
- Hits 50775 50772 -3
- Misses 72853 72856 +3
- Partials 5177 5179 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
AdamGrzybkowski
left a comment
There was a problem hiding this comment.
Works as described ![]()

Fixes WOOMOB-2413
Description
Hides the Push Notifications benefit from the Jetpack installation dialog when the WOO_PUSH_NOTIFICATIONS_SYSTEM_M2 feature flag is enabled. This ensures users do not see the benefit if the new push notification system is active.
Note
I didn't add a unit test for the new behavior because it'll require creating a new use case wrapping the WOO_PUSH_NOTIFICATIONS_SYSTEM_M2 feature flag logic, and given there is already some pending work to make feature flags testable without the use cases (#15299), I decided it's not worth to cause more divergence.
Test Steps
Images/gif