diff --git a/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt b/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt index 1af710705..0e4ee1e64 100644 --- a/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt +++ b/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt @@ -24,10 +24,20 @@ object FeatureFlags { const val syncAddressesFeature = false /** - * Enables the on-boarding sync cfr on the home screen. + * Enables the onboarding sync CFR on the home screen. */ val showSynCFR = Config.channel.isDebug + /** + * Enables the onboarding jump back in CFR on the home screen. + */ + const val showJumpBackInCFR = true + + /** + * Enables the first run onboarding updates. + */ + const val showFirstRunOnboardingUpdates = false + /** * Enables the "recent" tabs feature in the home screen. */ diff --git a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt index 9c3d1311b..e56e197ee 100644 --- a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt +++ b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt @@ -859,9 +859,10 @@ class Settings(private val appContext: Context) : PreferencesHolder { /** * Indicates if the jump back in CRF should be shown. */ - var shouldShowJumpBackInCFR by booleanPreference( + var shouldShowJumpBackInCFR by lazyFeatureFlagPreference( appContext.getPreferenceKey(R.string.pref_key_should_show_jump_back_in_tabs_popup), - default = true + featureFlag = FeatureFlags.showJumpBackInCFR, + default = { onboardScreenSection[OnboardingSection.JUMP_BACK_IN_CFR] == true }, ) fun getSitePermissionsPhoneFeatureAction( @@ -1226,6 +1227,15 @@ class Settings(private val appContext: Context) : PreferencesHolder { default = { onboardScreenSection[OnboardingSection.HOME_ONBOARDING_DIALOG] == true }, ) + /** + * Indicates if home onboarding dialog should be shown. + */ + var showFirstRunOnboardingUpdate by lazyFeatureFlagPreference( + appContext.getPreferenceKey(R.string.pref_key_show_first_run_onboarding_update), + featureFlag = FeatureFlags.showFirstRunOnboardingUpdates, + default = { onboardScreenSection[OnboardingSection.FIRST_RUN_ONBOARDING] == true }, + ) + /** * Indicates if the recent tabs functionality should be visible. * Returns true if the [FeatureFlags.showRecentTabsFeature] and [R.string.pref_key_recent_tabs] are true. diff --git a/app/src/main/res/values/preference_keys.xml b/app/src/main/res/values/preference_keys.xml index 07d2f0a99..6a21c12fa 100644 --- a/app/src/main/res/values/preference_keys.xml +++ b/app/src/main/res/values/preference_keys.xml @@ -239,6 +239,8 @@ pref_key_should_show_sync_cfr pref_key_should_show_home_onboarding_dialog + + pref_key_show_first_run_onboarding_update pref_key_debug_settings diff --git a/nimbus.fml.yaml b/nimbus.fml.yaml index 1a5a655f0..004872f85 100644 --- a/nimbus.fml.yaml +++ b/nimbus.fml.yaml @@ -49,6 +49,8 @@ features: "sync-cfr": false, "wallpapers": false, "home-onboarding-dialog": false, + "jump-back-in-cfr": false, + "first-run-onboarding": false, } defaults: - channel: nightly @@ -57,6 +59,8 @@ features: "sync-cfr": false, "wallpapers": false, "home-onboarding-dialog": false, + "jump-back-in-cfr": false, + "first-run-onboarding": false, } } - channel: developer @@ -65,6 +69,8 @@ features: "sync-cfr": false, "wallpapers": true, "home-onboarding-dialog": false, + "jump-back-in-cfr": false, + "first-run-onboarding": false, } } nimbus-validation: @@ -336,3 +342,7 @@ types: description: Wallpapers onboarding dialog. home-onboarding-dialog: description: Home onboarding dialog for upgraded users. + jump-back-in-cfr: + description: Jump back in onboarding CFR. + first-run-onboarding: + description: First run onboarding page updates.