[customizable menu] Support persisting the reordered menu structure
Categories
(Firefox for Android :: Menu, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox161 | --- | fixed |
People
(Reporter: petru, Assigned: petru)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][android-core])
Attachments
(8 external files, 1 obsolete file)
Fenix should handle the action informing about an updated menu structure in its own Middleware.
Updated•1 month ago
|
| Assignee | ||
Updated•27 days ago
|
| Assignee | ||
Comment 1•18 days ago
|
||
This ensures a cleaner separation between the state and actions of
MenuStore and what we need for the customization screen, eg: what
menu sections to show as hidden and support for informing when the
menu structure has changed.
| Assignee | ||
Comment 2•18 days ago
|
||
| Assignee | ||
Comment 3•18 days ago
|
||
MenuConfigurations.browser can now order the menu sections as chosen by
the user, and there is a default structure with support for sections
which start hidden.
CustomizedMenuInfo.reconciledWith adapts a stored customization to the
sections available in the app: it drops unknown sections, keeps the
required ones visible, and adds sections new in this app version as shown
or hidden as in the default.
Also moves the mapping of a menu section to a MenuItemsGroup to
MenuSectionConfiguration so it can be reused outside of MenuBuilder.
| Assignee | ||
Comment 4•18 days ago
|
||
Splits MenuConfigurations into BrowserMenuConfiguration, HomeMenuConfiguration
and CustomTabMenuConfiguration, each owning its own section ids, and moves
them, together with MenuSectionConfiguration and FenixMenuItem, to a new
components.menu.configuration package.
Only the browser menu supports customization, so this keeps that logic
separate from the other menus.
No behavior changes.
| Assignee | ||
Comment 5•18 days ago
|
||
Add MenuCustomizationRepository, which reads and saves the user's browser
menu customization through the proto DataStore. Stored data is reconciled
with the sections currently available in the app every time it is read,
and only written back when the user changes the menu.
The browser menu is built from the stored customization, falling back to
the default structure while it is not read yet. The customize menu screen
shows the current structure and saves every change through the new
CustomizeMenuMiddleware, which also tells the screen whether the menu
differs from the default one.
The customization is read ahead of the menu being opened after visual
completeness, or when the customize menu screen is enabled in secret
settings.
| Assignee | ||
Comment 6•18 days ago
|
||
CustomizeMenuMiddleware now fills the customize menu screen with the
actual items of every browser menu section, built by a MenuBuilder over
BrowserMenuConfiguration.allSections() so that sections the user hid are
also available.
Sections are shown in the user's order, with support for mandatory
sections and also hidden ones.
| Assignee | ||
Comment 7•18 days ago
|
||
Two sections were skipped from showing in the "Customize menu screen".
We should allow all sections to be customized to ensure that when these
do show up in the menu they will follow the order the user wanted.
| Assignee | ||
Comment 8•18 days ago
|
||
Remove the interactions support for items shown in this screen.
Reuse the shape, semantics and content helpers of the shared menu
composables instead of keeping private copies, and drop the unused
backgroundColor parameters.
Only pass the visible items of a collapsed section so that the hidden
ones are not read by TalkBack.
Show the "Drag sections to reorder" text as a marquee when it does not
fit next to the preview button.
Keep a bottom margin under the hidden sections placeholder.
Reuse more composables instead of duplicating the code.
| Assignee | ||
Comment 9•18 days ago
|
||
Updated•14 days ago
|
Updated•14 days ago
|
Comment 10•13 days ago
|
||
Comment 11•13 days ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c9c709a41334
https://hg.mozilla.org/mozilla-central/rev/6cd9d68a8013
https://hg.mozilla.org/mozilla-central/rev/726f72c263a8
https://hg.mozilla.org/mozilla-central/rev/ea10f180696e
https://hg.mozilla.org/mozilla-central/rev/d266905364e7
https://hg.mozilla.org/mozilla-central/rev/a67486a9d738
https://hg.mozilla.org/mozilla-central/rev/80520123d80f
https://hg.mozilla.org/mozilla-central/rev/cd24f566d091
Description
•