Fenix: [Bug] Tab tray collapses to semi-closed state when tapping on it

Created on 11 Sep 2020  ·  6Comments  ·  Source: mozilla-mobile/fenix

Steps to reproduce

  1. Have the tab tray in its default open state with zero or only a few tabs
  2. Tap on the area next to the buttons for PBM and normal browsing - try to not move your finger while tapping or use a long-press gesture

Expected behavior

I do not know what the expected behaviour here should be.

Actual behavior

The tab tray closes halfway. Doing this in landscape mode produces an even less useful result. Note: Same result as #13777 but different STR.

tab-tray-semi-closed

Device information

  • Android device: Sony Xperia Z2, Android 6.0.1
  • Fenix version: Nightly 200911 06:01 (Build #2015763249)
    AC: 58.0.20200908130811, 52ac53ba1
    GV: 82.0a1-20200907094115
    AS: 61.0.13
E3 Tabs engverified 🐞 bug

Most helpful comment

Looked into this and saw that it's not really possible to disable STATE_HALF_EXPANDED while keeping also fitToContents = false.

fitToContents = false would disable STATE_HALF_EXPANDED but then we'd need to make some bigger changes in order for the UI to look the same as it is now. And I saw no clear specs about the tabs tray height in expanded/collapsed state or the offsets so this would mean more work.

What I'll go with is just setting a very small height for the tabs tray when in STATE_HALF_EXPANDED to effectively disable it. When swiping down on the tabs tray while in STATE_COLLAPSED the tray will still be able to transition to STATE_HALF_EXPANDED but the height of the tray will be miniscule and it will immediately be hidden so this troublesome state will be invisible to the users.

To respond to @topotropic to the question above: yes, I'll make it so that nothing will happen when users will tap the header part of the tray.

All 6 comments

According to https://material.io/develop/android/components/sheets-bottom, "STATE_COLLAPSED: The bottom sheet is visible but only showing its peek height". Maybe this can be avoided by using setSkipCollapsed?

@hwinnemoe you're right. 🤔 I think we had that set at one point. Will have to investigate what happened to it

The state is actually STATE_HALF_EXPANDED. Can UX weigh in on the expected behavior? We could hide the tab tray completely instead of showing it half expanded, or we could just stick to the current behavior.

@mcarare would it be possible that nothing happens when people just tap on the header part of the sheet?

Looked into this and saw that it's not really possible to disable STATE_HALF_EXPANDED while keeping also fitToContents = false.

fitToContents = false would disable STATE_HALF_EXPANDED but then we'd need to make some bigger changes in order for the UI to look the same as it is now. And I saw no clear specs about the tabs tray height in expanded/collapsed state or the offsets so this would mean more work.

What I'll go with is just setting a very small height for the tabs tray when in STATE_HALF_EXPANDED to effectively disable it. When swiping down on the tabs tray while in STATE_COLLAPSED the tray will still be able to transition to STATE_HALF_EXPANDED but the height of the tray will be miniscule and it will immediately be hidden so this troublesome state will be invisible to the users.

To respond to @topotropic to the question above: yes, I'll make it so that nothing will happen when users will tap the header part of the tray.

Hi, verified as fixed on the latest Nightly Build 201105 using the following devices:
• Google Pixel 3a (Android 11)
• Huawei Mate 20 Lite (Android 10)
• OnePlus A3 (Android 6.0.1)

► Video
20201105-092949

Was this page helpful?
0 / 5 - 0 ratings