Page MenuHomePhabricator

MobileFrontend changed method of detecting if minerva skin is being used from javascript
Closed, ResolvedPublic


Copying from gerrit review (since it's a post-merge review). I need to come up with a workable solution (doesn't have to restore wgMFMode, but needs to determine from javascript if minerva is active) before the branch cut on march 1st. looks to have changed when wgMFMode is sent to the users browsing session. Previously, from javascript, mw.config.get('wgMFMode') === null unless you are using the Minerva skin. After this patch wgMFMode is set for all pages regardless.
The issue here is that, because search is so different in mobile, we exclude it from the general search satisfaction schema. This exclusion is done by checking wgMFMode.
Could this be adjusted such that the old behaviour is retained, and wgMFMode is only set for the minerva skin?
For reference try mw.config.get('wgMFMode') on,, and

Event Timeline

wgMFMode probably should not be shipped to the desktop site. That seems like a regression (it should only be added where shouldDisplayMobileMode is true
If you care about whether it's Minerva though I would suggest using wgSkin === 'minerva'

Note other skins can run in mobile mode e.g.

Looks like we just need to throw in an shouldDisplayMobileView if statement

Change 273019 had a related patch set uploaded (by Bmansurov):
Add the 'wgMFMode' config variable to the page only in mobile mode

Change 273019 merged by jenkins-bot:
Add the 'wgMFMode' config variable to the page only in mobile mode

bmansurov added a subscriber: bmansurov.

@EBernhardson did you need to swat this? It doesn't look like it but let me know if anything else is needed.

doesn't need to be swatted, the regression didn't make it into wmf.14