When VisualEditor is not installed, there is no point in registered
resource loader modules that depends on it. A use case is trying to run
tests for the MediaWiki tarball. It comes with Cite but without
VisualEditor.
The patch is based on GuidedTour patch by Matthew Flaschen
https://gerrit.wikimedia.org/r/#/c/305691/ for T143297
Change-Id: Idf769e0149f93c099a94b1b7a6cb203273dab881
extension.json only removes top level and "config" keys that start with
@, so this "comment" was actually being passed onto ResourceLoader and
eventually being ignored at that stage.
But since it's not a recognized value, it causes validation of the
extension.json file against the schema to fail.
Bug: T128311
Change-Id: Ibed94e1818c8fc9c3afdc3e09d0af5e84c49a342
* The query request prop=references will return a JSON blob of all
references in the page
* Conveniently references are returned with an array id key that corresponds
to an anchor tag in the HTML
* When references storage is disabled the API request will trigger an
error.
Bug: T123290
Change-Id: I81a965bcb47d17df18f1e415e3c25f88f6b48ffc
This merges the content of the LinksUpdateConstructed hook callback
into the LinksUpdate hook callback since it's fine to defer saving
to the cache.
Change-Id: Iad6008a31aaf659af3c560858df278335bc57c8f
This stores references in page_props during links update in
compressed JSON form. If the size is too big, it's broken up
in several parts to fit, which is very unlikely to occur more
than once.
When the data is retrieved from the db, it's always cached. If
set in config, it's also saved in the cache on parse. If not,
the cache is invalidated when references are modified.
Uses cases include : section preview to also show refs defined
elsewhere on the page (T124840) and MobileFrontend (T123328).
For the later, this still needs API support (T123290).
There's a soft dependency on the core change
I0c73b3d181f32502da75687857ae9aeff731f559.
Bug: T125329
Change-Id: I7b106254b8f264f93b0f0c9cfa89f65adeeea4f0
This code has been developed over three years now in the repo of MediaWiki's
integration of VisualEditor. It has grown and developed significantly during
that time, but now is pretty stable. A number of hacks inside the MediaWiki-
VisualEditor code base have been used to prevent this code from being loaded
on wikis where the Cite extension is not deployed, but this state of affairs
is and always was meant to be temporary.
This code is under the MIT licence which is a tad messy, but not impossible.
It's clearly labelled as such. The list of authors has been updated to take
into account the influx of new functionality.
Bug: T41621
Bug: T104928
Change-Id: I39936ed83d5a60471a0a75da753f498e80aef234
* Add a new module ext.cite.style to load the new CSS.
* Add a ResourceLoaderFileModule that adds the correct CSS file
depending on the content language, so that the visual style of
citations can be changed per-language.
The main ext.cite.style.css file renders similarly to MediaWiki's
default Cite style. Also, an example CSS for Farsi numbering is
included.
Bug: T86782
Change-Id: I487095df8a7c4241a14f7b4480360f6774130bec
Move the JS which is purely for accessibility purposes into a separate
JS RL module named ext.cite.a11y. Move all pure CSS, which is not dependant
on accompanying JS into a separate ext.cite.styles module
Bug: T101559
Change-Id: I58adcfbcf9af2bb3b6d5dabb6c38c42af78e0416