Page MenuHomePhabricator

`vector-sticky-header-enabled` class added even when not using the Vector2022
Closed, ResolvedPublic

Description

This class should not be added when using vector classic, and is partially responsible for T312783.

Event Timeline

Change 812886 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/skins/Vector@master] Move code for adding sticky header class to SkinVector22.php

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

is partially responsible for T312783.

Can you expand on that?

This class and associated CSS should not be used outside Vector 2022 skin, so I'm not sure I understand how this was causing a bug. The referenced bug is also Vector 2022 not classic Vector, and presumably this change only impacts classic Vector. I'm keen to understand this better as it suggests some code is loading where it shouldn't. Thanks in advance.

Change 812886 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Move code for adding sticky header class to SkinVector22.php

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

Jdlrobson claimed this task.

is partially responsible for T312783.

Can you expand on that?

This class and associated CSS should not be used outside Vector 2022 skin, so I'm not sure I understand how this was causing a bug. The referenced bug is also Vector 2022 not classic Vector, and presumably this change only impacts classic Vector. I'm keen to understand this better as it suggests some code is loading where it shouldn't. Thanks in advance.

The class is getting added to the <html> element in Vector classic (as can be seen here: https://en.wikipedia.org/wiki/Main_Page?useskin=vector). The CSS rule .vector-sticky-header-enabled .mw-notification-area is also getting loaded in Vector classic as it lives in Vector/skinStyles/mediawiki.notifications.less, which covers both versions. This means that in vector classic the z-index was getting reset to 3, even though that hack was only supposed to target vector-2022.

Right. That seems like a bug dating back to when Vector and Vector 2022 shared skin styles. vector-2022 and vector should use their own skin styles files at this point.