mediawiki-skins-Vector/tests
Nicholas Ray 17433b63fc Add hash fragment support to table of contents
Per T325086, the TOC should expand and activate the section that corresponds to
the window's hash fragment.

Additional changes:

* Moves logic  that runs on page load to determine the
intersection from section observer to main.js, since the hash fragment can
take precedence over the scroll position (e.g. when scrolled all the way to the
bottom).

* Make section observer's pause() cancel any pending intersection calculations
so that it doesn't interfere with other async logic.

* Moves onHeadingClick and onToggleClick logic to activate and expand a section
to tableOfContents.js to facilitate unit testing this behavior with clicks and
hash fragment changes.

Bug: T325086
Change-Id: I8a2cf0e6a96467fae97608450b321c181155e424
2023-03-09 00:33:37 -07:00
..
a11y Ignore noisy rule for a11y test 2023-02-23 15:01:48 -06:00
jest Add hash fragment support to table of contents 2023-03-09 00:33:37 -07:00
phpunit [WIP] Removes the TOC class in body and adds in html 2023-02-28 17:21:16 -06:00
.eslintrc.json Set default pinnable state for page tools 2022-12-08 14:44:07 -07:00