718bcef6f9
When the AB test is enabled both the old and new TOC's are in the page's html but only one is visible. The `.vector-toc-visible` class is also present and will try to apply a left margin even if the page has been bucketed into the control or unsampled group. This patch takes the simplest approach to fix this problem with CSS only especially given the transient nature of this code (will be removed when AB test is finished): * When the page bucketed in the control or unsampled group, prevent .vector-toc-visible from applying a left-margin through the use of `:not` selectors. Additionally: * Remove unnecessary `margin-left` rule that used to apply to the mw-workspace-container. Due to the work done in I2f95d5938674bb8263b6203c5f6a469762bf0cc2, the workspace container will now always have a computed left margin of zero because it is the same width as the page container. Bug: T306366 Change-Id: Icd9572353bb5e29cfda91b095ceb8c2e652864e7 |
||
---|---|---|
.phan | ||
.storybook | ||
dev-scripts | ||
i18n | ||
includes | ||
resources | ||
screenshots | ||
skinStyles | ||
stories | ||
tests | ||
.eslintignore | ||
.eslintrc.json | ||
.eslintrcEs6.json | ||
.gitignore | ||
.gitreview | ||
.nvmrc | ||
.phpcs.xml | ||
.stylelintignore | ||
.stylelintrc.json | ||
.svgo.config.js | ||
bundlesize.config.json | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
COPYING | ||
Doxyfile | ||
jest.config.js | ||
jest.setup.js | ||
jsdoc.json | ||
package-lock.json | ||
package.json | ||
README.md | ||
skin.json | ||
tsconfig.json |
Vector Skin
Installation
See https://www.mediawiki.org/wiki/Skin:Vector.
Configuration options
See skin.json.
Development
Node version
It is recommended to use nvm to use the version of node defined
in .nvmrc
during local development. This ensures consistency amongst development environments.
Coding conventions
We strive for compliance with MediaWiki conventions:
https://www.mediawiki.org/wiki/Manual:Coding_conventions
Additions and deviations from those conventions that are more tailored to this project are noted at:
https://www.mediawiki.org/wiki/Reading/Web/Coding_conventions
Pre-commit tests
A pre-commit hook is installed when executing npm install
. By default, it runs
npm test
which is useful for automatically validating everything that can be
in a reasonable amount of time. If you wish to defer these tests to be executed
by continuous integration only, set the PRE_COMMIT
environment variable to 0
:
$ export PRE_COMMIT=0
$ git commit
Or more succinctly:
$ PRE_COMMIT=0 git commit
Skipping the pre-commit tests has no impact on Gerrit change identifier hooks.
Hooks
See hooks.txt.