[customizable-menu] Add a ExpandableMenuItem to compose-menu
Categories
(Firefox for Android :: Menu, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox157 | --- | fixed |
People
(Reporter: petru, Assigned: petru)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][android-core])
Attachments
(1 external file)
Based on the recent investigation we need special support for two scenarios:
- the "Extensions" menu item and
- the "More" menu item
Basic overview:
- header row plus a body revealed beneath it.
- animatedVisibility with expandVertically(from = Top) + fadeIn / shrinkVertically + fadeOut, matching the current ExpandableMenuItemAnimation from Fenix.
expandedstatus and onExpandedChange are hoisted.- will take in as
childrena list ofMenuItemto display asMenuListItem(see bug 2067220).
Note: We might need to support moving the focus to the first item in the "More" section when this is expanded and is removed from the menu. This is not currently supported in Fenix.
| Assignee | ||
Updated•2 months ago
|
Updated•2 months ago
|
| Assignee | ||
Comment 1•2 months ago
|
||
Investigating the colors used by all the menu items in Fenix to find the commonalities I see there is quite a bit of disparity I saw the following configuration for the 4 possible states an item could be in:
| Element | DEFAULT | ACTIVE | DISABLED | WARNING |
|---|---|---|---|---|
| Title | onSurface |
tertiary |
onSurface @38% |
error |
| Summary | onSurfaceVariant |
tertiary |
onSurface @38% |
error |
| Icon tint | onSurfaceVariant |
tertiary |
onSurface @38% |
error |
| Badge container | surfaceContainerHigh |
tertiaryContainer |
surfaceContainerHigh |
surfaceContainerHigh |
| Badge text | onSurface |
tertiary |
onSurface @38% |
error |
| "New" indicator container | information |
information |
information @38% |
information |
| "New" indicator text | onPrimary |
onPrimary |
onPrimary |
onPrimary |
| Row background | surfaceBright |
surfaceBright |
surfaceBright |
surfaceBright |
| Divider | outlineVariant |
outlineVariant |
outlineVariant |
outlineVariant |
All values are MaterialTheme.colorScheme roles. @38% is .copy(alpha = 0.38f).
Only the badge container varies by state, and only for ACTIVE. Title and summary/icon differ only
in DEFAULT; in every other state they share a colour.
Sources
Element state is independent of item state
Summary, badge and action button each carry their own MenuItemState; they do not inherit the
item's.
ExtensionsMenuItem.kt:155greys the summary while the row stays enabled.IPProtectionMenuItem.kt:207gives the badgeACTIVEorWARNINGwhile the row stays
enabled.
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 2•2 months ago
|
||
When clicked this will show an expanded list of "subMenuItems".
When clicked again this list will be collapsed, all happening with an animation.
Updated•2 months ago
|
Comment 4•2 months ago
|
||
| bugherder | ||
Description
•