Page MenuHomePhabricator

Handle skin specific history page styles better
Open, MediumPublic

Description

Description

This task was spun out of T345306
We use core mediawiki button mixins to apply button styles to the thanks and undo buttons the Minerva AMC history page. This is unique from how the history page is rendered on Vector and other skins and the motivation here is to make these look like buttons in the Minerva skin but NOT in legacy skins e.g. Vector, Vector 2022 etc..
This task is to explore long term solutions to this issue, and whether or not Codex should provide button mixins

Options

  1. Update the history page so that it supports rendering with and without Codex (configurable per skin)
  2. use same markup on all skins but introduce a Codex CSS mixin so buttons without the cdx-button class can be styled to look like buttons (existing method)
  3. Style the thank and undo buttons on all skins to look like Codex buttons

Event Timeline

It seems to me like the "ideal" would be for markup & components to be the same regardless of skins, and then skin-specific styles might override. If that's not feasible, and (especially) if this is a situation that will come up again and again, then yeah maybe exposing some CSS-only Button styles as a mixin may be worth introducing.

If there is only a single situation where it comes up though, it might be better to see if we can reconsider the design.

Change 958581 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] History: Do not use MediaWiki UI for button styling

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

Change 958582 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] PagerTools: Use codex buttons when configured for tools

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

Change 958583 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/Thanks@master] Thanks should use preferred classes for thanks link

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

@egardner https://gerrit.wikimedia.org/r/958582 should allow us to do away with the mixin and vary the HTML based on skin. We have been using skin options to vary HTML in other ways so this seems consistent with other elements.

The Thanks follow up patch (https://gerrit.wikimedia.org/r/958583) makes use of the new hook parameter.

Those 2 patches should unblock web team from getting rid of the mixin in the history page.

Could DST review the approach within the next month and let me know if you see any problems with this proposed path forward (or suggest alternative approaches?)
Thanks in advance.

Change 958989 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Stop using mediawiki ui mixin for history page

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