Skip to content

Commit b2a55ff

Browse files
authored
Merge pull request #18189 from wordpress-mobile/feature/remove-land-in-the-editor-experiment
Use feature flag instead of ExPlat for land in the editor
2 parents a3b0f1c + 9d864f0 commit b2a55ff

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

WordPress/Classes/Utility/AB Testing/ABTest.swift

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import AutomatticTracks
22

33
enum ABTest: String, CaseIterable {
44
case unknown = "unknown"
5-
case landInTheEditorPhase1 = "wpios_land_in_the_editor_phase1_v3"
65

76
/// Returns a variation for the given experiment
87
var variation: Variation {

WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ enum FeatureFlag: Int, CaseIterable, OverrideableFlag {
2323
case notificationCommentDetails
2424
case statsPerformanceImprovements
2525
case siteIntentQuestion
26+
case landInTheEditor
2627

2728
/// Returns a boolean indicating if the feature is enabled
2829
var enabled: Bool {
@@ -74,6 +75,8 @@ enum FeatureFlag: Int, CaseIterable, OverrideableFlag {
7475
return true
7576
case .siteIntentQuestion:
7677
return false
78+
case .landInTheEditor:
79+
return false
7780
}
7881
}
7982

@@ -142,6 +145,8 @@ extension FeatureFlag {
142145
return "Stats Performance Improvements"
143146
case .siteIntentQuestion:
144147
return "Site Intent Question"
148+
case .landInTheEditor:
149+
return "Land In The Editor"
145150
}
146151
}
147152

WordPress/Classes/ViewRelated/Site Creation/FinalAssembly/LandInTheEditorHelper.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
typealias HomepageEditorCompletion = () -> Void
22

33
class LandInTheEditorHelper {
4-
/// Land in the editor, or continue as usual for the control group - Used to branch on the ExPlat experiment for landing in the editor from the site creation flow
4+
/// Land in the editor, or continue as usual - Used to branch on the feature flag for landing in the editor from the site creation flow
55
/// - Parameter blog: Blog (which was just created) for which to show the home page editor
66
/// - Parameter navigationController: UINavigationController used to present the home page editor
7-
/// - Parameter completion: HomepageEditorCompletion callback to be invoked after the user finishes editing the home page, or immediately in the control group case
7+
/// - Parameter completion: HomepageEditorCompletion callback to be invoked after the user finishes editing the home page, or immediately iwhen the feature flag is disabled
88
static func landInTheEditorOrContinue(for blog: Blog, navigationController: UINavigationController, completion: @escaping HomepageEditorCompletion) {
9-
// branch here for explat variation
10-
if ABTest.landInTheEditorPhase1.variation == .control {
11-
completion()
12-
} else {
9+
// branch here for feature flag
10+
if FeatureFlag.landInTheEditor.enabled {
1311
landInTheEditor(for: blog, navigationController: navigationController, completion: completion)
12+
} else {
13+
completion()
1414
}
1515
}
1616

0 commit comments

Comments
 (0)