mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 09:30:17 +00:00
d1072d0fdf
As described in the readme but not implemented until now, this patch enables the skin version to be specified as a URL query parameter. This is useful for testing both skin versions during development and on wiki, as well as enabling sharing URLs with a specific skin (Vector) and skin version (1 or 2). Obtaining the actual skin version requires tying together three input sources, WebRequest, User, and Config. It seems simple but it'd be easy to botch. For this reason, a helper class to correctly interrogate them and tests are provided. Bug: T244481 Change-Id: I52d80942b4270c008d4e45050589ed9220255a50
50 lines
1.4 KiB
Markdown
50 lines
1.4 KiB
Markdown
Vector Skin
|
|
========================
|
|
|
|
Installation
|
|
------------
|
|
|
|
See <https://www.mediawiki.org/wiki/Skin:Vector>.
|
|
|
|
### Configuration options
|
|
|
|
See [skin.json](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`: Like `useskin` 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.
|