All other hook handlers are in the dedicated CiteHooks class.
Main motivation here is to make the huge Cite class smaller,
especially by removing static code that does not rely on anything
else the class does.
Bug: T236260
Change-Id: If0b3f6c989e44283428cda4b2c4d8d5303385d22
Main motivation here is to make the list easier to read. We are not
going to have more than a single hook handler per hook anyway.
Bug: T236260
Change-Id: I72357a89402e6febfa1e99f825a3fd699c5561b7
Relevant edge-cases:
* ctype_digit() only works on strings. Anything else, including
integers, will make it return false.
* The empty string will return false.
Both is identical to what the code did before.
Motivation for this change is to streamline the code, and make it
smaller and faster to read.
Bug: T236260
Change-Id: I2d209347d16f2bde14b345c3f88ec64b081283cb
There are so few users with this configuration that we need to stop
sampling in order to get data. Sampling is still in effect for
"baseline" users with the feature disabled.
We use separate schemas to simplify analytics on the two populations.
Bug: T214493
Change-Id: I16e4ed236e50e1e246ff28ff0dba3e52e4b56caf
Allows the "refines" attribute when the feature flag is set, but doesn't
render. This is part of our rollback strategy, so that we aren't left
with invalid wikitext in case of undeployment.
Bug: T236257
Change-Id: I936be0e62dccb46caeb84162d2c5166956fd9916
* I used https://codesearch.wmflabs.org to make sure the private
constants are indeed not used anywhere.
* The added type hints are safe, as far as I can tell. There is no way
one of these parameters can contain anything else. Otherwise the code
would fail already.
Change-Id: Iaa7615e9864805760fa652700b58b69680b4f17e
This is a rebase mistake introduced with I7461ffd. Since If83420a this
module is not defined in extension.json any more, but in the
ResourceLoaderRegisterModules hook in PHP. This is done to be able to
dynamically change the contents of the module, depending on the
availability of anotehr extension.
I'm not exactly sure what happens when a module is defined twice. I
tried locally and it seems to work, with no visible error message.
Bug: T234605
Change-Id: I209e19bbc2184a6d58086a703145ad58671060b6
As stated in the patch I26fe41c: "The separate ext.cite.a11y module
is kept for (temporary) compatibility with cached HTML, and should be
removed in about a month." That was almost a year ago.
Bug: T205270
Change-Id: I7461ffd61bea0b79a56b6ee9ce8315f5f6c39b7b
Collect EventLogging metrics for footnote and reference link
interactions, so that we can compare behavior with and without
Reference Previews enabled.
This tracking will be reverted once analysis is complete.
A mostly arbitrary sample rate of 1/1000 is hardcoded here. This is
loosely based on the latest tuning of Popups sampling at 1/100,
divided by a conservative factor of 10 to ensure headroom.
The sample is skewed by skipping clients without sendBeacon support,
but we're avoiding the mw.track synchronous fallback, which injects an
image tag and introduces lag any time the user clicks external links
in the references.
Bug: T231529
Change-Id: Iad32b64114f88675eecbb01712418c968e3cf661