Page MenuHomePhabricator

Improve process of deprecating icons in OOUI
Open, LowPublic

Description

Before an OOUI icon is moved or removed, it is deprecated, but this process of deprecation doesn't seem to work efficiently, as very often usage in extensions deployed on WMF wikis is only updated once the icon was already missing on beta wikis or even in production.

Just a few tasks about various icons "suddenly" missing:
T178532: [Regression pre-wmf.5] The icon for switch to Visual editing is missing, T202758: Find-and-replace icon is missing in the 2010 WikiEditor, T202337: ProofreadPage uses removed 'clip' icon, T202101: [Regression pre-wmf.18] Icons for "Page Settings" and "Find and replace" are missing, T202338: OOUI uses removed 'settings' icon in docs and demos, and I'm sure there are more such tasks, and some icons were probably fixed without task.
And of course they same probably happens to gadgets and user scripts.

So the process of deprecating an icon should be improved such that developers will get aware of it when they continue using a deprecated icon, the current state of fixing stuff once it really is broken is not good.

Event Timeline

Perhaps OO.ui.mixin.IconElementView could have a static list of deprecated icons and log a warning to the console if they are used.

My proposed patch https://gerrit.wikimedia.org/r/c/mediawiki/core/+/410038 "Allow loading styles for individual OOUI icons" would allow emitting the deprecation messages we already have in OOUI when a deprecated icon is loaded by MediaWiki.