For #26289 - Remove search term tab groups metrics and setting

This commit is contained in:
Noah Bond 2022-08-03 17:26:26 -07:00 committed by mergify[bot]
parent 8e3d64f71c
commit db0162465b
11 changed files with 2 additions and 135 deletions

View File

@ -2123,19 +2123,6 @@ preferences:
notification_emails:
- android-probes@mozilla.com
expires: 107
search_term_groups_enabled:
type: boolean
description: |
Is search term group in tabs tray on?
bugs:
- https://github.com/mozilla-mobile/fenix/issues/22057
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/22058
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: 107
search.default_engine:
code:
@ -7747,85 +7734,6 @@ addresses:
tags:
- Autofill
search_terms:
number_of_search_term_group:
type: event
description: |
Number of search term group when tabs tray is opened.
extra_keys:
count:
type: string
description: |
The number of tabs per search group
bugs:
- https://github.com/mozilla-mobile/fenix/issues/22057
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/22058
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: 107
average_tabs_per_group:
type: event
description: |
Number of search term tabs per group when tabs tray is opened.
extra_keys:
count:
type: string
description: |
The average number of tabs per search group
bugs:
- https://github.com/mozilla-mobile/fenix/issues/22057
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/22058
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: 107
jump_back_in_group_tapped:
type: event
description: |
User tapped on the jump back in search term group.
bugs:
- https://github.com/mozilla-mobile/fenix/issues/22057
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/22058
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: 107
group_size_distribution:
type: custom_distribution
description: |
The distribution of search term tab group sizes. Rather than reporting
individual sizes directly as integers, it is currently desired to
report the sizes according to certain size ranges.
The "buckets" for reporting group sizes will be mapped as follows:
* 2 tabs -> 1
* 3-5 tabs -> 2
* 6-10 tabs -> 3
* 11+ tabs -> 4
Where the reported number will be 1, 2, 3, or 4, accordingly.
As an example, say a user has three groups of sizes 3, 6, and 15. The
app will report 2, 3, and 4 when this metric is tracked.
range_min: 1
range_max: 4
bucket_count: 5
histogram_type: linear
unit: tab_group_size_code
bugs:
- https://github.com/mozilla-mobile/fenix/issues/22410
data_reviews:
- https://github.com/mozilla-mobile/fenix/pull/22479
data_sensitivity:
- interaction
notification_emails:
- android-probes@mozilla.com
expires: 108
messaging:
message_shown:
type: event

View File

@ -46,10 +46,6 @@ private fun assertTabViewOptions() {
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
gridToggle()
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
searchTermTabGroupsToggle()
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
searchGroupsDescription()
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE)))
}
private fun assertCloseTabsOptions() {
@ -78,10 +74,6 @@ private fun listToggle() = onView(withText("List"))
private fun gridToggle() = onView(withText("Grid"))
private fun searchTermTabGroupsToggle() = onView(withText("Search groups"))
private fun searchGroupsDescription() = onView(withText("Group related sites together"))
private fun closeTabsHeading() = onView(withText("Close tabs"))
private fun manuallyToggle() = onView(withText("Manually"))

View File

@ -43,11 +43,6 @@ object FeatureFlags {
*/
const val inactiveTabs = true
/**
* Identifies and separates the tabs list with a group containing search term tabs.
*/
val tabGroupFeature = Config.channel.isNightlyOrDebug
/**
* Allows tabs to be dragged around as long as tab groups are disabled
*/

View File

@ -728,7 +728,6 @@ open class FenixApplication : LocaleAwareApplication(), Provider {
voiceSearchEnabled.set(settings.shouldShowVoiceSearch)
openLinksInAppEnabled.set(settings.openLinksInExternalApp)
signedInSync.set(settings.signedInFxaAccount)
searchTermGroupsEnabled.set(settings.searchTermTabGroupsAreEnabled)
val syncedItems = SyncEnginesStorage(applicationContext).getStatus().entries.filter {
it.value

View File

@ -30,7 +30,6 @@ class TabsSettingsFragment : PreferenceFragmentCompat() {
private lateinit var radioOneMonth: RadioButtonPreference
private lateinit var inactiveTabsCategory: PreferenceCategory
private lateinit var inactiveTabs: SwitchPreference
private lateinit var searchTermTabGroups: SwitchPreference
override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
setPreferencesFromResource(R.xml.tabs_preferences, rootKey)
@ -56,11 +55,6 @@ class TabsSettingsFragment : PreferenceFragmentCompat() {
// pref_key_tab_view_grid and look into using the native RadioGroup in the future.
listRadioButton = requirePreference(R.string.pref_key_tab_view_list_do_not_use)
gridRadioButton = requirePreference(R.string.pref_key_tab_view_grid)
searchTermTabGroups = requirePreference<SwitchPreference>(R.string.pref_key_search_term_tab_groups).also {
it.isVisible = FeatureFlags.tabGroupFeature
it.isChecked = it.context.settings().searchTermTabGroupsAreEnabled
it.onPreferenceChangeListener = SharedPreferenceUpdater()
}
radioManual = requirePreference(R.string.pref_key_close_tabs_manually)
radioOneMonth = requirePreference(R.string.pref_key_close_tabs_after_one_month)

View File

@ -426,15 +426,6 @@ class Settings(private val appContext: Context) : PreferencesHolder {
default = true,
)
/**
* Indicates if the user has enabled the search term tab groups feature.
*/
var searchTermTabGroupsAreEnabled by lazyFeatureFlagPreference(
appContext.getPreferenceKey(R.string.pref_key_search_term_tab_groups),
default = { FxNimbus.features.searchTermGroups.value().enabled },
featureFlag = FeatureFlags.tabGroupFeature
)
@VisibleForTesting
internal fun timeNowInMillis(): Long = System.currentTimeMillis()

View File

@ -275,7 +275,6 @@
<string name="pref_key_camera_permissions_needed" translatable="false">pref_key_camera_permissions_needed</string>
<string name="pref_key_inactive_tabs_category" translatable="false">pref_key_inactive_tabs_category</string>
<string name="pref_key_inactive_tabs" translatable="false">pref_key_inactive_tabs</string>
<string name="pref_key_search_term_tab_groups" translatable="false">pref_key_search_term_tab_groups</string>
<string name="pref_key_return_to_browser" translatable="false">pref_key_return_to_browser</string>

View File

@ -601,9 +601,9 @@
<!-- Option for a grid tab view -->
<string name="tab_view_grid">Grid</string>
<!-- Option for search term tab groups -->
<string name="tab_view_search_term_tab_groups">Search groups</string>
<string name="tab_view_search_term_tab_groups" moz:RemovedIn="105" tools:ignore="UnusedResources">Search groups</string>
<!-- Summary text for search term tab groups -->
<string name="tab_view_search_term_tab_groups_summary">Group related sites together</string>
<string name="tab_view_search_term_tab_groups_summary" moz:RemovedIn="105" tools:ignore="UnusedResources">Group related sites together</string>
<!-- Title of preference that allows a user to auto close tabs after a specified amount of time -->
<string name="preferences_close_tabs">Close tabs</string>
<!-- Option for auto closing tabs that will never auto close tabs, always allows user to manually close tabs -->

View File

@ -18,13 +18,6 @@
android:defaultValue="true"
android:key="@string/pref_key_tab_view_grid"
android:title="@string/tab_view_grid" />
<SwitchPreference
android:defaultValue="true"
android:key="@string/pref_key_search_term_tab_groups"
android:title="@string/tab_view_search_term_tab_groups"
android:summary="@string/tab_view_search_term_tab_groups_summary"
app:isPreferenceVisible="false"/>
</androidx.preference.PreferenceCategory>
<androidx.preference.PreferenceCategory

View File

@ -142,7 +142,6 @@ class FenixApplicationTest {
every { settings.historyMetadataUIFeature } returns true
every { settings.showPocketRecommendationsFeature } returns true
every { settings.showContileFeature } returns true
every { settings.searchTermTabGroupsAreEnabled } returns true
every { application.reportHomeScreenMetrics(settings) } just Runs
every { settings.inactiveTabsAreEnabled } returns true
@ -180,7 +179,6 @@ class FenixApplicationTest {
assertEquals(true, Preferences.voiceSearchEnabled.testGetValue())
assertEquals(true, Preferences.openLinksInAppEnabled.testGetValue())
assertEquals(true, Preferences.signedInSync.testGetValue())
assertEquals(true, Preferences.searchTermGroupsEnabled.testGetValue())
assertEquals(emptyList<String>(), Preferences.syncItems.testGetValue())
assertEquals("fixed_top", Preferences.toolbarPositionSetting.testGetValue())
assertEquals("standard", Preferences.enhancedTrackingProtection.testGetValue())

View File

@ -22,7 +22,6 @@ class TabSorterTest {
@Before
fun setUp() {
every { settings.inactiveTabsAreEnabled }.answers { true }
every { settings.searchTermTabGroupsAreEnabled }.answers { true }
}
@Test
@ -90,7 +89,6 @@ class TabSorterTest {
@Test
fun `WHEN inactive tabs are disabled THEN adapter have only normal tabs`() {
every { settings.inactiveTabsAreEnabled }.answers { false }
every { settings.searchTermTabGroupsAreEnabled }.answers { false }
val tabSorter = TabSorter(settings, tabsTrayStore)
tabSorter.updateTabs(