(Translated by https://www.hiragana.jp/)
⚓ T318957 Define wgSpecialPreferencesUseMobileLayout inside packageFiles rather than globally
Page MenuHomePhabricator

Define wgSpecialPreferencesUseMobileLayout inside packageFiles rather than globally
Closed, ResolvedPublic

Description

As part of the feedback we received in T311717, the global variable wgSpecialPreferencesUseMobileLayout should be transferred to a package file. See https://gerrit.wikimedia.org/g/mediawiki/extensions/Wikibase/+/25565da47b1fb057ec0e8adefad1dc96dbf19ad8/extension-client.json#370 for an example of how that works.

Background

Moving these files to ResourceLoader keeps them local (mw.config values are globally available and this doesn't seem like one that needs to be as it is internal to the preferences page)

More information on recommended best practice here:
https://www.mediawiki.org/wiki/ResourceLoader/Package_files#Config_files

Event Timeline

@Scardenasmolinar: Assuming this is about the MediaWiki core code repository (please correct).

@Scardenasmolinar: Assuming this is about the MediaWiki core code repository (please correct).

Yes, this is correct!

Change 851178 had a related patch set uploaded (by Scardenasmolinar; author: Scardenasmolinar):

[mediawiki/core@master] Special:Preferences - Move JS config var to RL pacakgeFiles

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

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

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

Test wiki created on Patch demo by JSherman (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/643dae9cc7/w

Change 851178 merged by jenkins-bot:

[mediawiki/core@master] Special:Preferences - Move JS config var to RL packageFiles

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

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

https://patchdemo.wmflabs.org/wikis/ec87fa73c1/w/

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

https://patchdemo.wmflabs.org/wikis/b3cb55c999/w/

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

https://patchdemo.wmflabs.org/wikis/643dae9cc7/w/