diff --git a/app/.experimenter.yaml b/app/.experimenter.yaml index ee943656c..02ee1c061 100644 --- a/app/.experimenter.yaml +++ b/app/.experimenter.yaml @@ -31,6 +31,14 @@ homescreen: sections-enabled: type: json description: "This property provides a lookup table of whether or not the given section should be enabled. If the section is enabled, it should be toggleable in the settings screen, and on by default." +juno-onboarding: + description: A feature that shows juno onboarding flow. + hasExposure: true + exposureDescription: "" + variables: + enabled: + type: boolean + description: "if true, juno onboarding is shown to the user." messaging: description: "Configuration for the messaging system.\n\nIn practice this is a set of growable lookup tables for the\nmessage controller to piece together.\n" hasExposure: true diff --git a/app/nimbus.fml.yaml b/app/nimbus.fml.yaml index 64cf835c8..c4352307c 100644 --- a/app/nimbus.fml.yaml +++ b/app/nimbus.fml.yaml @@ -186,6 +186,14 @@ features: type: Boolean default: true + juno-onboarding: + description: A feature that shows juno onboarding flow. + variables: + enabled: + description: if true, juno onboarding is shown to the user. + type: Boolean + default: false + onboarding: description: "A feature that configures the new user onboarding page. Note that onboarding is a **first run** feature, and should only be modified by first run experiments." diff --git a/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt b/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt index 8ec8ff220..0a5c3063c 100644 --- a/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt +++ b/app/src/main/java/org/mozilla/fenix/FeatureFlags.kt @@ -71,4 +71,9 @@ object FeatureFlags { * Enables the notification pre permission prompt. */ const val notificationPrePermissionPromptEnabled = true + + /** + * Enables the redesigned onboarding. + */ + const val junoOnboardingEnabled = false } 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 5d321432a..d2119798a 100644 --- a/app/src/main/java/org/mozilla/fenix/utils/Settings.kt +++ b/app/src/main/java/org/mozilla/fenix/utils/Settings.kt @@ -1589,6 +1589,23 @@ class Settings(private val appContext: Context) : PreferencesHolder { default = false, ) + /** + * Indicates if juno onboarding feature is enabled. + */ + var junoOnboardingEnabled by lazyFeatureFlagPreference( + key = appContext.getPreferenceKey(R.string.pref_key_juno_onboarding_enabled), + default = { FxNimbus.features.junoOnboarding.value().enabled }, + featureFlag = FeatureFlags.junoOnboardingEnabled, + ) + + /** + * Indicates if the juno onboarding has been shown to the user. + */ + var isJunoOnboardingShown by booleanPreference( + key = appContext.getPreferenceKey(R.string.pref_key_is_juno_onboarding_shown), + default = false, + ) + /** * Get the current mode for how https-only is enabled. */ diff --git a/app/src/main/res/values/preference_keys.xml b/app/src/main/res/values/preference_keys.xml index 96f7942c2..a9acda49e 100644 --- a/app/src/main/res/values/preference_keys.xml +++ b/app/src/main/res/values/preference_keys.xml @@ -342,4 +342,8 @@ pref_key_notification_pre_permission_prompt_enabled pref_key_is_notification_pre_permission_prompt_shown + + + pref_key_juno_onboarding_enabled + pref_key_is_juno_onboarding_shown