Page MenuHomePhabricator

Deprecate mediawiki.icon ResourceLoader module and use Codex mixin instead.
Closed, ResolvedPublicBUG REPORT

Description

The mediawiki.icon module is used in Extension:Wikibase and Extension:UploadWizard. The only purpose of this module is to serve 2 icons. These extensions should stop using the module and use .cdx-mixin-css-icon() and cdxIconDownTriangle icon instead (using transform to rotate where needed).

TODO

  • Mark the module as deprecated (and update RecentChanges in the process)
  • Switch UploadWizard and Wikibase
  • Remove the module

Before

Screenshot 2023-11-20 at 4.36.19 PM.png (383×959 px, 75 KB)

After

Screenshot 2023-11-20 at 4.35.44 PM.png (278×984 px, 73 KB)

Event Timeline

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

[mediawiki/core@master] mediawiki.icon: Deprecate module in favor of Codex mixin

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

Change 975920 merged by jenkins-bot:

[mediawiki/core@master] mediawiki.icon: Deprecate module in favor of Codex mixin

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

ArthurTaylor renamed this task from Deprecate mediawiki.icon ResourceLoader module and use Codex mixin instead. to [CLIENT] Deprecate mediawiki.icon ResourceLoader module and use Codex mixin instead..Feb 12 2024, 10:16 AM
ArthurTaylor renamed this task from [CLIENT] Deprecate mediawiki.icon ResourceLoader module and use Codex mixin instead. to Deprecate mediawiki.icon ResourceLoader module and use Codex mixin instead..Feb 12 2024, 10:18 AM

Change #1062456 had a related patch set uploaded (by Ebrahim; author: Ebrahim):

[mediawiki/core@master] Remove use of a deprecated module from collapsibleFooter

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

Change #1062456 merged by jenkins-bot:

[mediawiki/core@master] Remove use of a deprecated module from collapsibleFooter

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

Change #1065246 had a related patch set uploaded (by Ebrahim; author: Ebrahim):

[mediawiki/extensions/Wikibase@master] Remove use of mediawiki.icon

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

I tried to approach UploadWizard one also but each time have failed on finding where exactly where it's used there exactly, can someone familiar with UploadWizard details help here just like the helpful comment about Wikibase in T357271, thanks

Change #1065246 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Remove use of mediawiki.icon

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

Change #1065257 had a related patch set uploaded (by Ebrahim; author: Ebrahim):

[mediawiki/extensions/UploadWizard@master] Remove use of mediawiki.icon

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

UploadWizard wasn't actually using this at all now I see, guess there was some historical use of it there that are long gone with OOUI-fication of the UploadWizard UI years ago which are gone for years.

Change #1065264 had a related patch set uploaded (by Ebrahim; author: Ebrahim):

[mediawiki/extensions/MediaUploader@master] Remove use of mediawiki.icon

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

Change #1065257 merged by jenkins-bot:

[mediawiki/extensions/UploadWizard@master] Remove use of mediawiki.icon

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

Change #1065264 merged by jenkins-bot:

[mediawiki/extensions/MediaUploader@master] Remove use of mediawiki.icon

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

Change #1065630 had a related patch set uploaded (by Ebrahim; author: Ebrahim):

[mediawiki/core@master] Remove mediawiki.icon

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

Change #1065630 merged by jenkins-bot:

[mediawiki/core@master] Remove deprecated `mediawiki.icon` module

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

I noticed two regressions on edit pages (at the very bottom):

  • At the "Wikidata entities used in this page" section, the text is not indented, thus the toggle icon (which by the way is the still the previous one) is over the text.
  • When Live preview feature is enabled, at the next two sections ("pages transcluded" and "hidden categories"):
    • When doing "Show preview":
      • existing toggles before "pages transcluded" are removed (whether there is one, or erroneously several… see after)
      • each time a "show preview" is triggered, an additional toggle is added before "hidden categories"… thus, there are more and more toggles
    • When doing "Show changes":
      • each time a "show changes" is triggered, an additional toggle is added before "pages transcluded"… thus, there are more and more toggles
      • each time a "show changes" is triggered, an additional toggle is added before "hidden categories"… thus, there are more and more toggles

Another issue is that in the text « This page is a member of 42 hidden categories (help): », the space before « (help) » sort of gets removed, i.e. the text is displayed as « categories(help) ».

It is due to the "display: flex" CSS that is applied to the containing <p>.

Interestingly, the "pages transcluded" section just above doesn't have the issue, although it uses the same markup and CSS.

Ebrahim closed this task as Resolved.EditedAug 26 2024, 4:29 AM

These are indeed overlooked since the change,

"Wikidata entities used in this page" one is fixed, can be seen in beta cluster I think and should be in the next release.

Filed an issue for Live preview one, T373286

Filed another for that whitespaces, T373287

Closing this one as there isn't anything to do here, unless, we decide to revert the change completely which is an option also but I hope not needed

Uploaded https://gerrit.wikimedia.org/r/1066438 to fix both issues, that's at least my solution which isn't perfect but should be good enough for now.

About this case in particular:

  • When Live preview feature is enabled, at the next two sections ("pages transcluded" and "hidden categories"):
    • When doing "Show preview":
      • existing toggles before "pages transcluded" are removed (whether there is one, or erroneously several… see after)

I noticed that the problem occurs in two steps:

  1. An extraneous toggle is erroneously prepended, as in the other cases.
  2. Then at a later time, all the toggles are removed. (and I don't know what does this)