Page MenuHomePhabricator

Add `mediawiki.special.import` to `mediawiki.misc-authed-ooui`
Closed, ResolvedPublic

Description

The mediawiki.misc-authed-ooui module is described as

This bundles various small (under 5 KB?) JavaScript files that:

  • .. are never loaded when viewing or editing wiki pages.
  • .. are only used by logged-in users.
  • .. depend on oojs-ui-core.
  • .. contain UI initialisation code (e.g. no public module exports, because requiring or depending on this bundle is awkward)

The mediawiki.special.import is small enough (1514 minified characters currently, well under 5kb), is only used on Special:Import (criteria 1), depends on oojs-ui-core (depends on mediawiki.widgets -> oojs-ui-widgets -> oojs-ui-core), and contains only UI initialisation code.

Technically, it can be loaded by anonymous users, because Special:Import loads it before checking for permissions, and even if the check was reordered theoretically anonymous users could be granted import rights, but I believe this falls into the scope of the bundle, which includes the javascript for a number of other special pages.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 807638 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] Merge `mediawiki.special.import` into `mediawiki.misc-authed-ooui`

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

Change 807638 merged by jenkins-bot:

[mediawiki/core@master] Merge `mediawiki.special.import` into `mediawiki.misc-authed-ooui`

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

Krinkle triaged this task as Medium priority.