Commit graph

121 commits

Author SHA1 Message Date
Ed Sanders 149e5db0a0 Fix ContextItem documentation
* Be more specific about the type of context which a
  context item belongs to.
* Make grammar clearer.

Change-Id: I6f7abc777c378be2f1ac3f8db678363664d46ccd
2023-07-10 14:33:51 +01:00
Umherirrender 4e08e000e0 build: Updating npm dependencies
* eslint-config-wikimedia: 0.22.1 → 0.24.0

Resolve newly detected error:
* mediawiki/no-nodelist-unsupported-methods

Change-Id: If43479e88a3d39f507541f3f6b53f23004bd0e1e
2023-03-29 21:24:34 +00:00
Umherirrender 83a00d41f8 build: Remove unneeded inline stylelint-disable-next-line
modules/ve-math/ve.ce.MWLatexNode.css
 6:59  ✖  Needless disable for "media-feature-name-no-vendor-prefix"
--report-needless-disables

Change-Id: Icb4738d7435cb7cc744a3d82b5e8130111f9b567
2023-03-22 21:57:19 +01: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
jenkins-bot 4fde31757c Merge "Improve use of gadgets for LatexDialog" 2022-09-30 17:29:05 +00: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
Ed Sanders fe5b350c89 Add \neg to "Logic" section
Bug: T317065
Change-Id: I261768fdddebcf0dd8776b69286edd1b541f0c5b
2022-09-07 00:40:01 +01: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 94d6b81d2f tests: Use ve.test.utils.newMwEnvironment()
Depends-On: Ib20c1f5277c5d5a99f5117c82b7cbdeab75d3279
Change-Id: Id551b4c8ae3a857f1318d4b7f5e5518c889bc9d2
2022-03-04 13:52:59 +00:00
Ed Sanders a5e976baee build: Update eslint-config-wikimedia to 0.21.0
Change-Id: Ia97b44767e31fe1c2d075e3627c7f7bea0845751
2021-11-15 16:27:57 +00:00
Ed Sanders 1091cf6458 Move var declarations inline
Change-Id: Ib550a7443daea339d3e40f3ff1d9c0febf5159f8
2021-10-05 17:04:47 +01:00
Volker E 0bd9089692 styles: Remove obsolete -moz- vendor prefixed rules
Bug: T278670
Change-Id: If785ee709db742de7790fc4febe9fe89451c8924
2021-09-14 04:22:48 -07:00
physikerwelt (Moritz Schubotz) be9d701825
Add JS unit test
Add a first test to check that the testing framework is functional.

Bug: T288074
Change-Id: If4a6d14f14d7b964db31781b3caf23eb383c06c1
2021-08-05 09:54:10 +02:00
libraryupgrader 79a7324eed build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 34.0.0 → 35.0.0
  The following sniffs are failing and were disabled:
  * MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate
  * MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationProtected
  * MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPublic
  * MediaWiki.Commenting.PropertyDocumentation.WrongStyle

* mediawiki/minus-x: 1.1.0 → 1.1.1

npm:
* eslint-config-wikimedia: 0.17.0 → 0.18.1
  The following rules are failing and were disabled:
  * no-useless-escape

Additional changes:
* Added the "composer phan" command to conveniently run phan.

Change-Id: I1c641a4945f94337ca22763920601400ee9ab691
2021-02-06 12:19:19 +00:00
Umherirrender f2cb640687 Avoid shadowed variables in javascript
Change-Id: I4d7148c46c04447a7aba5ce96379ce9038be5752
2020-09-19 18:19:08 +00:00
Ed Sanders 74561b1db6 Fix script to exclude duplicate classes and regenerate math symbols
Change-Id: Iac62e385f54f3f75812c31ab4792d88cb5f31331
2020-06-16 16:01:27 +01:00
Ed Sanders e489beac5b build: Update eslint-config-wikimedia to 0.16.1
Change-Id: I9c2de727e1a4c7657ccca4dd22a175bfad06a852
2020-06-16 15:59:33 +01:00
Ed Sanders e9bd09f2b3 build: Update linters
Change-Id: I9fc31886e09a0dc0a77449907054136a61eda248
2019-11-01 16:33:18 -07:00
Ed Sanders 15352b3751 build: Update eslint-config-wikimedia
Change-Id: I0d650a842da003693275ecee565cf923dc2605d6
2019-10-04 15:38:36 +01:00
Ed Sanders 085ee7dcec build: Update linters
Change-Id: I0d6b323864a0e24f72ec6a823611927ea66ce025
2019-09-17 14:46:05 +01:00
Volker E 09b8a0830c Use renamed OOUI icon 'labFlask'
Change-Id: I1c6ffd18f97e6a0e95f9e8e88842743caf887fe8
2019-09-11 13:36:37 -07:00
Ed Sanders 3927e65c61 makeSvgsAndCss.js: Add more logging and an '--all' flag
Change-Id: Iaa00e52e04800d0708f8dfc715b8cf6228e7f469
2019-08-30 20:17:11 +01:00
Ed Sanders 44b88c6e77 Re-render MWChemSymbols.css
Bug: T166936
Change-Id: Ie711e3715e6a8aef7e00e7f120d2d39b9511d0fc
2019-08-30 19:35:11 +01:00
Ed Sanders 1ce95efb54 Show latex source in context items
Change-Id: I32af1c13c31dc0f94434daa4a4db8c94a7033582
2019-07-31 22:55:03 +01: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 5f7f535c28 Update eslint-config-wikimedia to 0.9.0
Change-Id: I4c7dcb1b3cd3d03e3ea3d1e17bfcf63f3b553e50
2018-11-30 21:08:28 +00:00
jenkins-bot 9962f9d16c Merge "VE dialog: Reset scroll offsets on teardown" 2018-11-15 23:51:40 +00:00
Ed Sanders 3986634d8a Remove obsolete aliases from closures
Bug: T208951
Change-Id: Ia4b1a813c9eb8c24db42ded937d40feea539f9c5
2018-11-12 17:08:20 +00:00
Ed Sanders c4e0340e46 VE dialog: Reset scroll offsets on teardown
Change-Id: Ieb252188948249c992a7e43117781f5fdf159d5b
2018-11-12 16:15:00 +00:00
Debenben 19d97c4377 remove problematic texvc from VE suggestions
The patch removes the following texvc macros conflicting with generic LaTeX syntax from the autocomplete suggestions of the visual formula editor:
* \and
* \or
* \pagecolor
* \part
* \ang
* \C
* \H
* \bold
* \Bbb
and replaces the following commands with the LaTeX equivalents in the visual formula editors math dialogue
* \and -> \land
* \or -> \lor
according to https://www.mediawiki.org/w/index.php?title=Extension:Math/Roadmap&oldid=2808288

Bug: T197842
Change-Id: Id3a085dc0a7551b582a9a0a759a838411d1ecf71
2018-06-21 05:15:09 +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
Ed Sanders 9b2ba59ac9 Move icons to RL image module and generate variants
Bug: T196050
Change-Id: Ie6acbeac3d74b99278b8d5b0db3ca1d349065d5e
2018-06-02 21:56:49 +01:00
Moritz Schubotz (physikerwelt) ffcfdf488e
Autocomplete LaTeX commands with backslash
Insert required backslash to LaTeX commands.
This should help to avoid that users ommit the backslash for LaTeX commands unintentionally.

Change-Id: I970cec2cb597815cc4272ed573ac1a2ee2682e55
2018-04-24 20:17:21 +02: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 6d042da104 Redraw icons to fit 20x20 canvas better
Change-Id: I1222cbcb1e78ded144f1ac1e6376bfebb32be3c7
2018-03-22 15:34:55 +00:00
Bartosz Dziewoński e04e5ee28a Update icons for new 20px grid
Set viewBox to "2 2 20 20" to trim 2px off each side of our
existing 24px icons, therefore aligning them to the new 20px
grid. All of them had been drawn with large margins, so none
of the graphic is lost.

Bug: T177432
Bug: T190151
Change-Id: Ifaa8c27450cde7ed25d4429bd8aba25bcba3bfcc
2018-03-20 18:56:16 +01: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
jenkins-bot bdc65a3f3a Merge "Remove redundant multiline option" 2017-07-18 19:23:38 +00:00
Ed Sanders 24a024ee8e build: Upgrade grunt-eslint from 19.0.0 to 20.0.0, and other linters
Change-Id: I4a8b9ece024164053e69a2a8f6fbd6406737d373
2017-07-18 13:04:49 +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
Thiemo Mättig 1ac3ab619e More strict regular expressions for CSS parsing
Having greedy .* matchers in these regular expressions is quite scary,
and a possible source of hard to track errors. For example, a string
like "height:8px;left:3ex" will make these regular expressions succeed,
even if they shouldn't. The substring "8px;left;3" will be fetched, and
most probably turned into something unexpected like "8ex" for the
calculations below.

Change-Id: Ia6753a58802fb3f3c5df4d2b35a6d8e616835f20
2017-07-11 07:33:34 +00:00
jenkins-bot 9d840da775 Merge "Add a few symbols to the math dialog menu" 2017-06-09 15:23:45 +00:00
Ed Sanders 742afcdb8b Specify iconWhenInvisible for math/chem nodes
Bug: T166526
Change-Id: I42703d15fa7e491d85d01899c706dbca4e5816b6
2017-06-07 22:41:16 +01:00
Thalia 5d222caaa8 Add a few symbols to the math dialog menu
Change-Id: Id9fdbde64957af149784bb16ac225e3896bb9b8d
2017-06-05 19:00:54 +01:00