From 1e1873b53bf0bd1eefaa1ae985b7aedbb457527b Mon Sep 17 00:00:00 2001 From: Sabrina Tardio Date: Fri, 6 Dec 2024 10:09:15 +0100 Subject: [PATCH 1/3] add test experiment and start it --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../xcshareddata/swiftpm/Package.resolved | 4 ++-- DuckDuckGo/NewTabPageViewModel.swift | 21 +++++++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index c8cfaf060a..e6085c5008 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -11379,8 +11379,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { - kind = exactVersion; - version = 218.0.0; + branch = "sabrina/setup-experiment-test"; + kind = branch; }; }; 9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 7d8e4affb7..f35b84d2e6 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "revision" : "e5d390c8559fbe7b1ca67fd3982c91bcc0437d60", - "version" : "218.0.0" + "branch" : "sabrina/setup-experiment-test", + "revision" : "a294718068171e3517d7a1b2351f6ba53ff61d44" } }, { diff --git a/DuckDuckGo/NewTabPageViewModel.swift b/DuckDuckGo/NewTabPageViewModel.swift index 6cb387b402..c2a71bcb3c 100644 --- a/DuckDuckGo/NewTabPageViewModel.swift +++ b/DuckDuckGo/NewTabPageViewModel.swift @@ -19,6 +19,7 @@ import Foundation import Core +import BrowserServicesKit final class NewTabPageViewModel: ObservableObject { @@ -39,6 +40,9 @@ final class NewTabPageViewModel: ObservableObject { isIntroMessageVisible = introDataStorage.newTabPageIntroMessageEnabled ?? false isOnboarding = false isShowingSettings = false + + // This is just temporarily here to run an A/A test to check the new experiment framework works as expected + _ = AppDependencyProvider.shared.featureFlagger.getCohortIfEnabled(for: CredentialsSavingFlag()) } func introMessageDisplayed() { @@ -78,3 +82,20 @@ final class NewTabPageViewModel: ObservableObject { isDragging = false } } + + +// This is just temporarily here to run an A/A test to check the new experiment framework works as expected +public struct CredentialsSavingFlag: FeatureFlagExperimentDescribing { + public init() {} + + public typealias CohortType = Cohort + + public var rawValue = "credentialSaving" + + public var source: FeatureFlagSource = .remoteReleasable(.subfeature(ExperimentTestSubfeatures.experimentTestAA)) + + public enum Cohort: String, FlagCohort { + case control + case blue + } +} From fcfebfce0002402d674a1dba863b77a34acc2bd7 Mon Sep 17 00:00:00 2001 From: Sabrina Tardio Date: Fri, 6 Dec 2024 10:18:55 +0100 Subject: [PATCH 2/3] remove extra space --- DuckDuckGo/NewTabPageViewModel.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/DuckDuckGo/NewTabPageViewModel.swift b/DuckDuckGo/NewTabPageViewModel.swift index c2a71bcb3c..5f76ce83b9 100644 --- a/DuckDuckGo/NewTabPageViewModel.swift +++ b/DuckDuckGo/NewTabPageViewModel.swift @@ -83,7 +83,6 @@ final class NewTabPageViewModel: ObservableObject { } } - // This is just temporarily here to run an A/A test to check the new experiment framework works as expected public struct CredentialsSavingFlag: FeatureFlagExperimentDescribing { public init() {} From 6f01ff050430ae0e8bf2f46e61508b3be8af1c8d Mon Sep 17 00:00:00 2001 From: Sabrina Tardio Date: Fri, 6 Dec 2024 18:06:38 +0100 Subject: [PATCH 3/3] point to newly released BSK --- DuckDuckGo.xcodeproj/project.pbxproj | 4 ++-- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index e6085c5008..e75c9be9ad 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -11379,8 +11379,8 @@ isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { - branch = "sabrina/setup-experiment-test"; - kind = branch; + kind = exactVersion; + version = 218.0.1; }; }; 9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f35b84d2e6..67a1291f05 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { - "branch" : "sabrina/setup-experiment-test", - "revision" : "a294718068171e3517d7a1b2351f6ba53ff61d44" + "revision" : "bbcb41c87c5788718a43883b5b10eb3b4f54aff3", + "version" : "218.0.1" } }, {