mediawiki-skins-Vector/skin.json

344 lines
11 KiB
JSON
Raw Normal View History

{
"name": "Vector",
Merge SkinVector and VectorTemplate (step 1/2) Please note I7e06a4cc226f3434c0f655212a464b8b98bcc7f4 should be merged at the same time as this patch. == The background == All extensions have been weaned of BaseTemplate hooks in Wikimedia projects. This change now means that Vector will no longer run any BaseTemplate hooks. See the epic T253809 for the implementation details. == The change == BaseTemplate will now have nothing to do with the rendering of Vector. The skin version is added to express the significance of breaking compatibility with 3rd party extensions. We TEMPORARILY remove SkinVector to retain git blame. SkinTemplateVector will be renamed SkinVector in the follow up (see 2/2) Update skin.json to use SkinTemplateVector for the skin (this will be fixed in a follow up). The isLegacy method is moved to SkinTemplateVector. Changes of note: * html-debuglog is no longer needed. SkinMustache includes this information on the skins behalf * html-printtail and html-headelement are now not needed in the master template and added by SkinMustache * Skin::getAfterPortlet does not provide the `after-portlet` wrapping element provided by BaseTemplate::getAfterPortlet so this is added * SkinTemplate::getFooterIcons does not support the options that BaseTemplate::getFooterIcons does so any icons which do not have an image must be manually checked for and unset Known changes to HTML output as a result of intentionally delegating their output to the core SkinMustache class: * A new line is removed between the body element and #mw-page-base * #mw-html-debug-log now appears at the end of the body element * #printfooter is now a child of #mw-content-text rather than sibling. Bug: T251212 Change-Id: I4e89beb96f6401ed7e51bafdf0aac408f5a2c42f
2020-04-28 21:16:21 +00:00
"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.37.0"
},
"ValidSkinNames": {
Merge SkinVector and VectorTemplate (step 1/2) Please note I7e06a4cc226f3434c0f655212a464b8b98bcc7f4 should be merged at the same time as this patch. == The background == All extensions have been weaned of BaseTemplate hooks in Wikimedia projects. This change now means that Vector will no longer run any BaseTemplate hooks. See the epic T253809 for the implementation details. == The change == BaseTemplate will now have nothing to do with the rendering of Vector. The skin version is added to express the significance of breaking compatibility with 3rd party extensions. We TEMPORARILY remove SkinVector to retain git blame. SkinTemplateVector will be renamed SkinVector in the follow up (see 2/2) Update skin.json to use SkinTemplateVector for the skin (this will be fixed in a follow up). The isLegacy method is moved to SkinTemplateVector. Changes of note: * html-debuglog is no longer needed. SkinMustache includes this information on the skins behalf * html-printtail and html-headelement are now not needed in the master template and added by SkinMustache * Skin::getAfterPortlet does not provide the `after-portlet` wrapping element provided by BaseTemplate::getAfterPortlet so this is added * SkinTemplate::getFooterIcons does not support the options that BaseTemplate::getFooterIcons does so any icons which do not have an image must be manually checked for and unset Known changes to HTML output as a result of intentionally delegating their output to the core SkinMustache class: * A new line is removed between the body element and #mw-page-base * #mw-html-debug-log now appears at the end of the body element * #printfooter is now a child of #mw-content-text rather than sibling. Bug: T251212 Change-Id: I4e89beb96f6401ed7e51bafdf0aac408f5a2c42f
2020-04-28 21:16:21 +00:00
"vector": {
"class": "SkinVector",
"@args": "See SkinVector::__construct for more detail.",
Merge SkinVector and VectorTemplate (step 1/2) Please note I7e06a4cc226f3434c0f655212a464b8b98bcc7f4 should be merged at the same time as this patch. == The background == All extensions have been weaned of BaseTemplate hooks in Wikimedia projects. This change now means that Vector will no longer run any BaseTemplate hooks. See the epic T253809 for the implementation details. == The change == BaseTemplate will now have nothing to do with the rendering of Vector. The skin version is added to express the significance of breaking compatibility with 3rd party extensions. We TEMPORARILY remove SkinVector to retain git blame. SkinTemplateVector will be renamed SkinVector in the follow up (see 2/2) Update skin.json to use SkinTemplateVector for the skin (this will be fixed in a follow up). The isLegacy method is moved to SkinTemplateVector. Changes of note: * html-debuglog is no longer needed. SkinMustache includes this information on the skins behalf * html-printtail and html-headelement are now not needed in the master template and added by SkinMustache * Skin::getAfterPortlet does not provide the `after-portlet` wrapping element provided by BaseTemplate::getAfterPortlet so this is added * SkinTemplate::getFooterIcons does not support the options that BaseTemplate::getFooterIcons does so any icons which do not have an image must be manually checked for and unset Known changes to HTML output as a result of intentionally delegating their output to the core SkinMustache class: * A new line is removed between the body element and #mw-page-base * #mw-html-debug-log now appears at the end of the body element * #printfooter is now a child of #mw-content-text rather than sibling. Bug: T251212 Change-Id: I4e89beb96f6401ed7e51bafdf0aac408f5a2c42f
2020-04-28 21:16:21 +00:00
"args": [
{
"name": "vector",
"scripts": [
"skins.vector.js"
],
"styles": [
"mediawiki.ui.button",
Merge SkinVector and VectorTemplate (step 1/2) Please note I7e06a4cc226f3434c0f655212a464b8b98bcc7f4 should be merged at the same time as this patch. == The background == All extensions have been weaned of BaseTemplate hooks in Wikimedia projects. This change now means that Vector will no longer run any BaseTemplate hooks. See the epic T253809 for the implementation details. == The change == BaseTemplate will now have nothing to do with the rendering of Vector. The skin version is added to express the significance of breaking compatibility with 3rd party extensions. We TEMPORARILY remove SkinVector to retain git blame. SkinTemplateVector will be renamed SkinVector in the follow up (see 2/2) Update skin.json to use SkinTemplateVector for the skin (this will be fixed in a follow up). The isLegacy method is moved to SkinTemplateVector. Changes of note: * html-debuglog is no longer needed. SkinMustache includes this information on the skins behalf * html-printtail and html-headelement are now not needed in the master template and added by SkinMustache * Skin::getAfterPortlet does not provide the `after-portlet` wrapping element provided by BaseTemplate::getAfterPortlet so this is added * SkinTemplate::getFooterIcons does not support the options that BaseTemplate::getFooterIcons does so any icons which do not have an image must be manually checked for and unset Known changes to HTML output as a result of intentionally delegating their output to the core SkinMustache class: * A new line is removed between the body element and #mw-page-base * #mw-html-debug-log now appears at the end of the body element * #printfooter is now a child of #mw-content-text rather than sibling. Bug: T251212 Change-Id: I4e89beb96f6401ed7e51bafdf0aac408f5a2c42f
2020-04-28 21:16:21 +00:00
"skins.vector.styles",
"skins.vector.icons",
"mediawiki.ui.icon"
],
"messages": [
"createaccount",
"vector-anon-user-menu-pages",
"vector-anon-user-menu-pages-learn",
"vector-personal-more-label",
"parentheses",
"otherlanguages",
"tooltip-p-logo",
"vector-opt-out-tooltip",
"vector-opt-out",
"navigation-heading",
"vector-action-toggle-sidebar",
"vector-jumptonavigation",
"vector-jumptosearch",
Switch to navigation-first DOM order under `$wgVectorIsSearchInHeader` feature flag This moves the header, navigation, sidebar, and article toolbar to be before the content in the DOM. As a result, a lot of absolute positioning logic can be removed and styles can be simplified. Note that although the sidebar was moved from the header into the workspace container allowing it to de-absolutely positioned, its absolute positioning was kept intact as it has a fair amount of complexity that should be handled in a separate task. To activate, set `$wgVectorIsSearchInHeader = true;` Changes that could cause concern: * The "jump to search" link was removed as the search is now much earlier in the DOM and I questioned the value of keeping this. However, it can be added back in if this change is contentious. * A "jump to content" link was added to account for the new DOM order. * Because the sidebar was taken out of the header, users will not be able to tab from the sidebar button into the sidebar without additional tweaking (e.g. should we add JS to enable this?). It was deemed that this work can be saved as a follow-up task. * I applied `overflow-y: auto` to the `mw-page-container` because the header's top margin was collapsing and caused whitespace to appear between the viewport and the header. Alternatively, we could apply a top padding to the page container and remove the header's top margin. I went for the simplest solution but am open to alternatives. * I left the footer as-is in this patch to minimize risk. It might be cleaner later on to move the footer inside the workspace container which would leave only one workspace container. Bug: T261802 Change-Id: Ic553fab3bde25769b103d899b92b3b694c00c384
2020-09-08 23:20:58 +00:00
"vector-jumptocontent",
"search",
"sitesubtitle",
"sitetitle",
"tagline"
Merge SkinVector and VectorTemplate (step 1/2) Please note I7e06a4cc226f3434c0f655212a464b8b98bcc7f4 should be merged at the same time as this patch. == The background == All extensions have been weaned of BaseTemplate hooks in Wikimedia projects. This change now means that Vector will no longer run any BaseTemplate hooks. See the epic T253809 for the implementation details. == The change == BaseTemplate will now have nothing to do with the rendering of Vector. The skin version is added to express the significance of breaking compatibility with 3rd party extensions. We TEMPORARILY remove SkinVector to retain git blame. SkinTemplateVector will be renamed SkinVector in the follow up (see 2/2) Update skin.json to use SkinTemplateVector for the skin (this will be fixed in a follow up). The isLegacy method is moved to SkinTemplateVector. Changes of note: * html-debuglog is no longer needed. SkinMustache includes this information on the skins behalf * html-printtail and html-headelement are now not needed in the master template and added by SkinMustache * Skin::getAfterPortlet does not provide the `after-portlet` wrapping element provided by BaseTemplate::getAfterPortlet so this is added * SkinTemplate::getFooterIcons does not support the options that BaseTemplate::getFooterIcons does so any icons which do not have an image must be manually checked for and unset Known changes to HTML output as a result of intentionally delegating their output to the core SkinMustache class: * A new line is removed between the body element and #mw-page-base * #mw-html-debug-log now appears at the end of the body element * #printfooter is now a child of #mw-content-text rather than sibling. Bug: T251212 Change-Id: I4e89beb96f6401ed7e51bafdf0aac408f5a2c42f
2020-04-28 21:16:21 +00:00
]
}
]
}
},
"SkinLessImportPaths": {
"vector": "resources/mediawiki.less"
},
"MessagesDirs": {
"Vector": [
"i18n"
]
},
"AutoloadClasses": {
"SkinVector": "includes/SkinVector.php"
},
"AutoloadNamespaces": {
"Vector\\": "includes/"
},
[Special:Preferences] [PHP] Add skin version user preference and configs Add a Vector-specific user preference to Special:Preferences for toggling skin version, either Legacy Vector or the latest Vector. The presentation of the new preference section and the default values for anonymous, new, and existing accounts are configurable via $wgVectorShowSkinPreferences, $wgVectorDefaultSkinVersion (to be used by the feature manager in T244481), $wgVectorDefaultSkinVersionForExistingAccounts, and $wgVectorDefaultSkinVersionForNewAccounts. These configurations default to the fullest experience so that third-party configuration is minimal. See skin.json for details. The configurations are each tested in VectorHooksTest.php. When presentation is enabled, the new preference appears as a checkbox; enabled is Legacy mode and disable is latest. There are a number of unfortunate details: - Showing and hiding a checkbox is supported by OOUI. Showing and hiding a whole section (Vector skin preferences, in this case) is not so this additional client JavaScript functionality is added in Core (see Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377). - Stylization as a checkbox is wanted. However, the implied storage type for OOUI checkboxes is a boolean. This is not wanted in the event that another skin version is added (e.g., '3' or 'alpha'). As a workaround, the preference is converted from a boolean to a version string ('1' or '2') on save in Hooks::onPreferencesFormPreSave() and from a version string to a checkbox enable / disable string ('1' or '0') in onGetPreferences(). There a number of test cases to help cover these concerning details. Documentation for overriding the skin version as a URL query parameter is provided in anticipation of T244481. Bug: T242381 Bug: T245793 Depends-On: Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377 Depends-On: Ifc2863fca9cd9efd11ac30c780420e8d89e8cb22 Change-Id: I177dad88fc982170641059b6a4f53fbb38eefad6
2020-01-23 21:53:09 +00:00
"ConfigRegistry": {
"vector": "GlobalVarConfig::newInstance"
},
"Hooks": {
"SkinPageReadyConfig": "Vector\\Hooks::onSkinPageReadyConfig",
[Special:Preferences] [PHP] Add skin version user preference and configs Add a Vector-specific user preference to Special:Preferences for toggling skin version, either Legacy Vector or the latest Vector. The presentation of the new preference section and the default values for anonymous, new, and existing accounts are configurable via $wgVectorShowSkinPreferences, $wgVectorDefaultSkinVersion (to be used by the feature manager in T244481), $wgVectorDefaultSkinVersionForExistingAccounts, and $wgVectorDefaultSkinVersionForNewAccounts. These configurations default to the fullest experience so that third-party configuration is minimal. See skin.json for details. The configurations are each tested in VectorHooksTest.php. When presentation is enabled, the new preference appears as a checkbox; enabled is Legacy mode and disable is latest. There are a number of unfortunate details: - Showing and hiding a checkbox is supported by OOUI. Showing and hiding a whole section (Vector skin preferences, in this case) is not so this additional client JavaScript functionality is added in Core (see Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377). - Stylization as a checkbox is wanted. However, the implied storage type for OOUI checkboxes is a boolean. This is not wanted in the event that another skin version is added (e.g., '3' or 'alpha'). As a workaround, the preference is converted from a boolean to a version string ('1' or '2') on save in Hooks::onPreferencesFormPreSave() and from a version string to a checkbox enable / disable string ('1' or '0') in onGetPreferences(). There a number of test cases to help cover these concerning details. Documentation for overriding the skin version as a URL query parameter is provided in anticipation of T244481. Bug: T242381 Bug: T245793 Depends-On: Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377 Depends-On: Ifc2863fca9cd9efd11ac30c780420e8d89e8cb22 Change-Id: I177dad88fc982170641059b6a4f53fbb38eefad6
2020-01-23 21:53:09 +00:00
"GetPreferences": "Vector\\Hooks::onGetPreferences",
"PreferencesFormPreSave": "Vector\\Hooks::onPreferencesFormPreSave",
"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.search": {
"dependencies": [
"mediawiki.Uri",
"wvui-search"
],
"packageFiles": [
"resources/skins.vector.search/skins.vector.search.js",
"resources/skins.vector.search/instrumentation.js",
"resources/skins.vector.search/App.vue",
{
"name": "resources/skins.vector.search/config.json",
"callback": "Vector\\Hooks::getVectorWvuiSearchResourceLoaderConfig"
}
],
"messages": [
"searchbutton",
"searchresults",
"searchsuggest-containing"
]
},
"skins.vector.styles.legacy": {
"class": "ResourceLoaderSkinModule",
"features": {
"normalize": true,
"elements": true,
"logo": true,
"content": true,
"content-links": true,
"content-thumbnails": true,
"interface": true,
"interface-message-box": true,
"interface-category": true,
"content-tables": true,
"i18n-ordered-lists": true,
"i18n-all-lists-margins": true,
"i18n-headings": true
},
"targets": [
"desktop",
"mobile"
],
"styles": [
"resources/common/common.less",
"resources/skins.vector.styles.legacy/skin-legacy.less"
]
},
"skins.vector.styles": {
"class": "ResourceLoaderSkinModule",
"features": {
"normalize": true,
"elements": true,
"content-links": true,
"content-media": true,
"content-tables": true,
"interface": true,
"interface-message-box": true,
"interface-category": true,
"i18n-ordered-lists": true,
"i18n-all-lists-margins": true,
"i18n-headings": true
},
"targets": [
"desktop",
"mobile"
],
"styles": [
"resources/common/common.less",
"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": "#000",
"class": "ResourceLoaderOOUIIconPackModule",
"variants": [],
"icons": [
"language",
"ellipsis",
"userAvatar",
"userTalk",
"markup",
"search",
"settings",
"labFlask",
"unStar",
"userContributions",
"logIn",
"logOut"
]
},
"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/dropdownMenus.js",
"resources/skins.vector.js/sidebar.js",
"resources/skins.vector.legacy.js/collapsibleTabs.js",
"resources/skins.vector.legacy.js/vector.js",
"resources/skins.vector.js/languageButton.js",
"resources/skins.vector.js/searchLoader.js",
"resources/skins.vector.js/searchToggle.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": {
"+wikibase.client.init": "skinStyles/wikibase.client.init.less",
"+ext.echo.styles.alert": "skinStyles/ext.echo.styles.alert.less",
"+ext.uls.compactlinks": "skinStyles/ext.uls.compactlinks.less",
"+ext.uls.pt": "skinStyles/ext.uls.pt.less",
"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"
}
},
"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"
[Special:Preferences] [PHP] Add skin version user preference and configs Add a Vector-specific user preference to Special:Preferences for toggling skin version, either Legacy Vector or the latest Vector. The presentation of the new preference section and the default values for anonymous, new, and existing accounts are configurable via $wgVectorShowSkinPreferences, $wgVectorDefaultSkinVersion (to be used by the feature manager in T244481), $wgVectorDefaultSkinVersionForExistingAccounts, and $wgVectorDefaultSkinVersionForNewAccounts. These configurations default to the fullest experience so that third-party configuration is minimal. See skin.json for details. The configurations are each tested in VectorHooksTest.php. When presentation is enabled, the new preference appears as a checkbox; enabled is Legacy mode and disable is latest. There are a number of unfortunate details: - Showing and hiding a checkbox is supported by OOUI. Showing and hiding a whole section (Vector skin preferences, in this case) is not so this additional client JavaScript functionality is added in Core (see Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377). - Stylization as a checkbox is wanted. However, the implied storage type for OOUI checkboxes is a boolean. This is not wanted in the event that another skin version is added (e.g., '3' or 'alpha'). As a workaround, the preference is converted from a boolean to a version string ('1' or '2') on save in Hooks::onPreferencesFormPreSave() and from a version string to a checkbox enable / disable string ('1' or '0') in onGetPreferences(). There a number of test cases to help cover these concerning details. Documentation for overriding the skin version as a URL query parameter is provided in anticipation of T244481. Bug: T242381 Bug: T245793 Depends-On: Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377 Depends-On: Ifc2863fca9cd9efd11ac30c780420e8d89e8cb22 Change-Id: I177dad88fc982170641059b6a4f53fbb38eefad6
2020-01-23 21:53:09 +00:00
},
"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": "1",
"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."
[Special:Preferences] [PHP] Add skin version user preference and configs Add a Vector-specific user preference to Special:Preferences for toggling skin version, either Legacy Vector or the latest Vector. The presentation of the new preference section and the default values for anonymous, new, and existing accounts are configurable via $wgVectorShowSkinPreferences, $wgVectorDefaultSkinVersion (to be used by the feature manager in T244481), $wgVectorDefaultSkinVersionForExistingAccounts, and $wgVectorDefaultSkinVersionForNewAccounts. These configurations default to the fullest experience so that third-party configuration is minimal. See skin.json for details. The configurations are each tested in VectorHooksTest.php. When presentation is enabled, the new preference appears as a checkbox; enabled is Legacy mode and disable is latest. There are a number of unfortunate details: - Showing and hiding a checkbox is supported by OOUI. Showing and hiding a whole section (Vector skin preferences, in this case) is not so this additional client JavaScript functionality is added in Core (see Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377). - Stylization as a checkbox is wanted. However, the implied storage type for OOUI checkboxes is a boolean. This is not wanted in the event that another skin version is added (e.g., '3' or 'alpha'). As a workaround, the preference is converted from a boolean to a version string ('1' or '2') on save in Hooks::onPreferencesFormPreSave() and from a version string to a checkbox enable / disable string ('1' or '0') in onGetPreferences(). There a number of test cases to help cover these concerning details. Documentation for overriding the skin version as a URL query parameter is provided in anticipation of T244481. Bug: T242381 Bug: T245793 Depends-On: Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377 Depends-On: Ifc2863fca9cd9efd11ac30c780420e8d89e8cb22 Change-Id: I177dad88fc982170641059b6a4f53fbb38eefad6
2020-01-23 21:53:09 +00:00
},
"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."
[Special:Preferences] [PHP] Add skin version user preference and configs Add a Vector-specific user preference to Special:Preferences for toggling skin version, either Legacy Vector or the latest Vector. The presentation of the new preference section and the default values for anonymous, new, and existing accounts are configurable via $wgVectorShowSkinPreferences, $wgVectorDefaultSkinVersion (to be used by the feature manager in T244481), $wgVectorDefaultSkinVersionForExistingAccounts, and $wgVectorDefaultSkinVersionForNewAccounts. These configurations default to the fullest experience so that third-party configuration is minimal. See skin.json for details. The configurations are each tested in VectorHooksTest.php. When presentation is enabled, the new preference appears as a checkbox; enabled is Legacy mode and disable is latest. There are a number of unfortunate details: - Showing and hiding a checkbox is supported by OOUI. Showing and hiding a whole section (Vector skin preferences, in this case) is not so this additional client JavaScript functionality is added in Core (see Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377). - Stylization as a checkbox is wanted. However, the implied storage type for OOUI checkboxes is a boolean. This is not wanted in the event that another skin version is added (e.g., '3' or 'alpha'). As a workaround, the preference is converted from a boolean to a version string ('1' or '2') on save in Hooks::onPreferencesFormPreSave() and from a version string to a checkbox enable / disable string ('1' or '0') in onGetPreferences(). There a number of test cases to help cover these concerning details. Documentation for overriding the skin version as a URL query parameter is provided in anticipation of T244481. Bug: T242381 Bug: T245793 Depends-On: Iaf68b238a8ac7a4fb22b9ef5d6c5a3394ee2e377 Depends-On: Ifc2863fca9cd9efd11ac30c780420e8d89e8cb22 Change-Id: I177dad88fc982170641059b6a4f53fbb38eefad6
2020-01-23 21:53:09 +00:00
},
"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": true
},
"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
Implement Page, Workspace, Content, and Article Toolbar Containers This patch closely follows the desired guidelines/desired styles Alex Hollender has put forth in his prototype, but uses multiple containers to achieve this look since our DOM order/structure is different than the DOM structure in the prototype. The following containers are used, but unlike his prototype, they are sometimes used more than once: * Page Container: Contains every other container and limits the overall max-width of the white part of the page. * Workspace Container: Contains the sidebar and content container. The sidebar is displaced ~30 pixels to the start (left) of the workspace container at all times. * Content Container: Contains the content. The max-width of this changes depending on whether you are on a special page/history page vs. other pages. * Article Toolbar Container: Contains the article toolbar. The max-width of this is always the same as the max-width of the article content as we don't want the toolbar to move when going from the article page to the history/special page. Changes to be aware: * To test locally, `$wgVectorLayoutMaxWidth = true;`. This design is temporarily feature flagged and defaults to being "off". * Note that layout-max-width.less is a temporary file made to meet the feature flag requirement of T246420 (intended to derisk the deployment). After the deploy, we should merge most if not all of the rules into layout.less where the max-width design will become the default. * Per Jon's code review comment, I have relaxed the indenting of skin.mustache to make the diff easier to reason about. If desired, the correct indenting can be achieved in a (much less risky) follow-up commit. Bug: T246420 Bug: T153043 Change-Id: Ie49f629bc705850c6996164a516957476c034048
2020-06-23 18:02:32 +00:00
},
"VectorLanguageInHeader": {
"value": {
"logged_in": false,
"logged_out": false
},
"description": "@var array 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)."
},
"VectorLanguageInHeaderTreatmentABTest": {
"value": false,
"description": "@var boolean Enables or disables the language in header treatment A/B test. See https://phabricator.wikimedia.org/T280825 and associated tasks for additional detail."
},
"VectorConsolidateUserLinks": {
"value": {
"logged_in": false,
"logged_out": false
},
"description": "@var array Moves user links into a consolidated dropdown menu with the exception of several top level items including echo, user page and create account links."
},
"VectorStickyHeader": {
"value": {
"logged_in": false,
"logged_out": false
},
"description": "@var array Enables a persistent header that allows quick access to user links, editing tools, search and other links while scrolling down a page"
},
"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
}