Page MenuHomePhabricator

[SW] [WtC-M2] [SNL] Replace OOUI icon by Codex's
Open, Needs TriagePublic

Description

Problem

The Special:NewLexeme's user interface was composed using a mix of custom elements, WiKit next components and OOUI widgets such as Icon. The OOUI library is now on its progressive deprecation path, as it has been superseded by Codex, the official Wikimedia design system.

Solution

We have to replace the OOUI Icon widget by its Codex equivalent: cdx-icon (See demo). This will take us a step closer to switching to the new design system and deprecating the old, and bring consistency within the Special:NewLexeme page.

Acceptance criteria
  • The OOUI Icon widget is replaced by the Codex Icon

Related Objects

Event Timeline

Sarai-WMDE claimed this task.

Finding out that the side panel that contains this icon (.wbl-snl-infopanel) is in WikibaseLexeme instead of the new-lexeme-special-page repo (which only contains the form), has gotten me questioning the value of this task. Even though it'll be necessary at some point in time, it sounds like an overkill to import Codex to that environment at this point just to replace a single icon, specially when the goal is deprecating WiKit 🤔 I'd probably tend to decline this one for now. att. @Arian_Bozorg

(Resolved by mistake!)

The icon is added here:

SpecialNewLexeme::processInfoPanelTemplate()
'info_icon_HTML' => ( new IconWidget( [ 'icon' => 'infoFilled' ] ) )->toString(),

As far as I can tell, there’s no Codex version of this yet (mw:Codex § Using Codex icons only documents client-side usage, and I didn’t find any code for server-side generated icons from PHP), so I suggest we postpone this task.