Move base menu management from MenuButtonView to BaseMenuHandleView.

Review Request #13881 — Created May 21, 2024 and submitted — Latest diff uploaded

Information

Ink
master

Reviewers

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, a buildMenu() 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.

Commits

Files