After this patch, Parsoid-rendered pages will include the same
footnote markers as the legacy parser for custom group markers.
The divergent CSS implementation is left intact, for a soft migration.
Bug: T377454
Change-Id: I576dfff4155fb8c2f91ef0d28a65b319aa5bbb07
This isn't needed until patch I576dfff415, but is split into a
predecessor to keep the test and logic changes obviously separate.
Bug: T377454
Change-Id: Iff4a96be77af53a71a1ebe179f31bcc214182bfe
Intended as workaround to make sure that the temp account notice is
closed before opening Citoid. But does not hurt in any case I guess.
Bug: T378537
Bug: T378417
Bug: T377666
Change-Id: I4c3bf156cbb7306eda924bcebc2fbed3b5864f8a
Behavior change: previously, an error would be rendered once the
custom markers run out. After this patch there is a graceful fallback
to default group rendering (eg. "lower-greek 1000").
This is a slight improvement, but is user-facing so should be
discussed before merging.
In future work we'll render custom marks programmatically so this edge
case would be unreachable, and since the error message only exists to
nudge editors to extend the custom group symbol sequence, this would
also become wasted effort.
This patch splits out a lower-level method which produces the bare
mark label, with no link or wikitext formatting. The patch narrows
and simplifies the interface so that the method can be made available
to Parsoid, and will be converted to a service in a separate patch.
Bug: T377454
Change-Id: I719b60b46cdef0be7463d76e9125d75ab4f333ae
Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.
Bug: T376276
Change-Id: I73a4ce1ecd9b4fe040e5bfd22889e783071fab0d
Cite's MWDocumentReferences included a Document, which caused
auto-save serialization to fail silently on the cyclical reference.
This patch moves the caching to per-instance scope, which was the
better choice to begin with. The document refs are recalculated after
each change anyway, and caching is only necessary to work around an
awkward control flow in which each ReferenceNode is responsible for
its footnote number.
Bug: T377484
Change-Id: Iebe4befd603fe07d9da2a5bb6126228ec4d5dfea
The exact rendering of each item should be part of the widget.
This also allows a better application of the sub-ref indent.
Bug: T375841
Change-Id: Ic2c24f40d59f41b316c6d6f362726c1ee68f2102
Add e2e test to verify adding a basic ref and a VE-Cite tool template works with the WT2017 editor
TODO: In follow-up work, streamline Cite and Citoid initialization so
that we don't have to `wait` for partially-wired elements to get
their full behavior.
Bug: T373787
Change-Id: Iea41ce8b71e61d2c9868e50ba680d9c9245bb906
This avoids the use of Parsoid's SiteConfig::getMWConfigValue() method,
which is unnecessary when the extension has direct access to MediaWiki
services itself.
This also fixes the omission of CiteResponsiveReferencesThreshold from
the extension.json.
Change-Id: I01b43136b0827f185523f1318253372b09750de4
This seems to play well with Popups with and without
Ie8fa1672b9fd . However, it's not clear to me why this still works
and even gives priority to the Popups implementation when present,
regardless of the order the extensions are loaded in. Happily, this
is the desired behavior.
Bug: T363162
Change-Id: Ic479c0a381ee16d1abcecfdd5ee48f0afccc1d3f
Reverses the previous logic which traversed up from a fragment to get
the full document's refs. Much other code in VE isn't ready for this
behavior, for example we can see list-defined refs but not inline refs
defined outside of the fragment.
This patch will ensure that we're only looking at refs accessible from
the current fragment, and prevents caching on fragments because the
cache uses `persistentStorage`, which is shared between fragments and
their parent document.
Bug: T374068
Change-Id: Ia38098f8b3e5a9d24c2206e11edab37d60209225
I could add some simplifications to reduce the complexity of the
tests a bit. I also fixed the test for the change handler. Seems
it did not work that way before.
Also some minor random doc fixes.
Change-Id: If1530a815ea126c38c3a55f3d52e3ca482059840
This has no user-facing consequences. The constant can be renamed any
time again, if needed. It's not used anywhere else:
https://codesearch.wmcloud.org/search/?q=BOOK_REF_ATTRIBUTE
Bug: T373307
Change-Id: Ia4d588e926bb6e75f96048f2d3782c0f23ece514
The Parsoid error messages are missing a couple of parameters, according
to the json i18n files; this patch fixes that issue.
Change-Id: I4232c0b71ecc6d6f1220db3988e67d9cd4eb3d58