For #26528 - Add a nimbus feature flag for MR Home Onboarding Dialog

This commit is contained in:
Gabriel Luong 2022-08-18 13:29:27 -04:00 committed by mergify[bot]
parent 3434c702de
commit 5f2ebf8125
3 changed files with 21 additions and 5 deletions

View File

@ -1208,7 +1208,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
)
/**
* Indicates if sync on-boarding CFR should be shown
* Indicates if sync onboarding CFR should be shown.
* Returns true if the [FeatureFlags.showSynCFR] and [R.string.pref_key_should_show_sync_cfr] are true.
*/
var showSyncCFR by lazyFeatureFlagPreference(
@ -1217,6 +1217,15 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = { onboardScreenSection[OnboardingSection.SYNC_CFR] == true },
)
/**
* Indicates if home onboarding dialog should be shown.
*/
var showHomeOnboardingDialog by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_should_show_home_onboarding_dialog),
featureFlag = FeatureFlags.showHomeOnboarding,
default = { onboardScreenSection[OnboardingSection.HOME_ONBOARDING_DIALOG] == 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.

View File

@ -235,8 +235,10 @@
<string name="pref_key_has_inactive_tabs_auto_close_dialog_dismissed" translatable="false">pref_key_has_inactive_tabs_auto_close_dialog_dismissed</string>
<!-- A value of `true` means the jump back in onboarding popup has not been shown yet -->
<string name="pref_key_should_show_jump_back_in_tabs_popup" translatable="false">pref_key_should_show_jump_back_in_tabs_popup</string>
<!-- A value of `true` means the on-boarding sync CFR have not been shown yet -->
<!-- A value of `true` means the onboarding sync CFR have not been shown yet -->
<string name="pref_key_should_show_sync_cfr" translatable="false">pref_key_should_show_sync_cfr</string>
<!-- A value of `true` means the home onboarding dialog have not been shown yet -->
<string name="pref_key_should_show_home_onboarding_dialog" translatable="false">pref_key_should_show_home_onboarding_dialog</string>
<string name="pref_key_debug_settings" translatable="false">pref_key_debug_settings</string>

View File

@ -47,21 +47,24 @@ features:
default:
{
"sync-cfr": false,
"wallpapers": false
"wallpapers": false,
"home-onboarding-dialog": false,
}
defaults:
- channel: nightly
value: {
"sections-enabled": {
"sync-cfr": false,
"wallpapers": false
"wallpapers": false,
"home-onboarding-dialog": false,
}
}
- channel: developer
value: {
"sections-enabled": {
"sync-cfr": false,
"wallpapers": true
"wallpapers": true,
"home-onboarding-dialog": false,
}
}
nimbus-validation:
@ -331,3 +334,5 @@ types:
description: Sync onboarding CFR.
wallpapers:
description: Wallpapers onboarding dialog.
home-onboarding-dialog:
description: Home onboarding dialog for upgraded users.