Commit graph

256 commits

Author SHA1 Message Date
jenkins-bot a406f9eae3 Merge "Add special page and API endpoint that show information from math Wikibase items" 2019-11-15 12:45:34 +00:00
Moritz Schubotz (physikerwelt) 4a7bc3ee31 Add special page and API endpoint that show information from math Wikibase items
Add a special page and an API endpoint to fetch data from Wikibase
items with a given qID. The special page summarizes information from
Wikibase. The API endpoint allows to request the information
directly. Both, the API endpoint and the special page, fetch the data
from a new helper class for consistency.

Bug: T208758
Bug: T229939
Change-Id: Idd22057a88312bf1a1cb5546d0a6edca5678d80d
2019-11-14 23:42:35 +09: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
James D. Forrester 0eac1464c4 build: Upgrade eslint-config-wikimedia from 0.10.0 to 0.11.0
Change-Id: Ia1dc32374abf4756b2d2333aa087a28b6b282ebd
2019-04-03 15:29:36 -07: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 94335db392 build: Update eslint-config-wikimedia to 0.10.0
Change-Id: Iec4ea5f8e74ad6f73232b01bdca3b19d93e36dfb
2019-01-08 23:17:15 +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
James D. Forrester 428f5a847b Drop support for MediaWiki core's removed "2006 wikitext editor"
Change-Id: I59bad8faee3f0f998344f985eb675087533d3d8f
2018-11-06 17:19:43 -08: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
Moritz Schubotz d8822169ab
Mathoid CLI interface
Renders formulae via mathoid without to run mathoid as a service.
Mathoid 0.7.1 or later must be installed locally and configured to be
accessed directly from the math extension. It has been tested with the
config.dev.yaml of version 0.7.1. If mathoid is installed in
'/srv/mathoid' the following line might be added to LocalSettings.php
$wgMathoidCli = ['/srv/mathoid/cli.js', '-c', '/srv/mathoid/config.dev.yaml'];
i.e., make sure to specify the -c parameter with an absolute path.
In addition mathoid uses more memory than the the default. With
the config.dev.yaml a value of
$wgMaxShellMemory = 2097152;
has been tested to work well.

Change-Id: I0600f056d21927963267cf979d342e313419e9fa
2018-02-21 20:29:20 +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 407bfc4f3b Limit overflow-x rule to block elements
The overflow-x rule has no effect on inline elements
anyway, as documented in T134281, and it confuses
logic in VE for computing highlights.

Bug: T167438
Change-Id: Ifb9e503386c2e0bb101265310767ca9d00ad0c44
2017-06-08 17:26:32 +01: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
Prateek Saxena ff8a903fa6 Use TabPanelLayout instead of the deprecated CardLayout
Bug: T164902
Change-Id: I979cb14b8430bf89ae9a453786bc4337ef82211d
2017-05-17 15:02:42 +05:30
Ed Sanders 3189409b7c Remove separate stylelint config for VE
Change-Id: I2698ef817a27a783f19b73c2780ba7410640a2b8
2017-04-28 17:37:45 +01:00
James D. Forrester 5a6626fcce stylelint: Drop unsupported no-unsupported-browser-features reference
Change-Id: I0f0098ddb299167e94079e068f2cc2a8f3e0262e
2017-04-10 13:12:54 -07:00
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
jenkins-bot 74be597efb Merge "build: Bump stylelint and make pass" 2017-02-18 00:13:01 +00:00
James D. Forrester 6a6c68b387 build: Bump stylelint and make pass
grunt-stylelint              0.6.0  →   0.7.0
 stylelint-config-wikimedia   0.3.0  →   0.4.1

Change-Id: Id87b8df04d415e1f1058a4042a31408236402037
2017-02-17 15:30:18 -08:00
James D. Forrester 4a06cdf728 Follow-up 75db3ed9: Also fall back to symbol.insert in MWMathPage
Bug: T157751
Change-Id: Ia0d40c70f52f41eb07dcbe121437379419b861b3
2017-02-09 17:47:27 -08:00
Ed Sanders 75db3ed9fe Math symbols: Remove 'tex' when identical to 'insert'
Change-Id: I3e9abc923eb686a60b9ae5359d8b823acc863f31
2017-02-09 19:22:47 +00:00
jenkins-bot cb190d507d Merge "Add scrollbars to displaystyle formulae" 2017-01-17 18:51:13 +00:00
Amire80 48a5a0a7e8 Split ve.ui.MWMathPage.css from ve.ui.MWMathDialog.css
There are separate JS files for them, so the CSS should be separate, too.

This is a part of the refactoring that is required for bug T153365.

Change-Id: Iadbe5eeccff25ed1d184658945a4eb52e465d863
2017-01-11 19:44:31 -08:00
jenkins-bot f8ceb1d495 Merge "Add word list to math dialog for autocompletion" 2017-01-11 23:57:20 +00:00
Thalia 06f6af78dc Add word list to math dialog for autocompletion
Bug: T155107
Change-Id: I57bbf9d9a75810cd06b9ba43a173f9bf4a74c9fc
2017-01-11 14:44:16 -08:00
Ed Sanders edd166cfa3 Create chemistry icon for upcoming VE chemistry support
Bug: T153365
Change-Id: Ieaf5708932cfc91de6c293fd752dd64b8a73c73d
2017-01-11 14:28:31 -08:00