-
Notifications
You must be signed in to change notification settings - Fork 929
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
Update Settings: Address Ppro Issues #5460
Conversation
We need these in the netp module ideally all feature Strings would be a Product when getting them from the DataStore but that is too many changes for this task
we'll do everything in the NetP ViewModel so we can put this back to how it was prior to changes for the new settings screen
moving handleRevokedVPNState just to ensure we're disabling the VPN as we don't use NetworkProtectionAccessState in the new settings flow, which in the legacy world would take care of this we allow the clickListener to be set to null to stop click handling if states happen to change while on the settings screen, I've forgotten why setting clickable to false is not enough
Now we're handling this in the VM it's no longer needed
we were missing making settings visible in some cases, which is prominent when doing the subscription flows on device rather than just switching states and launching the app via IDE
7f405c6
to
ae1e2c2
Compare
val subscription = authRepository.getSubscription() | ||
|
||
return if(subscription != null) { | ||
authRepository.getFeatures(subscription.productId) |
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 think we shouldn't ignore the existing kill switch for features api - see how it is used in getSubscriptionOffer()
method. Maybe we can extract that logic from there.
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.
@lmac012 changes made here: e61c867
(#5460)
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.
works as expected, nice work @mikescamell !
Task/Issue URL: https://app.asana.com/0/1207908166761516/1209138029097313/f ### Description Address Ship Review comments regarding not being able to see Ppro settings items when subscriptions expired. It was necessary to consider available Products ([you may see these referred to as "features" internally in the subscription module](https://app.asana.com/0/414730916066338/1209117572597478/f)) when a user's subscription has expired or they are in a waiting state, as their entitlements would end up being empty. Now we know what Products are available to the user, we can display them correctly in their disabled state to match the new Settings design. ### Steps to test this PR Prerequisite: `newSettings` feature flag is enabled Follow these [instructions](https://app.asana.com/0/1142021229838617/1208861246073828/f) to install Play Billing Lab so you can test US and ROW subscription plans **US** Prerequisite: Country/Region is set to US in Play Billing Lab _New Settings Top Level_ - [x] Open Settings screen - [x] Verify items displayed match design Not Subscribed state _Subscribed State_ - [ ] Tap "Get Privacy Pro" - [ ] Purchase Ppro monthly - [ ] One Purchase is completed return to top level settings screen - [ ] Verify VPN, PIR, ITR and Settings items are displayed, matching design Subscribed state - [ ] Turn on VPN - [ ] Return to top level settings screen - [ ] Ensure VPN status indicator is on - [ ] Turn VPN off - [ ] Return to top level settings screen - [ ] Ensure VPN status is off _Expired State_ - [ ] Tap "Subscription Settings" - [ ] Click "Update Plan or Cancel" item - [ ] Cancel the Subscription - [ ] Wait 5 mins - [ ] Return to top level settings screen - [ ] Verify VPN, PIR, ITR are in a disabled state like designs - [ ] Verify VPN, PIR, ITR are not clickable - [ ] Verify Settings item is in expired state _Remove subscription_ - [ ] Re-purchase Ppro - [ ] From the Subscription Settings screen click "Remove From this Device" - [ ] Return to top level settings screen - [ ] Verify you're in the Not Subscribed state _Activating State_ Prerequisite: Apply patch in [task](https://app.asana.com/0/1207908166761516/1209138029097313/f) as this is hard to reproduce via device - [ ] Apply patch - [ ] Open settings - [ ] Verify Ppro is in Activating state like designs - [ ] Verify VPN, PIR, ITR are not clickable - [ ] Re-purchase Ppro - [ ] From the Subscription Settings screen click "Remove From this Device" - [ ] Return to top level settings screen - [ ] Verify you're in the Not Subscribed state **ROW** Prerequisite: Country/Region is set to UK in Play Billing Lab _New Settings Top Level_ - [ ] Open Settings screen - [ ] Verify items displayed match design Not Subscribed state _Subscribed State_ - [ ] Tap "Get Privacy Pro" - [ ] Purchase Ppro monthly - [ ] One Purchase is completed return to top level settings screen - [ ] Verify only VPN, ITR and Settings items are displayed and match design Subscribed state - [ ] Turn on VPN - [ ] Return to top level settings screen - [ ] Ensure VPN status indicator is on - [ ] Turn VPN off - [ ] Return to top level settings screen - [ ] Ensure VPN status is off _Expired State_ - [ ] Tap "Subscription Settings" - [ ] Click "Update Plan or Cancel" item - [ ] Cancel the Subscription - [ ] Wait 5 mins - [ ] Return to top level settings screen - [ ] Verify only VPN, ITR are in a disabled state like designs - [ ] Verify VPN, ITR are not clickable - [ ] Verify Settings item is in expired state _Remove subscription_ - [ ] Re-purchase Ppro - [ ] From the Subscription Settings screen click "Remove From this Device" - [ ] Return to top level settings screen - [ ] Verify you're in the Not Subscribed state ### UI changes No UI changes but it's helpful to see the [designs](https://www.figma.com/design/CjH849hL53lhsPlf6Ufeo4/%E2%9A%99%EF%B8%8F-Browser-Settings-Documentation-(All-Platforms)?node-id=7605-431390&t=RdmuNULWUyR1cMH7-4) to remember our new states
Task/Issue URL: https://app.asana.com/0/1207908166761516/1209138029097313/f Address Ship Review comments regarding not being able to see Ppro settings items when subscriptions expired. It was necessary to consider available Products ([you may see these referred to as "features" internally in the subscription module](https://app.asana.com/0/414730916066338/1209117572597478/f)) when a user's subscription has expired or they are in a waiting state, as their entitlements would end up being empty. Now we know what Products are available to the user, we can display them correctly in their disabled state to match the new Settings design. Prerequisite: `newSettings` feature flag is enabled Follow these [instructions](https://app.asana.com/0/1142021229838617/1208861246073828/f) to install Play Billing Lab so you can test US and ROW subscription plans **US** Prerequisite: Country/Region is set to US in Play Billing Lab _New Settings Top Level_ - [x] Open Settings screen - [x] Verify items displayed match design Not Subscribed state _Subscribed State_ - [ ] Tap "Get Privacy Pro" - [ ] Purchase Ppro monthly - [ ] One Purchase is completed return to top level settings screen - [ ] Verify VPN, PIR, ITR and Settings items are displayed, matching design Subscribed state - [ ] Turn on VPN - [ ] Return to top level settings screen - [ ] Ensure VPN status indicator is on - [ ] Turn VPN off - [ ] Return to top level settings screen - [ ] Ensure VPN status is off _Expired State_ - [ ] Tap "Subscription Settings" - [ ] Click "Update Plan or Cancel" item - [ ] Cancel the Subscription - [ ] Wait 5 mins - [ ] Return to top level settings screen - [ ] Verify VPN, PIR, ITR are in a disabled state like designs - [ ] Verify VPN, PIR, ITR are not clickable - [ ] Verify Settings item is in expired state _Remove subscription_ - [ ] Re-purchase Ppro - [ ] From the Subscription Settings screen click "Remove From this Device" - [ ] Return to top level settings screen - [ ] Verify you're in the Not Subscribed state _Activating State_ Prerequisite: Apply patch in [task](https://app.asana.com/0/1207908166761516/1209138029097313/f) as this is hard to reproduce via device - [ ] Apply patch - [ ] Open settings - [ ] Verify Ppro is in Activating state like designs - [ ] Verify VPN, PIR, ITR are not clickable - [ ] Re-purchase Ppro - [ ] From the Subscription Settings screen click "Remove From this Device" - [ ] Return to top level settings screen - [ ] Verify you're in the Not Subscribed state **ROW** Prerequisite: Country/Region is set to UK in Play Billing Lab _New Settings Top Level_ - [ ] Open Settings screen - [ ] Verify items displayed match design Not Subscribed state _Subscribed State_ - [ ] Tap "Get Privacy Pro" - [ ] Purchase Ppro monthly - [ ] One Purchase is completed return to top level settings screen - [ ] Verify only VPN, ITR and Settings items are displayed and match design Subscribed state - [ ] Turn on VPN - [ ] Return to top level settings screen - [ ] Ensure VPN status indicator is on - [ ] Turn VPN off - [ ] Return to top level settings screen - [ ] Ensure VPN status is off _Expired State_ - [ ] Tap "Subscription Settings" - [ ] Click "Update Plan or Cancel" item - [ ] Cancel the Subscription - [ ] Wait 5 mins - [ ] Return to top level settings screen - [ ] Verify only VPN, ITR are in a disabled state like designs - [ ] Verify VPN, ITR are not clickable - [ ] Verify Settings item is in expired state _Remove subscription_ - [ ] Re-purchase Ppro - [ ] From the Subscription Settings screen click "Remove From this Device" - [ ] Return to top level settings screen - [ ] Verify you're in the Not Subscribed state No UI changes but it's helpful to see the [designs](https://www.figma.com/design/CjH849hL53lhsPlf6Ufeo4/%E2%9A%99%EF%B8%8F-Browser-Settings-Documentation-(All-Platforms)?node-id=7605-431390&t=RdmuNULWUyR1cMH7-4) to remember our new states
Task/Issue URL: https://app.asana.com/0/1207908166761516/1209138029097313/f
Description
Address Ship Review comments regarding not being able to see Ppro settings items when subscriptions expired.
It was necessary to consider available Products (you may see these referred to as "features" internally in the subscription module) when a user's subscription has expired or they are in a waiting state, as their entitlements would end up being empty.
Now we know what Products are available to the user, we can display them correctly in their disabled state to match the new Settings design.
Steps to test this PR
Prerequisite:
newSettings
feature flag is enabledFollow these instructions to install Play Billing Lab so you can test US and ROW subscription plans
US
Prerequisite: Country/Region is set to US in Play Billing Lab
New Settings Top Level
Subscribed State
Expired State
Remove subscription
Activating State
Prerequisite: Apply patch in task as this is hard to reproduce via device
ROW
Prerequisite: Country/Region is set to UK in Play Billing Lab
New Settings Top Level
Subscribed State
Expired State
Remove subscription
UI changes
No UI changes but it's helpful to see the designs to remember our new states