Page MenuHomePhabricator

[EPIC] MobileFrontend extension should stop special-casing main page
Closed, ResolvedPublic

Description

The MobileFrontend extension shouldn't special-case the main page. Currently a lot of the logic and infrastructure is based on a { if isMainPage() } { else ... } model, which is silly and unnecessary. The extension code should be flexible and adaptable to any page. A few tweaks might be necessary for the main page, but there doesn't need to be a completely different system in place for it.

Steps to achieve this

  • Audit all wiki pages which use special cased main pages
  • We should set $wgMFSpecialCaseMainPage = false for any projects currently not using mobile main page special casing
  • Deploy TemplateStyles to render this code obsolete
  • Community engagement - T138622 and T246401. All mobile main pages need to be updated to not use the mf- prefix using only the nomobile where necessary. See wikidata.org and English Wikipedia for examples.
  • Main page special casing turned off for all projects with $wgMFSpecialCaseMainPage
  • Remove special casing code from MobileFrontend (T257953)
  1. Sign off steps
  2. Addzip file of all projects before and after (@Jdlrobson has this)

Screenshots before and after for projects are listed here:
https://drive.google.com/drive/folders/1n4xB7Tk1klEnlw1EN-bSOReRQf791Jc-?usp=sharing

Related Objects

StatusSubtypeAssignedTask
DuplicateNone
StalledNone
DeclinedNone
ResolvedJdlrobson
ResolvedJdlrobson
DuplicateNone
DuplicateNone
ResolvedTgr
ResolvedAnomie
Resolvedtstarling
Resolvedcoren
ResolvedAnomie
OpenBUG REPORTNone
ResolvedAnomie
ResolvedEsanders
ResolvedEsanders
Resolvedssastry
ResolvedAnomie
ResolvedCKoerner_WMF
Resolvedjhsoby
ResolvedTgr
DeclinedTgr
Resolvedcoren
ResolvedAnomie
ResolvedTgr
DeclinedNone
Resolvedssastry
ResolvedTgr
ResolvedTgr
ResolvedTgr
ResolvedDeskana
ResolvedCKoerner_WMF
ResolvedWhatamidoing-WMF
ResolvedTgr
ResolvedTgr
ResolvedTgr
ResolvedUrbanecm
ResolvedTgr
ResolvedTacsipacsi
ResolvedTgr
ResolvedCKoerner_WMF
ResolvedJdlrobson
DeclinedNone
DeclinedNone
OpenNone
ResolvedAmmarpad
ResolvedJdlrobson
ResolvedKizule
ResolvedKizule
DuplicateBrandonXLF
ResolvedJdlrobson
ResolvedAmmarpad
ResolvedJdlrobson

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jdlrobson updated the task description. (Show Details)Mar 10 2020, 11:28 PM

Change 569174 abandoned by Jdlrobson:
Discourage use of MFSpecialCaseMainPage on edit preview to main page

Reason:
I need to discuss this with Alex. Might not be the best solution here.

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

Jdlrobson updated the task description. (Show Details)Apr 10 2020, 7:10 PM
Jdlrobson updated the task description. (Show Details)Apr 10 2020, 7:17 PM
Jdlrobson updated the task description. (Show Details)Apr 10 2020, 8:23 PM
xSavitar added a subscriber: xSavitar.
Jdlrobson updated the task description. (Show Details)May 5 2020, 6:17 PM
Jdlrobson updated the task description. (Show Details)May 11 2020, 6:23 PM
Jdlrobson updated the task description. (Show Details)May 11 2020, 6:26 PM
Jdlrobson updated the task description. (Show Details)May 18 2020, 10:31 PM

Change 570180 merged by jenkins-bot:
[operations/mediawiki-config@master] Drop enwiki mainpage special casing

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

Mentioned in SAL (#wikimedia-operations) [2020-05-26T15:01:40Z] <jforrester@deploy1001> Synchronized dblists/mobilemainpagelegacy.dblist: Drop enwiki mobile mainpage special casing T32405 (duration: 00m 59s)

Jdlrobson updated the task description. (Show Details)May 27 2020, 2:18 AM

Change 599085 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[operations/mediawiki-config@master] Stop special casing the main page

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

Change 599085 merged by jenkins-bot:
[operations/mediawiki-config@master] Stop special casing the main page on mobile for twelve wikis

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

Mentioned in SAL (#wikimedia-operations) [2020-05-27T19:09:24Z] <jforrester@deploy1001> Synchronized dblists/mobilemainpagelegacy.dblist: T32405 Stop special casing the main page on mobile for twelve wikis (duration: 01m 05s)

Now down to 168 wikis still in legacy mode.

Jdlrobson updated the task description. (Show Details)May 27 2020, 7:10 PM
Volker_E removed a subscriber: Volker_E.May 27 2020, 7:11 PM
Jdlrobson updated the task description. (Show Details)May 27 2020, 8:38 PM

Change 601847 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[operations/mediawiki-config@master] Stop special casing the main page on several projects

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

Jdlrobson updated the task description. (Show Details)Jun 2 2020, 10:27 PM

Can anyone please share a before-and-after photos of what has changed? Thank you.

@Acagastya for which project? I've been collecting before and after photos in this task above. I have a few more to add later today.

Change 601847 merged by jenkins-bot:
[operations/mediawiki-config@master] Stop special casing the main page on several projects

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

Mentioned in SAL (#wikimedia-operations) [2020-06-03T19:05:44Z] <jforrester@deploy1001> Synchronized dblists/mobilemainpagelegacy.dblist: T32405 Stop special casing the main page on another 47 projects (duration: 01m 08s)

Jdlrobson updated the task description. (Show Details)Jun 3 2020, 9:17 PM

@Jdlrobson I was asking for en.wikinews.

@Acagastya prior to the change it looked like this:

It now displays all content but note the headings provided by MobileFrontend are no longer displaying:


I would advise l_title rules from https://en.m.wikinews.org/wiki/MediaWiki:Common.css to a TemplateStyle or https://en.m.wikinews.org/wiki/Template:Main_Page/minerva.css

You can add the nomobile class to box with RSS elements if you want to hide those like before.

Thank you @Jdlrobson. I will have a look.

It now displays all content but note the headings provided by MobileFrontend are no longer displaying:

Nice, looks much better now that it's not mutilated!

Jdlrobson moved this task from Inbox to Next up on the User-Jdlrobson board.

Change 604973 had a related patch set uploaded (by BrandonXLF; owner: BrandonXLF):
[operations/mediawiki-config@master] Drop simplewiki mainpage special casing

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

Change 604973 merged by jenkins-bot:
[operations/mediawiki-config@master] Drop simplewiki mainpage special casing

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

Mentioned in SAL (#wikimedia-operations) [2020-06-16T11:18:43Z] <jforrester@deploy1001> Synchronized dblists/mobilemainpagelegacy.dblist: T32405 T254731 Drop mobile special casing of main page for simplewiki, itwikisource, vecwikisource (duration: 01m 05s)

Jdlrobson edited projects, added MW-1.36-release; removed MW-1.35-release.

I plan to remove this code as soon as the branch is cut. So technically while supporting is being dropped in 1.35 the actual code will be removed in 1.36

Change 612423 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[operations/mediawiki-config@master] Drop main page special casing on all projects

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

Jdlrobson updated the task description. (Show Details)Jul 13 2020, 9:26 PM

Change 612423 merged by jenkins-bot:
[operations/mediawiki-config@master] Drop main page special casing on all projects

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

Mentioned in SAL (#wikimedia-operations) [2020-07-14T18:05:44Z] <jforrester@deploy1001> Synchronized wmf-config/InitialiseSettings.php: T32405 T254287 Stop varying wgMFSpecialCaseMainPage (duration: 01m 05s)

Mentioned in SAL (#wikimedia-operations) [2020-07-14T18:07:31Z] <jforrester@deploy1001> Synchronized multiversion/MWConfigCacheGenerator.php: T32405 T254287 Stop loading the mobilemainpagelegacy dblist (duration: 01m 05s)

Mentioned in SAL (#wikimedia-operations) [2020-07-14T18:09:36Z] <jforrester@deploy1001> Synchronized dblists/: T32405 T254287 Remove the mobilemainpagelegacy dblist (duration: 01m 04s)

This is now deployed.

Jdlrobson moved this task from Epics to Team: web on the MobileFrontend board.Jul 24 2020, 2:29 AM

@Jdlrobson, per T259970, it seems we got it covered here and you're on it?

Patch is not quite ready and I will likely need some review but yeh I can focus on this soonish (maybe next week)

Jdlrobson closed this task as Resolved.Aug 19 2020, 4:56 PM
Jdlrobson updated the task description. (Show Details)

๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰๐ŸŽ‰