Skip to content

Commit 877b486

Browse files
committed
Merge branch 'trunk' into issue/7904-simplified-login-ab-testing
2 parents 6c662f0 + b5234ea commit 877b486

File tree

63 files changed

+1771
-685
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1771
-685
lines changed

CodeGeneration/Sourcery/Copiable/Models+Copiable.swifttemplate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ let specsToGenerate: [CopiableSpec] = matchingTypes.map { type in
183183
}
184184

185185
return CopiableSpec(
186-
name: type.name,
186+
name: type.globalName,
187187
accessLevelWithSpacePostfix: type.accessLevel == "internal" ? "" : "\(type.accessLevel) ",
188188
properties: propSpecs
189189
)

CodeGeneration/Sourcery/Fakes/Fakes.swifttemplate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ let specsToGenerate: [FakeableSpec] = matchingTypes.map { type in
6969
)
7070
}
7171

72-
return FakeableSpec(name: type.name, accessLevelWithSpacePostfix: accessLevel, content: .initializer(propSpecs))
72+
return FakeableSpec(name: type.globalName, accessLevelWithSpacePostfix: accessLevel, content: .initializer(propSpecs))
7373
}
7474
-%>
7575
<%#

Experiments/Experiments/ABTest.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ public enum ABTest: String, CaseIterable {
2020
///
2121
case abTestLoginWithWPComOnly = "woocommerceios_login_wpcom_only"
2222

23+
/// A/B test for the Products Onboarding banner on the My Store dashboard.
24+
/// Experiment ref: pbxNRc-26F-p2
25+
case productsOnboardingBanner = "woocommerceios_products_onboarding_first_product_banner"
26+
2327
/// Returns a variation for the given experiment
2428
public var variation: Variation {
2529
ExPlat.shared?.experiment(rawValue) ?? .control
@@ -30,7 +34,7 @@ public enum ABTest: String, CaseIterable {
3034
/// When adding a new experiment, add it to the appropriate case depending on its context (logged-in or logged-out experience).
3135
public var context: ExperimentContext {
3236
switch self {
33-
case .aaTestLoggedIn202210:
37+
case .aaTestLoggedIn202210, .productsOnboardingBanner:
3438
return .loggedIn
3539
case .aaTestLoggedOut, .abTestLoginWithWPComOnly:
3640
return .loggedOut

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
1818
case .shippingLabelsOnboardingM1:
1919
return buildConfig == .localDeveloper || buildConfig == .alpha
2020
case .newToWooCommerceLinkInLoginPrologue:
21-
return true
21+
return false
2222
case .loginPrologueOnboarding:
2323
return true
2424
case .loginErrorNotifications:
@@ -33,8 +33,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
3333
return true
3434
case .searchProductsBySKU:
3535
return true
36-
case .orderCreationSearchCustomers:
37-
return buildConfig == .localDeveloper || buildConfig == .alpha
3836
case .wpcomSignup:
3937
return false
4038
case .inAppPurchases:
@@ -45,6 +43,14 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
4543
return buildConfig == .localDeveloper || buildConfig == .alpha
4644
case .productsOnboarding:
4745
return buildConfig == .localDeveloper || buildConfig == .alpha
46+
case .performanceMonitoring,
47+
.performanceMonitoringCoreData,
48+
.performanceMonitoringFileIO,
49+
.performanceMonitoringNetworking,
50+
.performanceMonitoringViewController,
51+
.performanceMonitoringUserInteraction:
52+
// Disabled by default to avoid costs spikes, unless in internal testing builds.
53+
return buildConfig == .alpha
4854
default:
4955
return true
5056
}

Experiments/Experiments/FeatureFlag.swift

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@ public enum FeatureFlag: Int {
7070
///
7171
case searchProductsBySKU
7272

73-
/// Enables the Search Customers functionality in the Order Creation screen
74-
///
75-
case orderCreationSearchCustomers
76-
7773
/// Enables signing up for a WP.com account.
7874
///
7975
case wpcomSignup
@@ -93,4 +89,39 @@ public enum FeatureFlag: Int {
9389
/// Hides products onboarding development.
9490
///
9591
case productsOnboarding
92+
93+
// MARK: - Performance Monitoring
94+
//
95+
// These flags are not transient. That is, they are not here to help us rollout a feature,
96+
// but to serve a safety switches to granularly turn off performance monitoring if it looks
97+
// like we are consuming too many events.
98+
99+
/// Whether to enable performance monitoring.
100+
///
101+
case performanceMonitoring
102+
103+
/// Whether to enable performance monitoring for Core Data operations.
104+
///
105+
/// - Note: The app will ignore this if `performanceMonitoring` is `false`
106+
case performanceMonitoringCoreData
107+
108+
/// Whether to enable performance monitoring for file IO operations.
109+
///
110+
/// - Note: The app will ignore this if `performanceMonitoring` is `false`
111+
case performanceMonitoringFileIO
112+
113+
/// Whether to enable performance monitoring for networking operations.
114+
///
115+
/// - Note: The app will ignore this if `performanceMonitoring` is `false`
116+
case performanceMonitoringNetworking
117+
118+
/// Whether to enable performance monitoring for user interaction events.
119+
///
120+
/// - Note: The app will ignore this if `performanceMonitoring` is `false`
121+
case performanceMonitoringUserInteraction
122+
123+
/// Whether to enable performance monitoring for `UIViewController` life-cycle events.
124+
///
125+
/// - Note: The app will ignore this if `performanceMonitoring` is `false`.
126+
case performanceMonitoringViewController
96127
}

Fakes/Fakes/Hardware.generated.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ extension CardBrand {
1212
.visa
1313
}
1414
}
15-
extension CardPresentReceiptParameters {
15+
extension Hardware.CardPresentReceiptParameters {
1616
/// Returns a "ready to use" type filled with fake values.
1717
///
18-
public static func fake() -> CardPresentReceiptParameters {
18+
public static func fake() -> Hardware.CardPresentReceiptParameters {
1919
.init(
2020
amount: .fake(),
2121
formattedAmount: .fake(),
@@ -27,10 +27,10 @@ extension CardPresentReceiptParameters {
2727
)
2828
}
2929
}
30-
extension CardPresentTransactionDetails {
30+
extension Hardware.CardPresentTransactionDetails {
3131
/// Returns a "ready to use" type filled with fake values.
3232
///
33-
public static func fake() -> CardPresentTransactionDetails {
33+
public static func fake() -> Hardware.CardPresentTransactionDetails {
3434
.init(
3535
last4: .fake(),
3636
expMonth: .fake(),
@@ -44,10 +44,10 @@ extension CardPresentTransactionDetails {
4444
)
4545
}
4646
}
47-
extension Charge {
47+
extension Hardware.Charge {
4848
/// Returns a "ready to use" type filled with fake values.
4949
///
50-
public static func fake() -> Charge {
50+
public static func fake() -> Hardware.Charge {
5151
.init(
5252
id: .fake(),
5353
amount: .fake(),
@@ -66,10 +66,10 @@ extension ChargeStatus {
6666
.succeeded
6767
}
6868
}
69-
extension PaymentIntent {
69+
extension Hardware.PaymentIntent {
7070
/// Returns a "ready to use" type filled with fake values.
7171
///
72-
public static func fake() -> PaymentIntent {
72+
public static func fake() -> Hardware.PaymentIntent {
7373
.init(
7474
id: .fake(),
7575
status: .fake(),

0 commit comments

Comments
 (0)