c9d5b2e4fb
Move all Vector JavaScript to ResourceLoader `packageFiles`[0] which are much more compatible with modern development practices: - The entrypoint is the first `packageFiles` entry (unless specified otherwise). All other JavaScript must be explicitly executed. - Remove a level of indentation due to IIFEs from every JavaScript file. Regretfully, ESLint does not support modules except in ES6+ so the otherwise useful `no-implicit-globals` rule must be disable. The change comes with a comment so we always remember. - IDEs and other tooling understand Node.js-like `module.exports` / `require()`. This change seemed the most sensible way to start developing new JavaScript in Vector needed by the collapsible sidebar. [0]: https://www.mediawiki.org/wiki/ResourceLoader/Package_modules Change-Id: I287e604d5b1055aa97b5f987c24872755757ea1a |
||
---|---|---|
.phan | ||
.storybook | ||
dev-scripts | ||
i18n | ||
includes | ||
resources | ||
screenshots | ||
skinStyles | ||
stories | ||
tests/phpunit | ||
.eslintignore | ||
.eslintrc.json | ||
.gitignore | ||
.gitreview | ||
.phpcs.xml | ||
.stylelintignore | ||
.stylelintrc.json | ||
.svgo.yml | ||
CODE_OF_CONDUCT.md | ||
COPYING | ||
Doxyfile | ||
README.md | ||
composer.json | ||
hooks.txt | ||
jsdoc.json | ||
package-lock.json | ||
package.json | ||
skin.json | ||
tsconfig.json | ||
variables.less |
README.md
Vector Skin
Installation
See https://www.mediawiki.org/wiki/Skin:Vector.
Configuration options
See skin.json.
Development
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
URL query parameters
useskinversion
: Likeuseskin
but for overriding the Vector skin version user preference and configuration. E.g., http://localhost:8181?useskin=vector&useskinversion=2.
Skin preferences
Vector defines skin-specific user preferences. These are exposed on
Special:Preferences when the VectorShowSkinPreferences
configuration is
enabled. The user's preference state for skin preferences is used for skin
previews and any other operation unless specified otherwise.
Version
Vector defines a "version" preference to enable users who prefer the December
2019 version of Vector to continue to do so without any visible changes. This
version is called "Legacy Vector." The related preference defaults are
configurable via the configurations prefixed with VectorDefaultSkinVersion
.
Version preference and configuration may be overridden by the useskinversion
URL query parameter.