Skip to content

Commit

Permalink
Unified feedback form for Privacy Pro (#922)
Browse files Browse the repository at this point in the history
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
-->

Please review the release process for BrowserServicesKit
[here](https://app.asana.com/0/1200194497630846/1200837094583426).

**Required**:

Task/Issue URL:
https://app.asana.com/0/1205922231854923/1207701941801991/f
iOS PR: duckduckgo/iOS#3172
macOS PR: duckduckgo/macos-browser#3058
What kind of version bump will this require?: Major/Minor/Patch

**Optional**:

Tech Design URL:
CC:

**Description**:

<!--
Tagging instructions
If this PR isn't ready to be merged for whatever reason it should be
marked with the `DO NOT MERGE` label (particularly if it's a draft)
If it's pending Product Review/PFR, please add the `Pending Product
Review` label.

If at any point it isn't actively being worked on/ready for
review/otherwise moving forward (besides the above PR/PFR exception)
strongly consider closing it (or not opening it in the first place). If
you decide not to close it, make sure it's labelled to make it clear the
PRs state and comment with more information.
-->

**Steps to test this PR**:
1.
1.

<!--
Before submitting a PR, please ensure you have tested the combinations
you expect the reviewer to test, then delete configurations you *know*
do not need explicit testing.

Using a simulator where a physical device is unavailable is acceptable.
-->

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] macOS 10.15
* [ ] macOS 11
* [ ] macOS 12

---
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
  • Loading branch information
quanganhdo authored Aug 27, 2024
1 parent 93fae8b commit 606ccf9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ public enum PrivacyProSubfeature: String, Equatable, PrivacySubfeature {
case allowPurchaseStripe
case isLaunchedOverride
case isLaunchedOverrideStripe
case useUnifiedFeedback
}

public enum sslCertificatesSubfeature: String, PrivacySubfeature {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import Subscription
public protocol SubscriptionFeatureAvailability {
var isFeatureAvailable: Bool { get }
var isSubscriptionPurchaseAllowed: Bool { get }
var usesUnifiedFeedbackForm: Bool { get }
}

public final class DefaultSubscriptionFeatureAvailability: SubscriptionFeatureAvailability {
Expand Down Expand Up @@ -52,6 +53,10 @@ public final class DefaultSubscriptionFeatureAvailability: SubscriptionFeatureAv
return isPurchaseAllowed || isInternalUser
}

public var usesUnifiedFeedbackForm: Bool {
privacyConfigurationManager.privacyConfig.isSubfeatureEnabled(PrivacyProSubfeature.useUnifiedFeedback)
}

// MARK: - Conditions

private var isInternalUser: Bool {
Expand Down
8 changes: 8 additions & 0 deletions Sources/PixelKit/PixelKit+Parameters.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ public extension PixelKit {
public static let reason = "reason"

public static let vpnCohort = "cohort"

// Unified Feedback Form
public static let pproIssueDescription = "description"
public static let pproIssueSource = "source"
public static let pproIssueReportType = "reportType"
public static let pproIssueCategory = "category"
public static let pproIssueSubcategory = "subcategory"
public static let pproIssueMetadata = "customMetadata"
}

enum Values {
Expand Down

0 comments on commit 606ccf9

Please sign in to comment.