Move base menu management from MenuButtonView to BaseMenuHandleView.
Review Request #13881 — Created May 21, 2024 and submitted
BaseMenuHandleView
is a new base class responsible for setting up a
MenuView
and opening/closing it based on key and mouse events. It
provides the base interface for standard options, abuildMenu()
method
for setting up the menu and event handlers, and subcomponent handlers
for crafting menu items directly in the handle.
MenuButtonView
has been updated to leverage this, allowing it to
concentrate on the button states and rendering, rather than the menu
management.An upcoming change will introduce a new component leveraging this base
class to provide a label-based drop-down, which will be useful for more
menubar-style UIs.
Unit tests passed.
Thoroughly tested
MenuButtonView
in Storybook and in Review Board.
Summary | ID |
---|---|
1b3603b067843b23b78f8f1cd1a728185ae10d0a |