mediawiki-skins-Vector/skin.json
jdlrobson 68b989efb6 Simplify responsive Vector implementation
Vector has a wgVectorResponsive flag. This adds a ResourceLoader
module as well

I propose the configuration is repurposed to disable the min-width
on Vector and enable the viewport tag. This will allow us to use
test.wikipedia.org to test Vector at lower resolutions in future
as well as provide a suitable option for 3rd parties wanting to run
a responsive version of Vector that can be opted into using:

```
$wgVectorResponsive = true;
$wgVectorDefaultSkinVersion = '2';

```

As part of this change, the default skin version is set to 2, in
preparation for the next MediaWiki release. Note on Wikimedia wikis we
explicitly set this version so this will not impact any of our deployed
wikis.

Bug: T242772
Change-Id: I878920f49d18c5d60efd3ac45dc7912d2c62086e
2021-02-10 13:05:14 +00:00

262 lines
8.6 KiB
JSON

{
"name": "Vector",
"version": "1.0.0",
"author": [
"Trevor Parscal",
"Roan Kattouw",
"..."
],
"url": "https://www.mediawiki.org/wiki/Skin:Vector",
"descriptionmsg": "vector-skin-desc",
"namemsg": "skinname-vector",
"license-name": "GPL-2.0-or-later",
"type": "skin",
"requires": {
"MediaWiki": ">= 1.35.0"
},
"ValidSkinNames": {
"vector": {
"class": "SkinVector",
"@args": "See SkinVector::__construct for more detail.",
"args": [
{
"name": "vector",
"scripts": [
"skins.vector.js"
],
"styles": [
"skins.vector.styles",
"skins.vector.icons",
"mediawiki.ui.icon"
],
"messages": [
"otherlanguages",
"tooltip-p-logo",
"vector-opt-out-tooltip",
"vector-opt-out",
"navigation-heading",
"vector-action-toggle-sidebar",
"vector-jumptonavigation",
"vector-jumptosearch",
"vector-jumptocontent",
"sitesubtitle",
"sitetitle",
"tagline"
]
}
]
}
},
"SkinLessImportPaths": {
"vector": "resources/mediawiki.less"
},
"MessagesDirs": {
"Vector": [
"i18n"
]
},
"AutoloadClasses": {
"SkinVector": "includes/SkinVector.php"
},
"AutoloadNamespaces": {
"Vector\\": "includes/"
},
"ConfigRegistry": {
"vector": "GlobalVarConfig::newInstance"
},
"Hooks": {
"SkinPageReadyConfig": "Vector\\Hooks::onSkinPageReadyConfig",
"GetPreferences": "Vector\\Hooks::onGetPreferences",
"PreferencesFormPreSave": "Vector\\Hooks::onPreferencesFormPreSave",
"ResourceLoaderRegisterModules": "Vector\\Hooks::onResourceLoaderRegisterModules",
"SkinTemplateNavigation::Universal": "Vector\\Hooks::onSkinTemplateNavigation",
"LocalUserCreated": "Vector\\Hooks::onLocalUserCreated",
"OutputPageBodyAttributes": "Vector\\Hooks::onOutputPageBodyAttributes",
"MakeGlobalVariablesScript": "Vector\\Hooks::onMakeGlobalVariablesScript"
},
"@note": "When modifying skins.vector.styles definition, make sure the installer still works",
"ResourceModules": {
"skins.vector.styles.legacy": {
"class": "ResourceLoaderSkinModule",
"features": {
"normalize": true,
"elements": true,
"content": true,
"interface": true,
"logo": true,
"legacy": true
},
"targets": [
"desktop",
"mobile"
],
"styles": [ "resources/skins.vector.styles/skin-legacy.less" ]
},
"skins.vector.styles": {
"class": "ResourceLoaderSkinModule",
"features": {
"normalize": true,
"elements": true,
"content": true,
"interface": true,
"legacy": true
},
"targets": [
"desktop",
"mobile"
],
"styles": [ "resources/skins.vector.styles/skin.less" ]
},
"skins.vector.icons": {
"selectorWithVariant": ".mw-ui-icon-wikimedia-{name}-{variant}:before",
"selectorWithoutVariant": ".mw-ui-icon-wikimedia-{name}:before",
"useDataURI": false,
"defaultColor": "#54595d",
"class": "ResourceLoaderOOUIIconPackModule",
"variants": [],
"icons": [
"language"
]
},
"skins.vector.js": {
"packageFiles": [
"resources/skins.vector.js/skin.js",
{
"name": "resources/skins.vector.js/config.json",
"callback": "Vector\\Hooks::getVectorResourceLoaderConfig"
},
"resources/skins.vector.js/sidebar.js",
"resources/skins.vector.legacy.js/collapsibleTabs.js",
"resources/skins.vector.legacy.js/vector.js",
"resources/skins.vector.js/searchLoader.js"
],
"dependencies": [
"mediawiki.page.ready",
"mediawiki.util"
],
"messages": [ "vector-search-loader" ]
},
"skins.vector.legacy.js": {
"packageFiles": [
"resources/skins.vector.legacy.js/skin-legacy.js",
"resources/skins.vector.legacy.js/collapsibleTabs.js",
"resources/skins.vector.legacy.js/vector.js"
],
"dependencies": [
"mediawiki.page.ready",
"mediawiki.util"
]
}
},
"ResourceFileModulePaths": {
"localBasePath": "",
"remoteSkinPath": "Vector"
},
"ResourceModuleSkinStyles": {
"vector": {
"jquery.tipsy": "skinStyles/jquery.tipsy.less",
"jquery.ui": [
"skinStyles/jquery.ui/jquery.ui.core.css",
"skinStyles/jquery.ui/jquery.ui.theme.css",
"skinStyles/jquery.ui/jquery.ui.accordion.css",
"skinStyles/jquery.ui/jquery.ui.autocomplete.css",
"skinStyles/jquery.ui/jquery.ui.button.css",
"skinStyles/jquery.ui/jquery.ui.datepicker.css",
"skinStyles/jquery.ui/jquery.ui.dialog.css",
"skinStyles/jquery.ui/jquery.ui.menu.css",
"skinStyles/jquery.ui/jquery.ui.progressbar.css",
"skinStyles/jquery.ui/jquery.ui.resizable.css",
"skinStyles/jquery.ui/jquery.ui.selectable.css",
"skinStyles/jquery.ui/jquery.ui.slider.css",
"skinStyles/jquery.ui/jquery.ui.tabs.css",
"skinStyles/jquery.ui/jquery.ui.tooltip.css"
],
"+mediawiki.action.view.redirectPage": "skinStyles/mediawiki.action.view.redirectPage.less",
"+mediawiki.notification": "skinStyles/mediawiki.notification.less",
"+oojs-ui-core.styles": "skinStyles/ooui.less",
"mediawiki.special": "skinStyles/mediawiki.special.less",
"+ext.relatedArticles.readMore": "skinStyles/ext.relatedArticles.readMore.less",
"+mediawiki.ui.icon": "skinStyles/mediawiki.ui.icon.less"
}
},
"config": {
"VectorSearchHost": {
"value": "",
"description": "Override default search API. Can be used with $wgDisableTextSearch and $wgSearchForwardUrl to mimic user experience on production."
},
"VectorUseIconWatch": {
"value": true
},
"VectorMaxWidthOptions": {
"value": {
"exclude": {
"mainpage": false,
"querystring": {
"action": "history",
"diff": "*"
},
"namespaces": [
-1,
14
]
},
"include": [
"Special:Preferences"
]
},
"description": "options for configuring where where max-width should and should not apply. More details can be found in Hooks::shouldDisableMaxWidth PHP documentation."
},
"VectorResponsive": {
"value": false,
"description": "@var boolean When wgVectorDefaultSkinVersion is set to 2, turn Vector into a responsive skin by applying a view port and disabling the min-width"
},
"VectorShowSkinPreferences": {
"value": true,
"description": "@var boolean Show skin-specific user preferences on the Special:Preferences appearance tab when true and hide them otherwise."
},
"VectorDefaultSkinVersion": {
"value": "2",
"description": "@var string:['2'|'1'] The version ('2' for latest, '1' for legacy) of the Vector skin to use for anonymous users and as a fallback. The value is _not_ persisted."
},
"VectorDefaultSkinVersionForExistingAccounts": {
"value": "1",
"description": "@var string:['2'|'1'] The version ('2' for latest, '1' for legacy) of the Vector skin to use when an existing user has not specified a preference. This configuration is not used for new accounts (see VectorDefaultSkinVersionForNewAccounts) and is impermanent. In the future, this field may contains versions such as \"beta\" which when specified and the BetaFeatures extension is installed, and the user is enrolled, the latest version is used otherwise legacy. The value is _not_ persisted."
},
"VectorDefaultSkinVersionForNewAccounts": {
"value": "1",
"description": "@var string:['2'|'1'] The version ('2' for latest, '1' for legacy) of the Vector skin to **set** for newly created user accounts. **The value is persisted as a user preference.** This configuration is not used for preexisting accounts (see VectorDefaultSkinVersionForExistingAccounts) and only ever executed once at new account creation time."
},
"VectorUseWvuiSearch": {
"value": false
},
"VectorSearchTreatmentABTest": {
"value": false,
"description": "@var boolean Enables or disables the search treatment A/B test. See https://phabricator.wikimedia.org/T261647 and associated tasks for additional detail."
},
"VectorWvuiSearchOptions": {
"value": {
"showThumbnail": true,
"showDescription": true
}
},
"VectorDefaultSidebarVisibleForAuthorisedUser": {
"value": true
},
"VectorDefaultSidebarVisibleForAnonymousUser": {
"value": false
},
"VectorLanguageInHeader": {
"value": false,
"description": "@var boolean Moves the language links from the sidebar into a menu beside the page title. Also moves the indicators to the line below, next to the tagline (siteSub)."
},
"VectorDisableSidebarPersistence": {
"value": false,
"description": "@var boolean Temporary feature flag that disables saving the sidebar expanded/collapsed state as a user-preference (triggered via clicking the main menu icon). This is intended as a temporary kill-switch in the event that the DB is overloaded with writes to the user_options table."
}
},
"ServiceWiringFiles": [
"includes/ServiceWiring.php"
],
"manifest_version": 2
}