Make drop-down menus responsive to changing browser widths.

Review Request #14174 — Created Sept. 16, 2024 and submitted — Latest diff uploaded

Information

Ink
master

Reviewers

Currently, drop-down menus (children on BaseMenuHandleView) could be cut
off depending on the size of the browser/screen. This change makes the
lateral positioning of the menu responsive so that the full width of the
menu is always visible on screen. If the menu element is being cut off
on the right, the entire menu is moved to the left so that it is on
screen. We also ensure that the menu width is never bigger than the
width of the window, and that the menu can't be cut off on the left.

Tested resizing the browser window in storybook, saw that the menus
in MenuButtonView and MenuLabelView positioned themselves correctly.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Make drop-down menus responsive to changing browser widths.
Currently, drop-down menus (children on BaseMenuHandleView) could be cut off depending on the size of the browser/screen. This change makes the lateral positioning of the menu responsive so that the full width of the menu is always visible on screen. If the menu element is being cut off on the right, the entire menu is moved to the left so that it is on screen. We also ensure that the menu width is never bigger than the width of the window, and that the menu can't be cut off on the left.
c8a19928df2f74c16327bca9ac6abe86e5f38819 Michelle Aubin
src/ink/js/components/views/baseMenuHandleView.ts
Loading...