Skip to content

Conversation

@malmstein
Copy link
Contributor

Task/Issue URL: https://app.asana.com/0/72649045549333/1177859689086266
Tech Design URL:
CC:

Description:
The Bottom Navigation experiment is now concluded and we've agreed to remove it for now. This PR removes all the code from the experiment.

Steps to test this PR:

  1. Open the app
  2. Ensure ""mb" variant is no longer appearing
  3. There should be no traces of bottom navigation
  4. Open Tab Switcher screen
  5. There should be no traces of bottom navigation

Internal references:

Software Engineering Expectations
Technical Design Template

Copy link
Contributor

@cmonfortep cmonfortep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks fine! Just a few things that we may want also to remove from the experiment and we are good to go.

<com.duckduckgo.app.browser.ui.BottomNavigationBar
android:id="@+id/bottomNavigationBar"
android:layout_width="match_parent"
android:layout_height="@dimen/bottomBarHeight"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pending to remove this dimen

window.statusBarColor = Color.TRANSPARENT

setContentView(R.layout.activity_tab_switcher_bottom_bar_feature)
extractIntentExtras()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this file be totally removed? I see we removed it from the manifest and it's related to the BottomBar experiment. Also activity_tab_switcher_bottom_bar_feature.xml + layout_tabs_bottom_navigation_bar.xml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right! I"m removing all those files

private fun init(context: Context, attrs: AttributeSet?) {

val ta: TypedArray = context.obtainStyledAttributes(attrs, R.styleable.BottomNavigationBar)
val resourceId = ta.getResourceId(R.styleable.BottomNavigationBar_layoutResource, R.layout.layout_browser_bottom_navigation_bar)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attrs.xml -> to remove styleable BottomNavigationBar

Also bottom_navigation_bar_bg.xml, but I couldn't find where we were using that background in develop 🤷‍♀️

private fun isBottomNavigationFeatureEnabled() =
variantManager.getVariant().hasFeature(VariantManager.VariantFeature.BottomBarNavigation)

private fun decorateWithFeatures() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about removing this method and calling directly from onActivityCreated to decorator.decorateWithFeatures() (including the renameing of decorator.decorate() to decorator.decorateWithFeatures()) ?

It's just to simplify method forwarding

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a good idea, no need to have calls to other methods if they are only called from one place

configureLongClickOpensNewTabListenerWithToolbarOnly()
removeUnnecessaryLayoutBehaviour()
fun decorateToolbarMenus(viewState: BrowserViewState) {
decorator.updateToolbarActionsVisibility(viewState)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace method call with updateToolbarActionsVisibility implementation? Also to simplify method forwarding for just one line.

@malmstein
Copy link
Contributor Author

@cmonfortep I've added the changes you requested. Thanks for the review!

Copy link
Contributor

@cmonfortep cmonfortep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :shipit:

@malmstein malmstein merged commit 03c57e9 into develop Jun 3, 2020
@malmstein malmstein deleted the feature/david/remove_bottom_bar branch June 3, 2020 12:58
@malmstein malmstein restored the feature/david/remove_bottom_bar branch June 4, 2020 16:41
@malmstein malmstein deleted the feature/david/remove_bottom_bar branch July 1, 2020 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants