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 1

This is not the most recent revision of the diff. The latest diff is revision 2. See what's changed.

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.
79e9bd188a423f8112c9685d94e2561ac2f3824c Michelle Aubin
src/ink/js/components/views/baseMenuHandleView.ts
Loading...