[customizable-menu] Handle user interactions in the menu items providers which configures menu items
Categories
(Firefox for Android :: Menu, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox159 | --- | fixed |
People
(Reporter: petru, Assigned: petru)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][android-core])
Attachments
(2 external files)
Based on:
- recent work review suggesting to split the menu items interactions handling
- how big the current MenuMiddleware already is
- needing to reuse most of the menu items shown in the browser's menu also on home and custom tabs
We should look into refactoring out the current menu items interactions handling from a single place to many.
The most direct split seems to be one to the current *MenuItemProviders which already configure the details of a menu item plus the action dispatched for user interactions. Same providers - one for each menu item - could also handle the user interaction ensuring complete and fully encapsulated menu item UX.
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
BrowserMenuBuilder used its resolver to build an item's provider both when
combining the items into the menu and, for items expanding to others, again on
every menu update. With the resolver building a new provider on each call, every
update created another "More" provider, starting another collector that ran for
as long as the menu was shown, and used it in place of the one the menu was
built from.
The providers of a menu are now built once by MenuItemsRegistry, together with
the configuration they are for, so that BrowserMenuBuilder and anything else
needing them work with the same instances. This also prepares for letting the
providers handle what happens when their items are clicked.
| Assignee | ||
Comment 2•1 month ago
|
||
Moved all the menu items interactions handling from MenuMiddleware to
each of the menu item providers configuring the details of what menu
items to show and what event to be dispatched for the user interaction.
Now they will also handle said event dispatched for user interaction.
MenuMiddleware is left only keeping the menu up to date and passing
events to the menu item providers also knowing how to handle the events.
Comment 4•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/0dc62f7b8063
https://hg.mozilla.org/mozilla-central/rev/067cb14deb3a
Description
•