Page MenuHomePhabricator

Apply skin body styles to teleported elements
Closed, ResolvedPublic2 Estimated Story Points

Description

Splitting out from Eric's comment to solve T345308 and future users of Codex dialogs.

Ideally the fix should be applied in Vector (and also separately in Minerva and any other skins you need to support) – the styles should be added to skinStyles/mediawiki.page.ready.less as skinStyle overrides.

See https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/952950 for an example of how to do this. I just don't know the full set of body styles that are expected. I'd recommend coordinating with Web to ensure that the correct body text styles from the skins can be inherited in this new location.

Acceptance criteria

  • Vector: Body styles are applied to teleported elements, so far only dialogs
  • Vector legacy: Body styles are applied to teleported elements, so far only dialogs
  • Minerva: Body styles are applied to teleported elements, so far only dialogs

Notes
The skin body styles live in different less files (typography and screen). We could add the vector-body class to the teleport target element or split body styles into mixins and reuse them in skinStyles/mediawiki.page.ready.less.

Event Timeline

Change 960106 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/skins/Vector@master] [WIP] Apply body styles to mw teleport target

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

I went ahead and added the vector-body class to the teleport target because using mediawiki.page.ready.less for already defined styles seems redundant but happy to rework to use mixins(?). Feedback from web team appreciated :) cc @Jdlrobson @Jdrewniak

Sgs renamed this task from Apply skin body styles to teleported dialogs to Apply skin body styles to teleported elements .Sep 22 2023, 5:06 PM
Sgs updated the task description. (Show Details)
ovasileva triaged this task as Medium priority.Sep 25 2023, 5:23 PM

Change 960106 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Apply body styles to mw teleport target

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

I've merged the above patch. I'm wondering if you also want to add the class for legacy Vector? I'm not sure if that's impacted by the same issue?

Change 961704 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/skins/Vector@master] Apply body styles to teleported elements in vector legacy

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

Change 961729 had a related patch set uploaded (by Sergio Gimeno; author: Sergio Gimeno):

[mediawiki/skins/MinervaNeue@master] Apply content styles to mw teleport target

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

Sgs changed the task status from Open to In Progress.Sep 28 2023, 10:49 AM

I've merged the above patch. I'm wondering if you also want to add the class for legacy Vector? I'm not sure if that's impacted by the same issue?

Thank you! Yes, the issue is present in all skins. I went ahead and did the same in Minerva and Vector legacy.

Change 961704 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Apply body styles to teleported elements in vector legacy

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

Change 961729 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Apply content styles to mw teleport target

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

Etonkovidova subscribed.

Checked (along with T345308) in testwiki wmf.29 - no regression issues found.

matmarex renamed this task from Apply skin body styles to teleported elements to Apply skin body styles to teleported elements.Oct 5 2023, 11:15 PM
matmarex subscribed.

I filed T348287 about doing this for other skins too (by taking advantage of the styles for OOUI dialogs that they already have).