Skip to content

Commit

Permalink
Update Settings: Address Ppro Issues (#5460)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mikescamell authored and 0nko committed Mar 4, 2025
1 parent f87ce1f commit c41b77b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 8 deletions.
34 changes: 34 additions & 0 deletions app/src/main/java/com/duckduckgo/app/tabs/TabFeatureFlags.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2024 DuckDuckGo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.duckduckgo.app.tabs

import com.duckduckgo.anvil.annotations.ContributesRemoteFeature
import com.duckduckgo.di.scopes.AppScope
import com.duckduckgo.feature.toggles.api.Toggle

@ContributesRemoteFeature(
scope = AppScope::class,
featureName = "tabManager",
)
interface TabManagerFeatureFlags {
@Toggle.DefaultValue(false)
@Toggle.InternalAlwaysEnabled
fun self(): Toggle

@Toggle.DefaultValue(false)
fun multiSelection(): Toggle
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,17 @@ import com.duckduckgo.app.trackerdetection.api.TDS_BASE_URL
import com.duckduckgo.app.trackerdetection.api.TdsRequired
import com.duckduckgo.app.trackerdetection.blocklist.BlockList.Cohorts.CONTROL
import com.duckduckgo.app.trackerdetection.blocklist.BlockList.Cohorts.TREATMENT
import com.duckduckgo.di.scopes.AppScope
import com.duckduckgo.feature.toggles.api.FeatureTogglesInventory
import com.squareup.anvil.annotations.ContributesMultibinding
import com.squareup.moshi.JsonAdapter
import com.squareup.moshi.Moshi
import com.squareup.moshi.Types
import javax.inject.Inject
import kotlinx.coroutines.runBlocking
import okhttp3.Interceptor
import okhttp3.Interceptor.Chain
import okhttp3.Response
import retrofit2.Invocation

@ContributesMultibinding(
scope = AppScope::class,
boundType = ApiInterceptorPlugin::class,
)
class BlockListInterceptorApiPlugin @Inject constructor(
class BlockListInterceptorApiPlugin constructor(
private val inventory: FeatureTogglesInventory,
private val moshi: Moshi,
private val pixel: Pixel,
Expand Down

0 comments on commit c41b77b

Please sign in to comment.