Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,6 @@ class VariantManagerTest {
assertEquals(0, variant.features.size)
}

// Bottom Bar Navigation Experiment

@Test
fun bottomBarNavigationControlVariantIsActiveAndHasNoFeatures() {
val variant = variants.first { it.key == "mb" }
assertEqualsDouble(1.0, variant.weight)
assertEquals(0, variant.features.size)
}

@Test
fun bottomBarNavigationVariantIsActiveAndHasBottomBarNavigationFeature() {
val variant = variants.first { it.key == "mk" }
assertEqualsDouble(1.0, variant.weight)
assertEquals(1, variant.features.size)
assertTrue(variant.hasFeature(BottomBarNavigation))
}

@Test
fun verifyNoDuplicateVariantNames() {
val existingNames = mutableSetOf<String>()
Expand Down
4 changes: 0 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,6 @@
android:name="com.duckduckgo.app.tabs.ui.TabSwitcherActivity"
android:label="@string/tabActivityTitle" />

<activity
android:name="com.duckduckgo.app.tabs.ui.TabSwitcherBottomBarFeatureActivity"
android:label="@string/tabActivityTitle" />

<activity
android:name="com.duckduckgo.app.privacy.ui.PrivacyDashboardActivity"
android:label="@string/privacyDashboardActivityTitle"
Expand Down
13 changes: 0 additions & 13 deletions app/src/main/java/com/duckduckgo/app/browser/BrowserPopupMenu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import android.view.View
import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
import android.widget.PopupWindow
import com.duckduckgo.app.statistics.Variant
import com.duckduckgo.app.statistics.VariantManager

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

fun inflate(layoutInflater: LayoutInflater, variant: Variant): View {
return if (variant.hasFeature(VariantManager.VariantFeature.BottomBarNavigation)) {
inflateBottomBarWithSearchFeature(layoutInflater)
} else {
inflateToolbarOnly(layoutInflater)
}
}

private fun inflateToolbarOnly(layoutInflater: LayoutInflater): View {
return layoutInflater.inflate(R.layout.popup_window_browser_menu, null)
}

private fun inflateBottomBarWithSearchFeature(layoutInflater: LayoutInflater): View {
return layoutInflater.inflate(R.layout.popup_window_browser_bottom_tab_menu, null)
}
}
}
230 changes: 21 additions & 209 deletions app/src/main/java/com/duckduckgo/app/browser/BrowserTabFragment.kt

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import com.duckduckgo.app.settings.SettingsActivity
import com.duckduckgo.app.survey.ui.SurveyActivity
import com.duckduckgo.app.systemsearch.SystemSearchActivity
import com.duckduckgo.app.tabs.ui.TabSwitcherActivity
import com.duckduckgo.app.tabs.ui.TabSwitcherBottomBarFeatureActivity
import com.duckduckgo.app.widget.ui.AddWidgetInstructionsActivity
import dagger.Module
import dagger.android.ContributesAndroidInjector
Expand Down Expand Up @@ -75,10 +74,6 @@ abstract class AndroidBindingModule {
@ContributesAndroidInjector
abstract fun tabsActivity(): TabSwitcherActivity

@ActivityScoped
@ContributesAndroidInjector
abstract fun tabsExperimentActivity(): TabSwitcherBottomBarFeatureActivity

@ActivityScoped
@ContributesAndroidInjector
abstract fun privacyDashboardActivity(): PrivacyDashboardActivity
Expand Down
19 changes: 2 additions & 17 deletions app/src/main/java/com/duckduckgo/app/statistics/VariantManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package com.duckduckgo.app.statistics
import androidx.annotation.WorkerThread
import com.duckduckgo.app.statistics.VariantManager.Companion.DEFAULT_VARIANT
import com.duckduckgo.app.statistics.VariantManager.Companion.referrerVariant
import com.duckduckgo.app.statistics.VariantManager.VariantFeature.BottomBarNavigation
import com.duckduckgo.app.statistics.store.StatisticsDataStore
import timber.log.Timber
import java.util.*
Expand All @@ -28,9 +27,7 @@ import java.util.*
interface VariantManager {

// variant-dependant features listed here
sealed class VariantFeature {
object BottomBarNavigation : VariantFeature()
}
sealed class VariantFeature

companion object {

Expand All @@ -43,19 +40,7 @@ interface VariantManager {
// SERP variants. "sc" may also be used as a shared control for mobile experiments in
// the future if we can filter by app version
Variant(key = "sc", weight = 0.0, features = emptyList(), filterBy = { noFilter() }),
Variant(key = "se", weight = 0.0, features = emptyList(), filterBy = { noFilter() }),

// Bottom Bar Navigation Experiment
Variant(
key = "mb",
weight = 1.0,
features = emptyList(),
filterBy = { noFilter() }),
Variant(
key = "mk",
weight = 1.0,
features = listOf(BottomBarNavigation),
filterBy = { noFilter() })
Variant(key = "se", weight = 0.0, features = emptyList(), filterBy = { noFilter() })

// All groups in an experiment (control and variants) MUST use the same filters
)
Expand Down
11 changes: 5 additions & 6 deletions app/src/main/java/com/duckduckgo/app/statistics/pixels/Pixel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,11 @@ interface Pixel {

CHANGE_APP_ICON_OPENED("m_ic"),

MENU_ACTION_POPUP_OPENED("m_nav_pm_o_%s"),
MENU_ACTION_FIRE_PRESSED("m_nav_f_p_%s"),
MENU_ACTION_REFRESH_PRESSED("m_nav_r_p_%s"),
MENU_ACTION_NEW_TAB_PRESSED("m_nav_nt_p_%s"),
MENU_ACTION_BOOKMARKS_PRESSED("m_nav_b_p_%s"),
MENU_ACTION_SEARCH_PRESSED("m_nav_s_p_%s"),
MENU_ACTION_POPUP_OPENED("m_nav_pm_o"),
MENU_ACTION_FIRE_PRESSED("m_nav_f_p"),
MENU_ACTION_REFRESH_PRESSED("m_nav_r_p"),
MENU_ACTION_NEW_TAB_PRESSED("m_nav_nt_p"),
MENU_ACTION_BOOKMARKS_PRESSED("m_nav_b_p"),

COOKIE_DATABASE_NOT_FOUND("m_cdb_nf"),
COOKIE_DATABASE_OPEN_ERROR("m_cdb_oe"),
Expand Down
Loading