Page MenuHomePhabricator

Use Codex button/icon markup instead of mediawiki ui markup in Vector
Closed, ResolvedPublic5 Estimated Story Points

Description

Blockers: https://gerrit.wikimedia.org/r/c/design/codex/+/919207 and T336548 and T336533 and Codex v0.10.0

In T335710 we worked out the remaining blockers for switching to Codex markup. This task is for making the actual change.

Cached HTML should not be a problem for the most part, as mediawiki.ui.icon/mediawiki.ui.button will be loaded alongside the old mark up.

TODO

  • Make sure MediaWiki core is using a Codex version greater than v0.10.0 with fixes for the blockers above

We will switch the markup for:

  • Buttons
  • Icons
  • Check <label> and <a> elements in particular. Codex doesn't reset these so we'll need to do that inside Vector to make sure they look correct.

For the purpose of this ticket you can make assumptions that all blockers are merged, and performance is not going to be a problem.

https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/912974 can be used as a reference of the expected code change.

QA

  • As part of code review before merging run Pixel locally
  • Verify visual changes in Pixel.wmcloud.org and confirm they are expected.
  • Either instigate a code freeze OR Update the pixel instance to run Pixel with the new markup so that we don't miss further visual regressions.

Event Timeline

LGoto set the point value for this task to 5.May 11 2023, 5:51 PM

@Jdlrobson Let us now if you need anything to move this forward…

@Jdlrobson @bwang we've just merged the following:

  1. New size prop for Button. As noted in this comment, the available values are 'medium' (the default) and 'large' (44px min size). There is no responsiveness here yet, so the large size should just be used in Minerva to replicate the buttons that are currently 44px on all viewport widths.
  2. Updated flush layout mixin that includes a param for size. See a demo here (the "Large icon-only buttons" demo) and sample usage here. Again, the mixin is not responsive, it just outputs a negative margin based on the size.

This will be included in the next Codex release on May 23rd. Please let me know if you have any feedback!

@Jdlrobson While working on this, I realized that its probably not feasible to handle in Vector the issues I previously mentioned about the buttons styles not applying properly to non button elements. Most of the codex button styles are scoped under the :enabled pseudo class, which doesnt exist on non buttons. Fixing the button styles for non button elements in Vector would basically mean copying 80% of the codex styles with hardcoded values, so I think the best solution is to update codex.

I already spoke to @AnneT, and I put up this patch in codex under T284273. Unfortunately, this means we need to wait 2 more weeks for the next Codex release

@bwang Repeating here, what I've shared in T284273. How many elements are we talking about that are links disguised as buttons besides the QuickSurvey one? I feel strongly that we're not doing our users a favor breaking the semantic differentiation between the two by mixing them for usability and accessibility reasons.

@bwang given the A/B test and the fact I'm out I think it makes sense to delay merging any big code relating to this until Wednesday 7th. Please make sure this carries over to sprint 5 with that in mind.

Change 922928 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Use Codex for typeahead search styles

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

bwang renamed this task from Use Codex markup instead of mediawiki ui markup in Vector to Use Codex button/icon markup instead of mediawiki ui markup in Vector.Jun 1 2023, 5:49 PM
bwang updated the task description. (Show Details)

The search component of this task has been split off into T337966

Change 912974 had a related patch set uploaded (by Bernard Wang; author: Jdlrobson):

[mediawiki/skins/Vector@master] Use Codex for button styles, start transitioning icons to use Codex icon mixins

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

Change 924556 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/UniversalLanguageSelector@master] Remove padding-left from .uls-trigger

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

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

[mediawiki/skins/Vector@master] Drop styles for cached HTML

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

Change 912974 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Use Codex for button styles, start transitioning icons to use Codex icon mixins

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

Change 924556 merged by jenkins-bot:

[mediawiki/extensions/UniversalLanguageSelector@master] Remove padding-left from .uls-trigger

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

Change 929427 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Drop styles for cached HTML

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

Edtadros subscribed.
Jdlrobson claimed this task.
Jdlrobson updated the task description. (Show Details)