942cd5b0f6
For idwiki/viwiki, we wish to run the sticky header edit button AB test so that treatment1 group sees the sticky header without edit buttons, treatment2 groups sees the sticky header with edit buttons, and the control/unsampled groups see no sticky header at all. This patch overrides the configuration to make the sticky header w/o edit buttons for treatment1, sticky header w/ edit buttons for treatment2, and hides sticky header for everyone else. This depends on a configuration with the treatment groups having "treatment1" and "treatment2" as substrings in their bucket names. The full configuration for idwiki/viwiki would be something like the following: ``` $wgVectorStickyHeader = [ "logged_in" => true, "logged_out" => false, ]; $wgVectorStickyHeaderEdit = [ "logged_in" => true, "logged_out" => false, ]; $wgVectorWebABTestEnrollment = [ "name" => "vector.sticky_header_edit", "enabled" => true, "buckets" => [ "unsampled" => [ "samplingRate" => 0 ], "noStickyHeaderControl" => [ "samplingRate" => 0.34 ], "stickyHeaderNoEditButtonTreatment1" => [ "samplingRate" => 0.33 ], "stickyHeaderEditButtonTreatment2" => [ "samplingRate" => 0.33 ] ], ]; ``` Bug: T312573 Change-Id: I15c360fdf5393f5594602acc33b5b916e904016d |
||
---|---|---|
.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.