Commit graph

27 commits

Author SHA1 Message Date
Steph Toyofuku 17ac038ae4 Invert mathematical formulas in visual editor
Add the skin-invert class to latex symbols (insert chemical formula and
math formula dialogues) so that they appear legible in night mode.  This
is likely the only way we can accomplish this until mathml is fully
rolled out, at which I believe this will no longer be necessary

Bug: T366737
Change-Id: Ia0dfa4ab684f5205d109da7f9aefad927be70eb0
2024-06-25 14:30:30 -07:00
Ed Sanders be3a23977a Convert more functions to arrow callbacks
Change-Id: I1701519c96731a84a3e8a16507944f3cf39d4e87
2024-06-07 15:27:20 +01:00
Ed Sanders 28dcf9e6eb Remove unnecessary local context variables
Change-Id: I662e6e5e11dbf814755792ff64dc51aac77b7d6d
2024-06-07 15:25:35 +01:00
Ed Sanders 39c15f76f9 build: Update eslint-config-wikimedia to 0.28.0 and autofix
Change-Id: I02045047af1f392ae6d6f08e422024b0e9386ccf
2024-06-07 15:24:08 +01:00
jenkins-bot edd3bce363 Merge "VE: Remove date from @copyright line" 2024-03-20 13:19:04 +00:00
Ed Sanders 8d6ad58768 Use new SymbolListBookletLayout instead of MWLatexPage
Depends-On: I357595ae490b36bcf5dd477a95c5684f3a246753
Bug: T120512
Change-Id: Ifbfb8e9d20c12d1ad8c347bb56a54d9e4eaf236f
2024-03-19 18:46:58 +00:00
Ed Sanders 8aedf53e00 VE: Remove date from @copyright line
Change-Id: I37b42640123f861eff8ae23b289c3714bee308a4
2024-03-19 18:37:26 +00:00
libraryupgrader f382be8562 build: Updating npm dependencies
npm:
* eslint-config-wikimedia: 0.25.1 → 0.26.0
* grunt-banana-checker: 0.11.0 → 0.11.1
* wdio-mediawiki: 2.1.0 → 2.5.0
* get-func-name: 2.0.0 → 2.0.2
  * https://github.com/advisories/GHSA-4q6p-r6v2-jvc5
* postcss: 8.4.30 → 8.4.35
  * https://github.com/advisories/GHSA-7fh5-64p2-3v2j

Change-Id: I5b01fa01c11a57a180b50bf2f8b3275e69d75f1c
2024-02-13 20:44:49 +00:00
Bartosz Dziewoński 9207931f53 Simplify VE data modules using 'packageFiles'
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
2022-11-22 18:43:04 +01:00
Fwolz 409cc54217 Improve use of gadgets for LatexDialog
Add a mw.hook to enable gadget for T316816 reacting on opening the LatexDialog and
assign classes to ooui components to enable browser-JS manipulation.

Change-Id: Ib004c3e8b0926a0bd5febfaf4910bb4d9ed6bc58
2022-09-30 18:47:23 +02:00
Physikerwelt 63e19a8c69 Revert "Revert "Add wbEntitySelector widget to edit qid in VE""
This reverts commit 2dc6bcac48.

Reason for revert: Re-enable functionality with fix

Bug: T313143 
Change-Id: I7536ae187872b9c0a6abab18861499290ad621e0
2022-07-23 07:57:54 +00:00
Reedy 2dc6bcac48 Revert "Add wbEntitySelector widget to edit qid in VE"
This reverts commit 422be143f6.

Reason for revert: Caused hard dependancy on Wikibase

Bug: T313143
Change-Id: Ia6f551307f0fbaa2a3fc5747ed180e588c60b02f
2022-07-16 17:40:09 +00:00
Fwolz 422be143f6 Add wbEntitySelector widget to edit qid in VE
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
2022-07-06 12:13:28 +00:00
Fwolz 74bd7c4730 Add text field in VE to change QID
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
2022-06-01 12:27:43 +02:00
Ed Sanders 1091cf6458 Move var declarations inline
Change-Id: Ib550a7443daea339d3e40f3ff1d9c0febf5159f8
2021-10-05 17:04:47 +01:00
Ed Sanders e9bd09f2b3 build: Update linters
Change-Id: I9fc31886e09a0dc0a77449907054136a61eda248
2019-11-01 16:33:18 -07:00
Ed Sanders ba39eb0303 Use setReadOnly when possible
Change-Id: I410967531229ba31c985488fc73ec7e315ecfad6
2019-04-16 12:04:58 +01:00
Ed Sanders f22a61c000 Add support for read-only mode
Change-Id: Ibf8ab22ead2ceb80e39dcab50f4fc6c1ee0ae1f0
Depends-On: Iedd1bd9ce17750ad8528c1a053293c4a7321c5de
2019-02-19 14:58:41 +00:00
Volker E c131018ad1 Replace extension icons with standard OOUI icons
Replacing outdated 'chem' and 'math*' icons with standardized
OOUI icons from 'editing-advanced' pack.

Bug: T195480
Change-Id: Iefc02ca5c2f0c310fdc83fe26a17f7fcba5195b8
2019-01-23 23:48:02 +00:00
Ed Sanders c4e0340e46 VE dialog: Reset scroll offsets on teardown
Change-Id: Ieb252188948249c992a7e43117781f5fdf159d5b
2018-11-12 16:15:00 +00:00
James D. Forrester 0e47032839 MWLatexDialog: Fix hard-coded line height
This changed after the OOUI font-size change. Also reduce
the preview height which is measure in em's so that it is
closer to its original pixel value.

Also fix line height for error messages.

Change-Id: I3537d33dc1889e0154f4574bb33b22b3c006fe9c
2018-06-08 19:12:21 +01:00
Thiemo Kreuz 801888d34b Use short "@license MIT" according to SPDX
Note there is not even a LICENSE.txt in this code base.

Change-Id: I3dccd4187f4a20e3f040c812c5811298794d469a
2018-04-13 16:04:06 +02:00
Ed Sanders 271a149b5f getSelectedItem() -> findSelectedItem()
Change-Id: I6ddf1ab488774f22fd566846c38483dcaf35ab27
2018-01-17 13:49:06 +00:00
Ed Sanders 23054cfe5b Fix auto-height when CodeMirror not available
Change-Id: I0e88b12b0e67f471bac8ab767cdeca8ac7bafeec
2018-01-11 15:10:17 +01:00
Ed Sanders b923169efa Remove redundant multiline option
MWAceEditorWidget is now multiline by inheritance

Bug: T170275
Change-Id: I0efe1299ceb441c70d106e3b25514c0c0a7dfdce
2017-07-12 16:26:54 +01:00
Prateek Saxena ff8a903fa6 Use TabPanelLayout instead of the deprecated CardLayout
Bug: T164902
Change-Id: I979cb14b8430bf89ae9a453786bc4337ef82211d
2017-05-17 15:02:42 +05:30
Amire80 848d762e24 Add support for chemical formulae in VisualEditor
The chemical and mathematical formula inspectors and dialogs
have a lot of similar functionality, and the common parts are
now moved to the common MWLatex class.

MWMath* classes now inherit from MWLatex*, and so do
the new MWChem* classes.

Bug: T153365
Change-Id: I4452ceca55197fda5f1e1293a5741c6f5fb7c245
2017-02-19 18:36:26 +00:00