Page MenuHomePhabricator

z-index hacks for active button widgets cause them to appear "on top of" various other things
Closed, ResolvedPublic

Description

We use these hacks in MW theme to ensure the correct border appears on top, but having plain widgets set z-indexes is really horrible, as it means the rest of the z-index stack of the UI has to be designed around them.

Here's an example of the VE mobile standalone demo failing, for example:

pasted_file (188×815 px, 9 KB)

While in MW our overlays have a higher z-index, other users may not want to / may not be able to increase the z-index of overlays.

Event Timeline

The selected/non-selected border colours are currently very similar shades of grey, so just removing this z-index will result be fairly un-noticeable.

This could probably be resolved by creating a stacking context on the ButtonGroupWidget/ButtonSelectWidget/whatever?

@Esanders @matmarex To repeat and see if understood correctly (the image doesn't fully indicate the issue for me): Getting rid of z-index on .oo-ui-buttonElement-button states and just feature it at ButtonGroup- and ButtonSelectWidgets?

Yes. And also,

.oo-ui-buttonSelectWidget {
    z-index: 0;
    position: relative;
}

…to create a stacking context and prevent the .oo-ui-buttonOptionWidget z-index from "leaking out". (Similar for ButtonGroupWidget probably.)

I think this screenshot from T145579 makes the issue clearer:

selected-hover-tooltip.png (454×706 px, 54 KB)

Change 310806 had a related patch set uploaded (by Bartosz Dziewoński):
MediaWiki theme: Refactor z-index inside ButtonSelectWidget/ButtonGroupWidget

https://gerrit.wikimedia.org/r/310806

matmarex renamed this task from Remove z-index hacks for button group widgets to z-index hacks for active button widgets cause them to appear "on top of" various other things.Sep 15 2016, 11:31 AM

Change 310806 merged by jenkins-bot:
MediaWiki theme: Refactor z-index inside ButtonSelectWidget/ButtonGroupWidget

https://gerrit.wikimedia.org/r/310806

Volker_E triaged this task as High priority.
Volker_E moved this task from Backlog to Reviewing on the OOUI board.
Ryasmeen reopened this task as Open.EditedSep 20 2016, 9:23 PM

I still that see that active buttons are appearing over the tooltip, however it got fixed for hovered buttons, I can no more hover or click through buttons over the tooltip.
Reopening it since it seems not completely fixed.

Screen Shot 2016-09-20 at 10.17.01 PM.png (470×711 px, 56 KB)

It's fixed in OOjs UI 0.18.0 which isn't anywhere yet. It'll get into wmf.22, probably. Given the size of the patch, I don't think it's worth trying to pull it in early.