Skip to content

Commit 2240690

Browse files
authored
Fix: Broken snackbar Undo button (#6781)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1211316645347512?focus=true ### Description This PR fixes an issue when the snackbar was position behind a RecyclerView and the snackbar was not clickable. ### Steps to test this PR _Undo button (top omnibar)_ - [ ] Generate a lot of tabs (in developer settings) - [ ] Go to the tab switcher - [ ] Close some tab - [ ] Verify a snackbar appears at the bottom of the screen, above the tabs - [ ] Tap on the Undo button - [ ] Verify the deleted tab is restored _Undo button (bottom omnibar)_ - [ ] Change the omnibar position to the bottom - [ ] Go to the tab switcher - [ ] Close some tab - [ ] Verify a snackbar appears at the bottom, above the toolbar - [ ] Tap on the Undo button - [ ] Verify the deleted tab is restored
1 parent e17d88a commit 2240690

11 files changed

+19
-21
lines changed

app/src/main/res/layout/activity_browser.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<include
2626
android:id="@+id/topMockupSingleToolbar"
2727
android:layout_width="match_parent"
28-
android:layout_height="@dimen/toolbarSize"
28+
android:layout_height="?attr/actionBarSize"
2929
android:layout_alignParentTop="true"
3030
layout="@layout/include_omnibar_toolbar_mockup" />
3131

@@ -56,7 +56,7 @@
5656
<include
5757
android:id="@+id/bottomMockupSingleToolbar"
5858
android:layout_width="match_parent"
59-
android:layout_height="@dimen/toolbarSize"
59+
android:layout_height="?attr/actionBarSize"
6060
android:layout_alignParentBottom="true"
6161
layout="@layout/include_omnibar_toolbar_mockup_bottom" />
6262

app/src/main/res/layout/activity_tab_switcher.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
android:id="@+id/tabsContainer"
3838
android:layout_width="match_parent"
3939
android:layout_height="match_parent"
40-
android:elevation="10dp"
4140
app:layout_behavior="@string/appbar_scrolling_view_behavior">
4241

4342
<View

app/src/main/res/layout/include_find_in_page.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
android:orientation="horizontal"
2525
android:paddingHorizontal="2dp"
2626
tools:ignore="KeyboardInaccessibleWidget"
27-
tools:layout_height="@dimen/toolbarSize">
27+
tools:layout_height="?attr/actionBarSize">
2828

2929
<!-- The expected horizontal padding for content is 6dp but we're applying only 2dp
3030
because the remaining 4dp are added by the omnibar selection animation -->

app/src/main/res/layout/include_omnibar_toolbar_mockup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
xmlns:tools="http://schemas.android.com/tools"
2222
android:id="@+id/appBarLayoutMockup"
2323
android:layout_width="match_parent"
24-
android:layout_height="@dimen/toolbarSize"
24+
android:layout_height="?attr/actionBarSize"
2525
android:background="?daxColorToolbar"
2626
android:clipChildren="false">
2727

app/src/main/res/layout/include_omnibar_toolbar_mockup_bottom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
xmlns:tools="http://schemas.android.com/tools"
2222
android:id="@+id/appBarLayoutMockup"
2323
android:layout_width="match_parent"
24-
android:layout_height="@dimen/toolbarSize"
24+
android:layout_height="?attr/actionBarSize"
2525
android:background="?daxColorToolbar"
2626
android:clipChildren="false">
2727

app/src/main/res/layout/view_single_omnibar.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<androidx.appcompat.widget.Toolbar
4242
android:id="@+id/toolbar"
4343
android:layout_width="0dp"
44-
android:layout_height="@dimen/toolbarSize"
44+
android:layout_height="?attr/actionBarSize"
4545
android:clipChildren="false"
4646
app:contentInsetEnd="0dp"
4747
app:contentInsetStart="0dp"
@@ -364,7 +364,7 @@
364364
<androidx.constraintlayout.widget.ConstraintLayout
365365
android:id="@+id/customTabToolbarContainerWrapper"
366366
android:layout_width="0dp"
367-
android:layout_height="@dimen/toolbarSize"
367+
android:layout_height="?attr/actionBarSize"
368368
android:layout_marginHorizontal="@dimen/keyline_2"
369369
app:layout_constraintBottom_toBottomOf="parent"
370370
app:layout_constraintEnd_toStartOf="@id/iconsContainer"

common/common-ui/src/main/res/layout/include_tab_switcher_toolbar_bottom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,16 @@
2525
android:elevation="0dp"
2626
android:outlineProvider="none">
2727

28+
<View
29+
android:layout_width="match_parent"
30+
android:layout_height="0.5dp"
31+
android:background="?attr/daxColorShadeSolid" />
32+
2833
<androidx.appcompat.widget.Toolbar
2934
android:id="@+id/toolbar"
3035
android:layout_width="match_parent"
3136
android:layout_height="?attr/actionBarSize"
3237
android:background="?attr/daxColorToolbar"
33-
android:paddingTop="?attr/toolbarExtraPadding"
3438
android:theme="@style/TabSwitcher.Widget.Toolbar"
3539
app:popupTheme="@style/Widget.DuckDuckGo.PopUpOverflowMenu" />
3640

common/common-ui/src/main/res/layout/include_tab_switcher_toolbar_top.xml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@
2828
<androidx.appcompat.widget.Toolbar
2929
android:id="@+id/toolbar"
3030
android:layout_width="match_parent"
31-
android:layout_height="@dimen/tabSwitcherToolbarTopSize"
32-
android:paddingBottom="?attr/toolbarExtraPadding"
31+
android:layout_height="?attr/actionBarSize"
3332
android:background="?attr/daxColorToolbar"
3433
android:theme="@style/TabSwitcher.Widget.Toolbar"
3534
app:popupTheme="@style/Widget.DuckDuckGo.PopUpOverflowMenu" />
3635

36+
<View
37+
android:layout_width="match_parent"
38+
android:layout_height="0.5dp"
39+
android:background="?attr/daxColorShade" />
40+
3741
</com.google.android.material.appbar.AppBarLayout>

common/common-ui/src/main/res/values/design-system-attrs.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,4 @@
2929
<attr name="cookiesAnimationRadius" format="dimension"/>
3030
<attr name="cookiesAnimationHeight" format="dimension"/>
3131

32-
<attr name="toolbarExtraPadding" format="dimension"/>
33-
3432
</resources>

common/common-ui/src/main/res/values/design-system-dimensions.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
<dimen name="toolbarIconPadding">3dp</dimen>
4444
<dimen name="toolbarIcon">40dp</dimen>
4545
<dimen name="toolbarSize">60dp</dimen>
46-
<dimen name="tabSwitcherToolbarTopSize">56dp</dimen>
4746

4847
<!-- Navigation Bar -->
4948
<dimen name="experimentalNavigationBarPaddingTopWhenStandalone">12dp</dimen>

0 commit comments

Comments
 (0)