Page MenuHomePhabricator

Deprecate mw.mobileFrontend public facing library
Closed, ResolvedPublicBUG REPORT

Description

NOTE: Please feel free to create a subtask and untag your components to fit into your own team process.

Impacted code paths: https://codesearch.wmcloud.org/search/?q=mw.mobileFrontend&files=&excludeFiles=&repos=

Follow up from T348081

The mw.mobileFrontend library predates ResourceLoader package files and should be removed in favor of the latter.

Since MobileFrontend was built many of its APIs are no longer relevant. For example:

  • We're moving to Codex and using Codex markup is preferable these days.
  • ES6 is now the normal. Code such as mw.mobileFrontend.require( 'util' ).mfExtend can be replaced with native ES6
  • Hooks are a stable contract and are better suited than the EventEmitter singleton.

Migration notes

Was usingUse this instead
mw.mobileFrontend.require( 'mobile.startup').Buttonrequire( 'mobile.startup').View and Codex markup where needed.
mw.mobileFrontend.require( 'mobile.startup').Iconrequire( 'mobile.startup').View and Codex markup where needed.
mw.mobileFrontend.require( 'mobile.startup').IconButtonrequire( 'mobile.startup').View and Codex markup where needed.
mw.mobileFrontend.require( 'mobile.startup').AnchorUse https://doc.wikimedia.org/codex/latest/components/mixins/link.html.
mw.mobileFrontend.require( 'mobile.startup' ).Skin.getSingleton().getLicenseMsg();require( 'mobile.startup').license()
mw.mobileFrontend.require( 'mobile.startup' ).lazyImagesrequire( 'mobile.startup').loadAllImagesInPage()
mw.mobileFrontend.require( 'mobile.startup' ).promisedViewrequire( 'mobile.startup').promisedView
mw.mobileFrontend.require( 'mobile.startup' ).Viewrequire( 'mobile.startup').View
mw.mobileFrontend.require( 'mobile.startup' ).OverlayManager.getSingleton()require( 'mobile.startup').getOverlayManager()
mw.mobileFrontend.require( 'mobile.startup' ).Drawerrequire( 'mobile.startup').Drawer
mw.mobileFrontend.require( 'mobile.startup' ).headers.headerrequire( 'mobile.startup').overlayHeader
mw.mobileFrontend.require( 'mobile.startup' ).Overlayrequire( 'mobile.startup').Overlay
mw.mobileFrontend.require( 'mobile.startup' ).eventBusSingleton.on( 'section-toggled'mw.hook( 'mobileFrontend.section-toggled' ).add
mw.mobileFrontend.require( 'mobile.startup' ).Browsernavigation.userAgent
mw.mobileFrontend.require( 'mobile.startup' ).util.parseHTMLUse $()

Event Timeline

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

[mediawiki/skins/MinervaNeue@master] WIP: Drop mw.mobileFrontend references

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

Change 966586 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Drop mw.mobileFrontend references

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

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

[mediawiki/extensions/MobileFrontend@master] ImageCarousel: Use eventBus global rather than parameter

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

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

[mediawiki/skins/MinervaNeue@master] Drop mw.mobileFrontend references

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

Change 972259 merged by Jdlrobson:

[mediawiki/skins/MinervaNeue@master] Drop mw.mobileFrontend references

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

Change 972417 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] ImageCarousel: Use eventBus global rather than parameter

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

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

[mediawiki/extensions/Echo@master] Fix deprecated code paths

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

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

[mediawiki/skins/MinervaNeue@master] Remove eslint disable in MobileFrontend

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

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

[mediawiki/extensions/Kartographer@master] Use of mw.mobileFrontend is deprecated and unstable

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

Change 974249 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Remove eslint disable in MobileFrontend

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

Change 974247 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Fix deprecated code paths

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

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

[mediawiki/extensions/Thanks@master] Do not use deprecated MobileFrontend library, use Codex

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

Test wiki created on Patch demo by Roan Kattouw (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/0f15811000/w

Change 974250 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Use of mw.mobileFrontend is deprecated and unstable

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

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

[mediawiki/extensions/VisualEditor@master] mw.mobileFrontend is deprecated

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

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

[mediawiki/extensions/ExternalGuidance@master] Do not use deprecated MobileFrontend libraries

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

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

[mediawiki/extensions/GrowthExperiments@master] Fixes overlay exit button and deprecation warnings

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

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

[mediawiki/extensions/WikimediaEvents@master] MobileDiff: Module is incorrectly logging thanks button

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

Change 979182 merged by jenkins-bot:

[mediawiki/extensions/Thanks@master] Do not use deprecated MobileFrontend library, use Codex

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

Jdlrobson lowered the priority of this task from High to Medium.

Change 979404 merged by jenkins-bot:

[mediawiki/extensions/ExternalGuidance@master] Do not use deprecated MobileFrontend libraries

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

Jdlrobson added subscribers: Urbanecm, Esanders.

The last two remaining patches are for GrowthExperiments and VisualEditors https://gerrit.wikimedia.org/r/979431 and https://gerrit.wikimedia.org/r/979402
@Esanders and @Urbanecm could you help me get this over the finish line? Thanks in advance.

Change 979431 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Fix exit button and address deprecation warnings

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

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

[mediawiki/extensions/MobileFrontend@master] Drop the mw.mobileFrontend object

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

Jdlrobson renamed this task from Deprecate mw.mobileFrontend to Deprecate mw.mobileFrontend public facing library.Jan 3 2024, 6:34 PM
Jdlrobson added a project: Web-Team-Backlog.

Change 979402 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Dialogs: Avoid using the deprecated mw.mobileFrontend function

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

Change 987459 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Drop the mw.mobileFrontend object

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

Test wiki on Patch demo by Roan Kattouw (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/0f15811000/w/