450a395f95
* When wikipage.tableOfContents is executed, the table of contents has been replaced so we should update the sections associated with the section observer as the old sections no longer exist in theDOM. * If VisualEditor repaints the page, we should update the elements associated with the table of contents as the body-content element no longer exists in the page. * When VisuaLEditor is active we should disable the intersection observer as there is no table of contents to update. Minor changes: * Light refactor of large function in main.js * reloadTableOfContents returns a promise and now fires a new hook wikipage.tableOfContents.vector to signal when it is finished which has also been requested by community members. This allows the code in main.js to update elements at relevant point in time * Add FIXME note (doing this would have been considerable work) * I've added a call to mw.log.warn which would have saved me considerable debugging time for this issue to diagnose the issue. Bug: T316037 Bug: T316025 Change-Id: Ib42d532d4e900c01061e1c5e39c03b17f0619c46 |
||
---|---|---|
.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.