Skip to content
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

add fake experiment #3688

Merged
merged 3 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11380,7 +11380,7 @@
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 218.0.0;
version = 218.0.1;
};
};
9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/DuckDuckGo/BrowserServicesKit",
"state" : {
"revision" : "e5d390c8559fbe7b1ca67fd3982c91bcc0437d60",
"version" : "218.0.0"
"revision" : "bbcb41c87c5788718a43883b5b10eb3b4f54aff3",
"version" : "218.0.1"
}
},
{
Expand Down
20 changes: 20 additions & 0 deletions DuckDuckGo/NewTabPageViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import Foundation
import Core
import BrowserServicesKit

final class NewTabPageViewModel: ObservableObject {

Expand All @@ -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() {
Expand Down Expand Up @@ -78,3 +82,19 @@ 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
}
}
Loading