Page MenuHomePhabricator

Use mw-ui-icon (tracking)
Closed, DeclinedPublic

Description

Various projects are making use of icons. Let's all use the same markup as documented here [1] and upstream the common icon classes into some kind of sharing library.

By using the markup we can also make improvements to the CSS for all MediaWiki based projects.

[1] http://tools.wmflabs.org/styleguide/desktop/section-4.html


Version: unspecified
Severity: normal

Details

Reference
bz71180

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:49 AM
bzimport set Reference to bz71180.
bzimport added a subscriber: Unknown Object (MLST).

Change 161321 had a related patch set uploaded by Jdlrobson:
WIP: Use mw-ui-icon

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

Prtksxna set Security to None.

Where's this at, is it still something we're pursuing? MobileFrontend has 21 mw-ui-icon- CSS classes, but mediawiki.UI in core only has one, mw-ui-icon-ok.

Meanwhile

  • RL in core now has an undocumented ResourceLoaderImageModule class which knows about SVG icons and can provide a rasterized version as a fallback (from demo, ?modules=oojs-ui-test&image=next&format=rasterized), but I don't think anything uses it.
  • The latest set of 80+ Wikicons are in dropbox and commons.wikimedia.org , but undocumented (T77940).
  • oojs-ui has spectacular grunt automation that generates oojs-ui-mediawiki.css and oojs-ui-mediawiki.svg.css with classes like
.oo-ui-image-destructive.oo-ui-icon-remove {
    background-image: url("themes/mediawiki/images/icons/remove-destructive.svg");
}

and also generates the png variants.

Maybe we can make the latter piece of the OOjs UI mediawiki theme available to mediawiki.UI clients. I tried loading 'oojs-ui.styles' and combining its classes with 'mediawiki.ui.button', but OOjs UI has a more elaborate div structure.

Applying_simultaneous_mediawiki.ui_and_oojs-ui_styles (103×317 px, 6 KB)
:)

Where's this at, is it still something we're pursuing?

Doubtful. I think the medium-term vision is OOJS-UI for this.

  • RL in core now has an undocumented ResourceLoaderImageModule class which knows about SVG icons and can provide a rasterized version as a fallback (from demo, ?modules=oojs-ui-test&image=next&format=rasterized), but I don't think anything uses it.

MobileFrontend at least is.

I'm interested in exploring replacing mw-ui-icon in MobileFrontend with oo js ui - the only place we currently use it is in beta.

Mattflaschen-WMF claimed this task.

We're deprecating MW UI (T100270), so we shouldn't be moving to use it more. Projects will move to OOjs UI icons in the course of broader migrations (e.g. when adopting a modal or toolbar); probably doesn't require a separate bug just for that part.