mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-23 23:33:54 +00:00
Limit table wrapping to configuration flag
We want to limit this behaviour on initial roll out to certain wikis. Bug: T330527 Change-Id: If73f6f3d182cc386ebf0e750206afdb05fd3d863
This commit is contained in:
parent
03fd09ff1b
commit
dba9e16be2
|
@ -118,6 +118,10 @@ Do not rely on any of the feature flags documented here. They should not be cons
|
|||
|
||||
- Note: The assumption is that A/B testing will always be occurring in this skin so would never be removed unlike the other flags.
|
||||
|
||||
- wgVectorWrapTablesTemporary
|
||||
- When enabled, certain tables will be wrapped in a div to make them horizontally scrollable when no
|
||||
space is available.
|
||||
- Removal ticket: [https://phabricator.wikimedia.org/T361737](https://phabricator.wikimedia.org/T361737)
|
||||
|
||||
## Site-level Configuration
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"@doc": "This file describes the shape of the AB config. It exists to support jest and TypeScript.",
|
||||
"VectorSearchApiUrl": ""
|
||||
"VectorSearchApiUrl": "",
|
||||
"VectorWrapTablesTemporary": true
|
||||
}
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
const config = require( './config.json' );
|
||||
const init = () => {
|
||||
if ( !config.VectorWrapTablesTemporary ) {
|
||||
return;
|
||||
}
|
||||
const tables = document.querySelectorAll( '.mw-parser-output > table' );
|
||||
Array.from( tables ).forEach( ( table ) => {
|
||||
// Don't wrap tables within tables
|
||||
|
|
|
@ -433,7 +433,8 @@
|
|||
{
|
||||
"name": "resources/skins.vector.js/config.json",
|
||||
"config": [
|
||||
"VectorSearchApiUrl"
|
||||
"VectorSearchApiUrl",
|
||||
"VectorWrapTablesTemporary"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -571,6 +572,10 @@
|
|||
]
|
||||
},
|
||||
"config": {
|
||||
"VectorWrapTablesTemporary": {
|
||||
"value": false,
|
||||
"description": "@var bool temporary config variable for controlling role out of tables. When enabled certain tables will be wrapped with a div"
|
||||
},
|
||||
"VectorNightMode": {
|
||||
"value": {
|
||||
"logged_in": false,
|
||||
|
|
Loading…
Reference in a new issue