Fenix: FNX-486 ⁃ [Bug] Context menus across app are too wide (like Bookmarks)

Created on 21 Apr 2019  ·  13Comments  ·  Source: mozilla-mobile/fenix

Steps to reproduce

  1. Open Library > Bookmarks
  2. Open context menu next to a bookmark

Expected behavior

Narrower menu that shows menu items without looking oddly wide.

Fennec and Kiwi look neater:

fennec-bookmark-menu

kiwi-bookmark-menu

Actual behavior

Menu looks too wide.

fenix

Device information

  • Android device: Pixel 2
  • Fenix version: latest play store
Bookmarks P5 engverified quality ready ac

All 13 comments

This has already taken a lot of work, and isn't worth continuing bc of eng effort for ROI.

@liuche is this still too much ENG work (narrowing the BOOKMARK context menu)? If so, please comment and close this.

@sblatz @ekager I assume the difficulty here hasn't changed much, and it's still hard to handle dynamically sizing (or shrinking) the context menus in AC?

cc @Mugurell it looks like you landed something in AC that could help with this?

Thanks Emily!

Indeed, I recently added support for dynamic width menus in A-C (https://github.com/mozilla-mobile/android-components/issues/6499) but using only xml set values.
The next step would be to add runtime values support, should be fairly easy.

For this ticket we would just need to know a min/max width for the menu.
I guess

  • min would be let's say 10dp (as small as possible)
  • max would be 250dp (I think what it is now)

?

The menu will have a dynamic width between this values, it will be as narrow as the widest menu action.

Sounds good to me! As long as it's adjusting to the widest menu item doesn't really matter what the min is 👍

Having the possibility of setting a min/max size for each menu is definitely nice.
Based on also what Emily said above I was thinking that maybe we should make it as a default for all menus to be as small as their widest item.
Currently all menus can have between 250dp-314dp width. Should we by default allow for even a smaller width?

Would be great to align to an 8dp grid and follow material guidelines where the minimum width is 112dp and max width is 280dp.

This is still important to Vesta, but it's too much work before Release.

I think I might have an easy solution following the recent https://github.com/mozilla-mobile/fenix/issues/7157 and the UX directions from:

The menu width should be dynamic between this constraints, wrapping it's content.

@Mugurell I think I'm somewhat late to report my comments now since there're some commits that have already been added, but can you please take a look at my comment on the issue #11716. I think the three-dot menus on the bottom navigation tray and the menu at the new Tabs Tray should be reverted to the previous state. I know it'll introduces some inconsistencies with the other existing menus but I think the menus I mentioned should be expanded back because of the usability of the buttons and when using them with only the right hand and the thumb button will be at the centre so clicking it'll be harder if the buttons are reduced in size.

Verified as fixed on the latest Nightly build from 6/19 with Sony Xperia Z5 Premium (Android 7.1.1), and OnePlus 5T (Android 9).
The context menus, three-dot menus, bookmark menus are dynamic, adjusting to it's content.

Sony-context menu
Sony-bookmark menu
Sony menu
OnePlus-menu

Was this page helpful?
0 / 5 - 0 ratings