Closed Bug 2082390 Opened 1 month ago Closed 19 days ago

[customizable menu] Basic "Customize menu" screen

Categories

(Firefox for Android :: Menu, task)

All
Android
task

Tracking

()

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: petru, Assigned: giorga)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][android-core])

Attachments

(2 external files)

Figma link
This should exist in Android-Components and it should be able to display the same same menu configuration that the browser menu displays:

  • the full menu configuration, all menu sections even if some might be hidden for the current tab
  • not "Extensions" or "More" subitems

It also needs to inform the integrators any time there is a reorder I propose this architecture:

  AC                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                         
  abstract class CustomizeMenuFragment : Fragment() {                                                                                                                                                                              
      abstract val menuStore: MenuStore                                                                                                                                                                                                  
                                                                                                                                                                                                                                         
      override fun onCreateView(...) = content {                                                                                                                                                                                         
          val groups by menuStore.observeAsComposableState { it.menuGroups }                                                                                                                                                             
          CustomizeMenuScreen(                                                                                                                                                                                                           
              groups = groups,                                                                                                                                                                                                           
              onSectionMoved = { groupId, toIndex ->                                                                                                                                                                              
                  menuStore.dispatch(MenuAction.SectionMoved(groupId, toIndex))                                                                                                                                                   
              },                                                                                                                                                                                                                         
          )                                                                                                                                                                                                                              
      }                                                                                                                                                                                                                                  
  }                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                         
  Fenix                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                         
  class FenixCustomizeMenuFragment : CustomizeMenuFragment() {                                                                                                                                                                           
      override val menuStore = buildMenuStore()                                                                                                                                                                                             
  }  

which would allow Fenix to

  • configure the initial state that needs to be rendered in the passed in menuStore
  • register own middleware to handle persisting the updated menu structure

** This ticket is only for building the AC Fragment which displays the menu structure.

Assignee: nobody → giorga
Pushed by giorga@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a617ba769c5e https://hg.mozilla.org/integration/autoland/rev/a5c3a7eab2cb Modify all MenuItemProviders to support CustomizeMenu. r=android-reviewers,petru
See Also: → 2086546
Status: NEW → RESOLVED
Closed: 19 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
Pushed by giorga@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/30a6895226ff https://hg.mozilla.org/integration/autoland/rev/539338ab5f6e [customizable menu] Basic "Customize menu" screen. r=android-reviewers,android-l10n-reviewers,parker,petru
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: