Skip to content

Commit 03c57e9

Browse files
authored
Feature/david/remove bottom bar (#844)
* removing bottom bar from browser screen * removing references to bottom navigation layouts * cleaning up decorator methods * code cleanup * remove unnecessary tests * this layout is no longer needed * we no longer need to know the variant when sending this pixel * address code review comments * cleaning up missing reference
1 parent d03a97c commit 03c57e9

18 files changed

+28
-1140
lines changed

app/src/androidTest/java/com/duckduckgo/app/statistics/VariantManagerTest.kt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,6 @@ class VariantManagerTest {
4343
assertEquals(0, variant.features.size)
4444
}
4545

46-
// Bottom Bar Navigation Experiment
47-
48-
@Test
49-
fun bottomBarNavigationControlVariantIsActiveAndHasNoFeatures() {
50-
val variant = variants.first { it.key == "mb" }
51-
assertEqualsDouble(1.0, variant.weight)
52-
assertEquals(0, variant.features.size)
53-
}
54-
55-
@Test
56-
fun bottomBarNavigationVariantIsActiveAndHasBottomBarNavigationFeature() {
57-
val variant = variants.first { it.key == "mk" }
58-
assertEqualsDouble(1.0, variant.weight)
59-
assertEquals(1, variant.features.size)
60-
assertTrue(variant.hasFeature(BottomBarNavigation))
61-
}
62-
6346
@Test
6447
fun verifyNoDuplicateVariantNames() {
6548
val existingNames = mutableSetOf<String>()

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,6 @@
234234
android:name="com.duckduckgo.app.tabs.ui.TabSwitcherActivity"
235235
android:label="@string/tabActivityTitle" />
236236

237-
<activity
238-
android:name="com.duckduckgo.app.tabs.ui.TabSwitcherBottomBarFeatureActivity"
239-
android:label="@string/tabActivityTitle" />
240-
241237
<activity
242238
android:name="com.duckduckgo.app.privacy.ui.PrivacyDashboardActivity"
243239
android:label="@string/privacyDashboardActivityTitle"

app/src/main/java/com/duckduckgo/app/browser/BrowserPopupMenu.kt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import android.view.View
2525
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
2626
import android.widget.PopupWindow
2727
import com.duckduckgo.app.statistics.Variant
28-
import com.duckduckgo.app.statistics.VariantManager
2928

3029
class BrowserPopupMenu(layoutInflater: LayoutInflater, variant: Variant, view: View = inflate(layoutInflater, variant)) :
3130
PopupWindow(view, WRAP_CONTENT, WRAP_CONTENT, true) {
@@ -62,19 +61,7 @@ class BrowserPopupMenu(layoutInflater: LayoutInflater, variant: Variant, view: V
6261
private const val margin = 30
6362

6463
fun inflate(layoutInflater: LayoutInflater, variant: Variant): View {
65-
return if (variant.hasFeature(VariantManager.VariantFeature.BottomBarNavigation)) {
66-
inflateBottomBarWithSearchFeature(layoutInflater)
67-
} else {
68-
inflateToolbarOnly(layoutInflater)
69-
}
70-
}
71-
72-
private fun inflateToolbarOnly(layoutInflater: LayoutInflater): View {
7364
return layoutInflater.inflate(R.layout.popup_window_browser_menu, null)
7465
}
75-
76-
private fun inflateBottomBarWithSearchFeature(layoutInflater: LayoutInflater): View {
77-
return layoutInflater.inflate(R.layout.popup_window_browser_bottom_tab_menu, null)
78-
}
7966
}
8067
}

app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt

Lines changed: 21 additions & 209 deletions
Large diffs are not rendered by default.

app/src/main/java/com/duckduckgo/app/browser/ui/BottomNavigationBar.kt

Lines changed: 0 additions & 76 deletions
This file was deleted.

app/src/main/java/com/duckduckgo/app/browser/ui/BottomNavigationBehavior.kt

Lines changed: 0 additions & 119 deletions
This file was deleted.

app/src/main/java/com/duckduckgo/app/di/AndroidBindingModule.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ import com.duckduckgo.app.settings.SettingsActivity
4545
import com.duckduckgo.app.survey.ui.SurveyActivity
4646
import com.duckduckgo.app.systemsearch.SystemSearchActivity
4747
import com.duckduckgo.app.tabs.ui.TabSwitcherActivity
48-
import com.duckduckgo.app.tabs.ui.TabSwitcherBottomBarFeatureActivity
4948
import com.duckduckgo.app.widget.ui.AddWidgetInstructionsActivity
5049
import dagger.Module
5150
import dagger.android.ContributesAndroidInjector
@@ -75,10 +74,6 @@ abstract class AndroidBindingModule {
7574
@ContributesAndroidInjector
7675
abstract fun tabsActivity(): TabSwitcherActivity
7776

78-
@ActivityScoped
79-
@ContributesAndroidInjector
80-
abstract fun tabsExperimentActivity(): TabSwitcherBottomBarFeatureActivity
81-
8277
@ActivityScoped
8378
@ContributesAndroidInjector
8479
abstract fun privacyDashboardActivity(): PrivacyDashboardActivity

app/src/main/java/com/duckduckgo/app/statistics/VariantManager.kt

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package com.duckduckgo.app.statistics
1919
import androidx.annotation.WorkerThread
2020
import com.duckduckgo.app.statistics.VariantManager.Companion.DEFAULT_VARIANT
2121
import com.duckduckgo.app.statistics.VariantManager.Companion.referrerVariant
22-
import com.duckduckgo.app.statistics.VariantManager.VariantFeature.BottomBarNavigation
2322
import com.duckduckgo.app.statistics.store.StatisticsDataStore
2423
import timber.log.Timber
2524
import java.util.*
@@ -28,9 +27,7 @@ import java.util.*
2827
interface VariantManager {
2928

3029
// variant-dependant features listed here
31-
sealed class VariantFeature {
32-
object BottomBarNavigation : VariantFeature()
33-
}
30+
sealed class VariantFeature
3431

3532
companion object {
3633

@@ -43,19 +40,7 @@ interface VariantManager {
4340
// SERP variants. "sc" may also be used as a shared control for mobile experiments in
4441
// the future if we can filter by app version
4542
Variant(key = "sc", weight = 0.0, features = emptyList(), filterBy = { noFilter() }),
46-
Variant(key = "se", weight = 0.0, features = emptyList(), filterBy = { noFilter() }),
47-
48-
// Bottom Bar Navigation Experiment
49-
Variant(
50-
key = "mb",
51-
weight = 1.0,
52-
features = emptyList(),
53-
filterBy = { noFilter() }),
54-
Variant(
55-
key = "mk",
56-
weight = 1.0,
57-
features = listOf(BottomBarNavigation),
58-
filterBy = { noFilter() })
43+
Variant(key = "se", weight = 0.0, features = emptyList(), filterBy = { noFilter() })
5944

6045
// All groups in an experiment (control and variants) MUST use the same filters
6146
)

app/src/main/java/com/duckduckgo/app/statistics/pixels/Pixel.kt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,11 @@ interface Pixel {
169169

170170
CHANGE_APP_ICON_OPENED("m_ic"),
171171

172-
MENU_ACTION_POPUP_OPENED("m_nav_pm_o_%s"),
173-
MENU_ACTION_FIRE_PRESSED("m_nav_f_p_%s"),
174-
MENU_ACTION_REFRESH_PRESSED("m_nav_r_p_%s"),
175-
MENU_ACTION_NEW_TAB_PRESSED("m_nav_nt_p_%s"),
176-
MENU_ACTION_BOOKMARKS_PRESSED("m_nav_b_p_%s"),
177-
MENU_ACTION_SEARCH_PRESSED("m_nav_s_p_%s"),
172+
MENU_ACTION_POPUP_OPENED("m_nav_pm_o"),
173+
MENU_ACTION_FIRE_PRESSED("m_nav_f_p"),
174+
MENU_ACTION_REFRESH_PRESSED("m_nav_r_p"),
175+
MENU_ACTION_NEW_TAB_PRESSED("m_nav_nt_p"),
176+
MENU_ACTION_BOOKMARKS_PRESSED("m_nav_b_p"),
178177

179178
COOKIE_DATABASE_NOT_FOUND("m_cdb_nf"),
180179
COOKIE_DATABASE_OPEN_ERROR("m_cdb_oe"),

0 commit comments

Comments
 (0)