Follows-up f5aaf75ad1.
* Improve some docs for these hooks.
* Add type hints.
* Add them as a subgroup within the ResourceLoader docgroup
for easy navigation.
Bug: T246855
Change-Id: I52f31e2b63dcf265b27e68ba8fd4f885d82088ac
* Remove fallback for creating link toggles the "old" way.
This obsolete with the checkbox-based implementation we've had for over
a year now. This means that any server- or user-produced TOC-like
elements without a toggle, will continue to be non-toggleable.
* Remove obsolete "tochidden" styling and print style. This is all
taken care by mediawiki.toc.styles already.
* Fix the bug where the "Hide" state cookie was not applied after reload
or when visiting other pages.This logic was trapped inside fallback
which is no longer triggered on page views today.
* Reduce the JS code to just:
- On initial load, if cookie says to hide, hide.
- On click, flip a cookie.
- Remove use of jQuery. This is simple stuff :)
* Testing:
- Update tests to assert the code we actually use (checkbox),
and not the fallback logic that has now been removed.
- Add new test to confirm that initial hidden state works.
Bug: T210789
Change-Id: I49014af70982a16f178ad0495469154751215755
In mysql the user_id and user_ip fields are not nullable,
but include a default 0 and '', however in Postgress the default
was not set, while user_id was set to not nullable. In the
code that uses this table, we set either user_id or user_ip
depending on whether the user is anon or registered. Thus both
fields should either be nullable, or contain a default.
Given that mysql has defaults set, I've opted for bringing
Postgress closer to what mysql does.
This was always broken and was discovered by adding new tests
for this functionality.
Bug: T239640
Change-Id: I75bf469a30225687a4b0cb550a4068cb07208c01
In looking at early flame graphs and XHGui profiles, I noticed
code paths like `decode -> decode@2 -> decode@3`, for example for
magic words arrays and special page names.
Rather than storing these as `[a, [a, [a, ..], [a, ..], [a, ..], .. ] ]`
store them instead as `[v, [ .. ]]`. This makes for smaller files,
but more important it further reduces runtime overhead.
Bug: T218207
Change-Id: I492e5d32106ba7fd1b22075cf026fee2e3d1944e
LocalisationChecksBlacklist and LocalisationIgnoredOptionalMessages
were removed, update hooks.txt
Change-Id: Ia2dc083a70bf5a7e0c121702cc09ace5bbb2b817
Separate HTML generation from the huge prepareQuickTemplate function.
This allows reuse inside skin classes.
All methods will be used shortly in Ibb2a69801d3b004a0a174308d3ac04d1.
Bug: T251212
Change-Id: I1dd897419effd4bda2ecb7fcbe58e082693cce9b