[go: up one dir, main page]

Page MenuHomePhabricator

Remove desktop / mobile only targeted code from ProofreadPage extension
Closed, ResolvedPublic

Description

Various skins/extensions intentionally set a targets of either mobile OR desktop to avoid loading that code on mobile/desktop site.
Going forward we want to move away from that - so that we can improve caching of ResourceLoader resources. If we fix this we'll be able to remove the targets system altogether.

Doing this requires following the guidelines in https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_for_extension_developers#Target_system and moving away from a mobile domain VS desktop domain distinction to a media query or skin based approach (note: mobile vs desktop is still possible if truly needed via MobileContext service but should be used as a last resort)

Offending code will have extension/skin json ResourceLoader module definitions in the following forms:

"targets": "desktop"
"targets": "mobile"
"targets": [ "desktop" ]
"targets": [ "mobile" ]

The following query marks some of the offenders (query to be improved later):
https://codesearch.wmcloud.org/search/?q=%5C%5B%20%22(desktop%7Cmobile)%22%20%5C%5D&i=nope&files=(extension%7Cskin).json&excludeFiles=&repos=

TODO

  • ext.proofreadpage.page module
  • ext.proofreadpage.page.edit module
  • ext.proofreadpage.page.editinsequence module

Event Timeline

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

[mediawiki/extensions/ProofreadPage@master] Restrict code to desktop site without using the targets system

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

Tacsipacsi renamed this task from Remove desktop / mobile only targeted code from proof read page extension to Remove desktop / mobile only targeted code from ProofreadPage extension.Mar 24 2023, 6:26 PM

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

[mediawiki/extensions/ProofreadPage@master] Run all Proofread page code on mobile domain

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

Change 903325 merged by jenkins-bot:

[mediawiki/extensions/ProofreadPage@master] Run all Proofread page code on mobile domain

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

Change 902756 abandoned by Jdlrobson:

[mediawiki/extensions/ProofreadPage@master] Restrict code to desktop site without using the targets system

Reason:

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/ProofreadPage/+/903325 got merged instead.

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

Jdlrobson claimed this task.

Thanks for the help here!