Unless configured otherwise, popups should change direction if there is no space in their preferred direction (i.e. the popup hits the edge of the viewport/container and gets clipped to a very small size).
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
MenuSelectWidget, PopupWidget: Automatically change popup direction if there is no space | oojs/ui | master | +120 -9 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T160001 [minor] RC filters - the highlight color selection box is not fully displayed at the bottom of viewport | |||
Resolved | matmarex | T158934 Automatically change popup direction if there is no space | |||
Resolved | matmarex | T178892 ClippableElement only clips with bottom and right edges (but not with top and left edges) | |||
Resolved | matmarex | T106095 Fixed-position headers/footers obscure last elements of OOUI dropdowns |
Event Timeline
This should be done not only for PopupWidget, but also for other dropdowny/popuppy things, e.g. DropdownWidget. (See comments on T107036)
So the re-orientation on normal <select> menus does work on a boundary. It's not automatically happening with only more size available above or below.
Change 385309 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[oojs/ui@master] [WIP] MenuSelectWidget, PopupWidget: Automatically change popup direction if there is no space
Change 385309 merged by jenkins-bot:
[oojs/ui@master] MenuSelectWidget, PopupWidget: Automatically change popup direction if there is no space
Although not main focus of this ticket, having adaptable popup direction solved T160001 . I have rechecked after OOjs UI got updated and popup is indeed displayed above the highlight button when there is no room to display the popup below the button.
Here is how it looked on OOjs UI v0.24.2 and how it works on OOjs UI v0.24.3 with highlights popup on RC filters:
OOjs UI v0.24.2 | OOjs UI v0.24.3 |
---|---|
Is this expected?
The main reason I'm writing on this ticket is to get confirmation if following behavior is expected; When button itself is clipped, the popup does not adjust pop up direction to be above the button, but is rather displayed below the button and clipped alongside.