Skip to content

Commit

Permalink
Rename platform parameter to enableOnboardingFlowV2
Browse files Browse the repository at this point in the history
  • Loading branch information
adhiamboperes committed Dec 11, 2023
1 parent 0f6c4b9 commit 76120a9
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_
import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_NEW_ONBOARDING_FLOW_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE
Expand All @@ -30,7 +30,7 @@ import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeSta
import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi
import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics
import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds
import org.oppia.android.util.platformparameter.EnableNewOnboardingUi
import org.oppia.android.util.platformparameter.EnableOnboardingFlowV2
import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection
import org.oppia.android.util.platformparameter.EnableSpotlightUi
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON
Expand Down Expand Up @@ -321,10 +321,10 @@ class PlatformParameterAlphaKenyaModule {
}

@Provides
@EnableNewOnboardingUi
@EnableOnboardingFlowV2
fun provideEnableNewOnboardingUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_NEW_ONBOARDING_FLOW_DEFAULT_VALUE
ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_
import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_NEW_ONBOARDING_FLOW_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.EXTRA_TOPIC_TABS_UI
Expand All @@ -29,7 +29,7 @@ import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeSta
import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi
import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics
import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds
import org.oppia.android.util.platformparameter.EnableNewOnboardingUi
import org.oppia.android.util.platformparameter.EnableOnboardingFlowV2
import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection
import org.oppia.android.util.platformparameter.EnableSpotlightUi
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON
Expand Down Expand Up @@ -316,10 +316,10 @@ class PlatformParameterAlphaModule {
}

@Provides
@EnableNewOnboardingUi
@EnableOnboardingFlowV2
fun provideEnableNewOnboardingUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_NEW_ONBOARDING_FLOW_DEFAULT_VALUE
ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_
import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_NEW_ONBOARDING_FLOW_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE
Expand All @@ -30,7 +30,7 @@ import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeSta
import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi
import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics
import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds
import org.oppia.android.util.platformparameter.EnableNewOnboardingUi
import org.oppia.android.util.platformparameter.EnableOnboardingFlowV2
import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection
import org.oppia.android.util.platformparameter.EnableSpotlightUi
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON
Expand Down Expand Up @@ -318,10 +318,10 @@ class PlatformParameterModule {
}

@Provides
@EnableNewOnboardingUi
@EnableOnboardingFlowV2
fun provideEnableNewOnboardingUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_NEW_ONBOARDING_FLOW_DEFAULT_VALUE
ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_
import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_NEW_ONBOARDING_FLOW_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation
import org.oppia.android.util.platformparameter.EnableDownloadsSupport
Expand All @@ -25,7 +25,7 @@ import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeSta
import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi
import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics
import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds
import org.oppia.android.util.platformparameter.EnableNewOnboardingUi
import org.oppia.android.util.platformparameter.EnableOnboardingFlowV2
import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection
import org.oppia.android.util.platformparameter.EnableSpotlightUi
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON_DEFAULT_VALUE
Expand Down Expand Up @@ -273,9 +273,9 @@ class TestPlatformParameterModule {
}

@Provides
@EnableNewOnboardingUi
@EnableOnboardingFlowV2
fun provideEnableNewOnboardingUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(enableNewOnboardingUi)
return PlatformParameterValue.createDefaultParameter(enableOnboardingFlowV2)
}

companion object {
Expand All @@ -296,7 +296,7 @@ class TestPlatformParameterModule {
private var minimumLearningTime =
NPS_SURVEY_MINIMUM_AGGREGATE_LEARNING_TIME_IN_A_TOPIC_IN_MINUTES_DEFAULT_VALUE
private var gracePeriodInDays = NPS_SURVEY_GRACE_PERIOD_IN_DAYS_DEFAULT_VALUE
private var enableNewOnboardingUi = ENABLE_NEW_ONBOARDING_FLOW_DEFAULT_VALUE
private var enableOnboardingFlowV2 = ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE

/** Enables forcing [EnableLanguageSelectionUi] platform parameter flag from tests. */
@VisibleForTesting(otherwise = VisibleForTesting.NONE)
Expand Down Expand Up @@ -358,10 +358,10 @@ class TestPlatformParameterModule {
enableSpotlightUi = value
}

/** Enables forcing [EnableNewOnboardingUi] platform parameter flag from tests. */
/** Enables forcing [EnableOnboardingFlowV2] platform parameter flag from tests. */
@VisibleForTesting(otherwise = VisibleForTesting.NONE)
fun forceEnableNewOnboardingUi(value: Boolean) {
enableNewOnboardingUi = value
fun forceEnableOnboardingFlowV2(value: Boolean) {
enableOnboardingFlowV2 = value
}

@VisibleForTesting(otherwise = VisibleForTesting.NONE)
Expand All @@ -377,7 +377,7 @@ class TestPlatformParameterModule {
ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
enablePerformanceMetricsCollection = ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
enableAppAndOsDeprecation = ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
enableNewOnboardingUi = ENABLE_NEW_ONBOARDING_FLOW_DEFAULT_VALUE
enableOnboardingFlowV2 = ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ const val NPS_SURVEY_MINIMUM_AGGREGATE_LEARNING_TIME_IN_A_TOPIC_IN_MINUTES_DEFAU

/** Qualifier for the platform parameter that toggles the new onboarding flow. */
@Qualifier
annotation class EnableNewOnboardingUi
annotation class EnableOnboardingFlowV2

/** Name of the platform parameter that toggles the new onboarding flow. */
const val ENABLE_NEW_ONBOARDING_FLOW = "enable_new_onboarding_flow"
const val ENABLE_ONBOARDING_FLOW_V2 = "enable_onboarding_flow_v2"

/** Default value of the platform parameter corresponding to [EnableNewOnboardingUi]. */
const val ENABLE_NEW_ONBOARDING_FLOW_DEFAULT_VALUE = false
/** Default value of the platform parameter corresponding to [EnableOnboardingFlowV2]. */
const val ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE = false

0 comments on commit 76120a9

Please sign in to comment.