Bug 1836339 - Add a secret setting for the Compose Top Sites

fenix/115.2.0
Gabriel Luong 2 years ago committed by mergify[bot]
parent 3c8214160d
commit 7066592725

@ -57,6 +57,11 @@ object FeatureFlags {
*/
const val composeTabsTray = false
/**
* Enables compose on the top sites.
*/
const val composeTopSites = false
/**
* Enables the save to PDF feature.
*/

@ -58,6 +58,12 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
onPreferenceChangeListener = SharedPreferenceUpdater()
}
requirePreference<SwitchPreference>(R.string.pref_key_enable_compose_top_sites).apply {
isVisible = Config.channel.isNightlyOrDebug
isChecked = context.settings().enableComposeTopSites
onPreferenceChangeListener = SharedPreferenceUpdater()
}
// for performance reasons, this is only available in Nightly or Debug builds
requirePreference<EditTextPreference>(R.string.pref_key_custom_glean_server_url).apply {
isVisible = Config.channel.isNightlyOrDebug && BuildConfig.GLEAN_CUSTOM_URL.isNullOrEmpty()

@ -1736,6 +1736,14 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = FeatureFlags.composeTabsTray,
)
/**
* Indicates if the Compose Top Sites are enabled.
*/
var enableComposeTopSites by booleanPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_compose_top_sites),
default = FeatureFlags.composeTopSites,
)
/**
* Adjust Activated User sent
*/

@ -343,6 +343,7 @@
<string name="pref_key_custom_sponsored_stories_country" translatable="false">pref_key_custom_sponsored_stories_country</string>
<string name="pref_key_custom_sponsored_stories_city" translatable="false">pref_key_custom_sponsored_stories_city</string>
<string name="pref_key_shared_prefs_uuid" translatable="false">pref_key_shared_prefs_uuid</string>
<string name="pref_key_enable_compose_top_sites" translatable="false">pref_key_enable_compose_top_sites</string>
<!-- Growth Data -->
<string name="pref_key_growth_set_as_default" translatable="false">pref_key_growth_set_as_default</string>

@ -64,6 +64,8 @@
<string name="preferences_sync_debug_quit_button_summary">Custom server changes will take effect on the next Firefox run.</string>
<!-- Label for enabling the Tabs Tray to Compose changes -->
<string name="preferences_debug_settings_tabs_tray_to_compose" translatable="false">Enable Tabs Tray to Compose rewrite</string>
<!-- Label for enabling the Compose Top Sites -->
<string name="preferences_debug_settings_compose_top_sites" translatable="false">Enable Compose Top Sites</string>
<!-- A secret menu option in the tabs tray for making a tab inactive for testing. -->
<string name="inactive_tabs_menu_item">Make inactive</string>

@ -25,6 +25,11 @@
android:key="@string/pref_key_enable_tabs_tray_to_compose"
android:title="@string/preferences_debug_settings_tabs_tray_to_compose"
app:iconSpaceReserved="false" />
<SwitchPreference
android:defaultValue="false"
android:key="@string/pref_key_enable_compose_top_sites"
android:title="@string/preferences_debug_settings_compose_top_sites"
app:iconSpaceReserved="false" />
<EditTextPreference
android:key="@string/pref_key_custom_glean_server_url"
android:title="@string/preferences_debug_settings_custom_glean_server_url"

Loading…
Cancel
Save