When collecting user feedback regarding the native
rendering option on the German Wikipedia (T346795)
it became apparent that some power users aim for bigger
and bolder fonts and a more LaTeX-like layout.
MathML, however, aims to format math as an integral part
of the text with uniform fonts and spacing.
To match both user needs, this patch adds a new rendering
option that uses client-side MathJax (without a need for
restbase or mathoid).
* Adjust MathJax`s loader to be compatible with the mw loader
* Add new rendering mode
* Copy MathJax source to resource module as foreign repo
Bug: T354136
Change-Id: I1ecf9c77fefc3b0f717107d81979276023f6cb84
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.
Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: I33cc5e1bfb2dd6877a45a11e253d81babe055391
The VisualEditorFullRestbaseURL config variable is no longer used by
VisualEditor and is no longer set in Wikimedia production
configuration.
Bug: T344458
Change-Id: Ifd0b9f919f7a9bdceb8761125588fe72e8d1e50c
The use of "HookHandlers" attribute in extension.json makes it possible
to inject services into hook handler classes in a future patch.
Bug: T263364
Change-Id: Id8d9d0dcc6bb6ab60c5df3074803d132393415e9
This new MathInternalRestbaseURL setting allows the internal URL of
Mathoid to be configured directly, instead of relying on
VirtualRestConfig.
This patch moves the fallback logic for the internal and external API
URL into an extension registration callback. This way, we can keep the
application logic simple, and we can issue config warnings that will
cause the updater to fail, forcing wiki owners to update their config.
Bug: T334842
Change-Id: I2fbc441955a1fe417f264f31f3729ce0715f7f16
The default for a module is desktop and all of these modules
at a glance look like they should be loaded on mobile as
well.
Bug: T324723
Change-Id: I606b75d6524692e4183cd71a991140976d04d23f
Enable popup extension for annotated math expressions. The popup shows a short summary of the formula and is generated via the Popup API introduced with I65fcbf25ac5818f6c649daf494c719921247e8f5. It is a follow up of Iefe98c1f0422dbf034e385b1a41a859d030a2cf4.
Bug: T208758
Change-Id: I8c45b7e441083c240bbf2e0217ec219df7dcc351
We can now serve the JSON data almost directly (although, curiously,
we need a main file in the module that is JavaScript, not JSON),
and without using global state in the JS code.
Change-Id: I203b3e396b28f4b4ef49c3c0918a4025082308c4
Removes functionality to
* select PNG rendering mode
* automated fallback to PNG images for SVG rendering
* PNG mode related class and tests
However, PNG images received from mathoid / restbase are still stored.
Bug: T311620
Change-Id: I595926027433182cc0396570bc3f1ce0cd2cafb3
Needed for I869af06896b9757af18488b916211c5a41a8c563, where I am
trying to change LanguageFactory in MediaWiki core not to use
MWException.
I truly feel mocked after working with this code. See if you can find
the two lines in this diff where the meaningful changes are.
Change-Id: Ifcb31dbb7113ce57526f06558cde2abedee317d7
Implement a rest API endpoint that displays the popup that is currently
only shown on a special page.
Code was revived from Idd22057a88312bf1a1cb5546d0a6edca5678d80d
Bug: T288076
Bug: T233099
Change-Id: I65fcbf25ac5818f6c649daf494c719921247e8f5
Add support for the new properties 'P9758' (symbol represents) and
'P2534' (in defining formula) for the special page that shows
in depth information about tagged formulae.
Bug: T312893
Change-Id: I39551e04487f77cca60c89e8c95293032fd5bd6a
The MathEntitySelector gets its config from wbRepo which caused a hard
dependency on the Wikibase client.
If the Wikibase client config is not available a default value (wikidata)
is used to determine the URL of the foreign repo.
As the dropdown will never do write operations, we restrict the repo
access to anonymous read only.
Bug: T313143
Change-Id: Iba33dfd32a78f4ad7c2e99a1f56218458ab884b4
This reverts commit 422be143f6.
Reason for revert: Caused hard dependancy on Wikibase
Bug: T313143
Change-Id: Ia6f551307f0fbaa2a3fc5747ed180e588c60b02f
Add the MathWbEntitySelector field to provide a dropdown menu which retrieves
the expression or qid from wikidata instead of the simple TextInputWidget to
edit the qid in the Visual Editor.
Change-Id: I0a6fddd2c2978c9c4f195d668458b8d2ed478d98
Makes it possilbe to change the QID of a formula in the visual editor
quick editor and in the dialog editor inside the options panel.
Change-Id: Ie4cb651939a59bf4446cd3e5327522d100eac5bf
Extensions using Phan need to be updated simultaneously with core due
to T308443.
Bug: T308718
Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
Change-Id: I6d355e7037186e840a76f319886ed870419d9fc8
Adds a new configuration variable that can be used to run RESTBase
independently from Math.
Bug: T306572
Change-Id: Ie40bd36a53fa5018364cf9268fee29533f4aa23b
Instead of modifying a page rendering hash,
use the proper mechanism of parser option
registration. The cache is still split on parser
option value. The 'math' option is lazy, since
not all pages contain 'math' tag and we want to
avoid an user preference lookup for every parse.
WARNING: this will invalidate ParserCache for
all pages that contain <math> tags, but according
to Moritz, this is about 1% of all pages, so we
should be fine.
Setting up the test is still rather hard and weird
due to very hacky rendering mode to user option
converter, and math renderer interaction with the DB.
This will be cleaned up later.
Depends-On: I92b3e18fabef4eecac2ec2a4844f1be2716e5d89
Change-Id: I3bce04684070ad306685dabbc51267def25773cd
This is doing a bulk of the job of creating a service
for working with math modes configuration. There's
still things to do, like moving math mode names,
and perhaps depending on default user options to
provide a bit more convenience, but that will be the
next step.
Change-Id: I1259a93651920f44104f2f5135e3e620c858be8d
Additionally - remove RestbaseInterface::checkBackend.
When HTTP requests are banned from unit tests this method
makes no sence.
MathoidCli tests were not reenabled cause it's a bit hard
to mock shell acceess. Hopefully as part of Shellbox
transition we can have MockShell trait in core and reenable
those tests
Bug: T265628
Depends-On: I350ed59af603a0504704af3265787a4be8f2dc2a
Change-Id: I294d0ed905193850dc38cb3071eb9b31c8863121