Add sticky opening options for menus.

Review Request #13677 — Created March 28, 2024 and submitted

Information

Ink
master

Reviewers

Menus are no longer opened as "sticky" by default. A sticky menu is when
it stays open even when the mouse moves away, unless clicking outside of
the menu or triggering another menu to open. This sort of menu makes
sense for some kinds of UI elements, but can be a nuisance when hovering
over simple dropdowns of options (like we have in the review request
and top bar actions in Review Board).

Now a menu will close when moving the mouse outside of the menu or its
controller by default. Passing sticky: true when opening will now place
the menu in sticky mode (whether or not the menu is currently open).

MenuButton has been updated to open in sticky mode when using a
keyboard shortcut or a direct click on the dropdown button. Otherwise,
it opens in a non-sticky mode.

Unit tests pass.

Tested that menus in Review Board weren't sticky by default. Clicking the
dropdown handle on a MenuButton did result in a sticky menu.

Summary ID
Add sticky opening options for menus.
Menus are no longer opened as "sticky" by default. A sticky menu is when it stays open even when the mouse moves away, unless clicking outside of the menu or triggering another menu to open. This sort of menu makes sense for some kinds of UI elements, but can be a nuisance when hovering over simple dropdowns of options (like we have in the review request and top bar actions in Review Board). Now a menu will close when moving the mouse outside of the menu or its controller by default. Passing `stickyOpen: true` when opening will now place the menu in sticky mode (whether or not the menu is currently open). `MenuButton` has been updated to open in sticky mode when using a keyboard shortcut or a direct click on the dropdown button. Otherwise, it opens in a non-sticky mode.
edfdbff9c67049de8d635e60d92a763c7232e820
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (15ce3c0)