react-components
react-components copied to clipboard
chore: Allow Contextual Menu Component to be positioned optimally [WD-10977]
… vertically
Done
- Added a scss file for Contextual Menu
- Implemented initial logic by @mas-who to vertically position the Menu optimally based on the viewport height.
- Then transferred this logic from AdjustVerticalHeight function in Contextual Menu, to updateVerticalPosition function in ContextualMenuDropdown.tsx such that the menu may be adjusted according to both the container height and the viewport height.
QA
Storybook
To see rendered examples of all react-components, run:
yarn start
QA in your project
from react-components
run:
yarn build
npm pack
Install the resulting tarball in your project with:
yarn add <path-to-tarball>
Percy steps
N/A
Fixes
- Contextual Menu dropdown now displays "upwards" if there is not enough space downwards.