Align dropdown position within super sidebar
Details
The placement
prop for GlDisclosureDropdown
in the super sidebar isn't aligning the menus to the desired position. This is likely because the sidebar width is the same as the dropdown width (256px
. popper.js positions the menus to a default/safe position to avoid content being outside of the viewport.
There are a few approaches that might resolve the issue:
- Increase sidebar width to
272px
(256px
+16px
) - Decrease dropdown width to
15rem
/240px
(256px
-16px
) either:- Global change to
GlDisclosureDropdown
/GlCollapsibleListbox
or - Provide as prop/override for specific usecases
- Global change to
- Investigate popper.js positioning further to see if there are positions + offsets to avoid dropdowns touching edge of viewport/sidebar
- Maybe a skidding value to provide to dropdown to give an offset along the reference
Current positioning:
Help menu | Merge request menu | User menu |
---|---|---|
272px
(256px
+ 16px
)
Increase sidebar width to Help menu | Merge request menu | User menu |
---|---|---|
15rem
/240px
(256px
- 16px
)
Decrease dropdown width to Help menu | Merge request menu | User menu |
---|---|---|
Edited by Scott de Jonge