Commit Graph

198 Commits

Author SHA1 Message Date
James D. Forrester fda31a802f build: Fix stylelint devDependencies
Bug: T142235
Change-Id: I45021b2cd1decdc4cd9a9e9908d132cc1f6d795b
2016-08-05 11:59:39 -07:00
Ed Sanders 7938545a7c Use transition timing from OOUI theme config
Depends-On: I00eaa2b815d7c76b6315a3993a9a7921ae503c00
Change-Id: Iddd99171137a7457d0c3084c396453575a1e7231
2016-07-12 13:29:15 +01:00
Moritz Schubotz 2fc8fa6ccd Fix: Update png fallback
In Ifdd75ce51076b098af67a96b5dcb0fc0726d2b00
I missed to update the png fallback mechanism
given the fact that SVG is now a <img element
as well and no longer a <meta tag.

Bug: T136905
Change-Id: If1b4fb11cfb50eab98f847674fdbef2cd0e43e37
2016-06-03 10:10:06 +02:00
Moritz Schubotz 349d7cfc16 Use img instead of meta tags for SVGs
* replace meta tag with img tag
* remove js workaround for IE

Bug: T136709
Change-Id: Ifdd75ce51076b098af67a96b5dcb0fc0726d2b00
2016-06-02 12:12:32 +02:00
James D. Forrester 9b6f6c7300 Follow-up 3f456b1: Fix typo in function call
Bug: T132736
Change-Id: I36862baf287efe275d5b5fdc3bef911b7815a762
2016-05-26 09:22:33 -07:00
Frédéric Wang be7be3becb Remove woff fonts
1) Because enabling native MathML now requires special configuration steps
  from the users, they can as well just check their math font setup. Hence we
  remove the Web font fallback.
2) We then can actually just remove ext.math.desktop.css since no specific
  style is necessary any more on desktop.
3) We also no longer need to add the Web font to the list of font-family on
  the <math> element. We actually just remove the whole font-family rule so
  that it is up to web engines developers & users to decide the best math font
  to use (e.g. via the "Fonts for mathematics" option in the font preference
  menu of Firefox).

Change-Id: I1818d288b0f28715a460e3163590e4d0374c42b4
2016-05-23 14:52:59 +00:00
Ed Sanders e2139b1657 build: Introduce stylelint to lint for css errors
Also update the rest of the CI world whilst we're at it.

Change-Id: Iaad2867797cccb2dd0df7758e448b553859fa62c
2016-05-19 19:16:00 +01:00
Frédéric Wang d808880450 Remove some obsolete CSS rules that are no longer needed in Firefox ESR 45:
- Use the non-math font Cambria first (fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=598900).
- Set line-height to normal (fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=1187673).

Change-Id: I19836285e08c2996d611a47361bbb5f9e9eb6921
2016-04-25 16:28:11 +00:00
Moritz Schubotz f071dbcf80 Remove Firefox specific CSS styles
The Firefox specific CSS changes require a special
setup of math fonts on the system. To avoid problems
OS dependent behavior, this browser specific modifications
are removed from the ext.math.css file.
There are a couple of places, where people can overwrite
their CSS rules individually.

For example from version 1.8 the plugin 
cf. de1eec2f0d
Note that this change will make things worse for users
that chose the MathML rendering option and managed to
configure their font setup right.

Change-Id: I5a376904a01a46634eea2160e02736df74cd0b5f
2016-04-24 20:32:28 +00:00
jenkins-bot 950c0596ca Merge "Make short mode for the math dialog" 2016-04-19 19:22:23 +00:00
Thalia a5e6d22495 Make short mode for the math dialog
When the math dialog's menuLayout height is below 450 px,
make the symbol menu and the preview element shorter, so
the input is still in view. (This works until about
280px, below which the user will need to scroll down to
use the input.

Bug: T121150
Change-Id: I9e41cce80c3f770b1e3d0e7b133470045a1afe67
2016-04-19 19:50:17 +01:00
physikerwelt 0b17471332 Use img element to display SVGs in new IEs
InternetExplorer versions that do support SVG images
have problems rendering  these in meta tags.
Replacing meta tags with img elements resolves the problem.

Bug: T132491
Change-Id: I353e911a8e2066c10d8df583cae88861a8623816
2016-04-19 17:16:50 +00:00
jenkins-bot 86f359ec30 Merge "Add inverse of texToClass function in comment" 2016-04-12 15:29:34 +00:00
jenkins-bot e00af78d9a Merge "Use new executeCommand method" 2016-04-12 15:20:29 +00:00
Ed Sanders 4010978ebf Add inverse of texToClass function in comment
Change-Id: Iba9658cfb8f413eaff8cdd62b6b7b2d836c5b23d
2016-04-12 15:01:04 +01:00
Ed Sanders dba01a653e CSS code style: spaces inside parentheses
Change-Id: Ia1324fe4ee98b487b82d01ee0d9cffe284a64811
2016-04-12 14:57:27 +01:00
Ed Sanders 3f456b1931 Use new executeCommand method
Change-Id: I24afd6c94c3224a3ae1f86204ddc16c726833c7c
2016-04-12 14:56:45 +01:00
Ed Sanders 617e0ccd53 Remove icon properties from windows
Windows stopped supporting icons a while ago.

Change-Id: I7a3fba6aef39b761f8eac9ed0f639ed18b1c4e65
2016-03-29 12:34:56 +01:00
Ed Sanders 481138a73d Remove SVGO compression, now done upstream in Mathoid
Change-Id: I961eb82722ae161bdf7a3ea945c299244ce321fb
Depends-On: I86c1a14ad81d2d252ac73da973274f88153d993c
2016-03-23 10:52:10 +00:00
Ed Sanders 49fc247004 Use the mathoidStyle property instead of parsing the SVG
This attribute was added in Ia0f601c1d5. Use it instead of
extracting the information from the SVG.

Change-Id: Ib6d6f4c9480ae00ccb2977b57c7b93de8ebb03f2
2016-03-22 14:46:48 +00:00
Ed Sanders 2b9bce4a0b makeSvgsAndCss: Add missing semi-colons to CSS, tweak symbol alignment formula
Sub-pixel alignment errors are unavoidable as the browser will rasterise
the SVG then round percentage offsets to the pixel grid.

Change-Id: I704db755d49be189db9670594e2ae2f193e6052d
2016-02-02 19:03:01 +00:00
Ed Sanders fd6f963504 makeSvgsAndCss: Increase max connections
This was set low to avoid issues with local servers, but the new default
server (wmflabs.org) can handle a higher value, and the script runs
much faster.

Change-Id: I69b06c59fc03c4c4b15619e8dff7bfc904dba96f
2016-02-02 12:49:32 +00:00
Thalia 2b9e3307ac Add option to adjust SVG baseline on math dialog buttons
If a symbol has "backgroundPosition" set to true, adjust
its vertical position in the button, according to the
vertical-align property on the SVG, by adding a
background-position property on its CSS rule.

Also set "backgroundPosition" to true for a number of
symbols and generate a new CSS file.

Bug: T123397
Change-Id: Ic9bbb65d2bedf38f569d8922599a2e3d2575f153
2016-02-01 18:07:13 +00:00
jenkins-bot e736202170 Merge "Resize math dialog input to fit the available space" 2016-01-25 15:12:44 +00:00
Thalia 150e658dc3 Correct \mathit button in math dialog
Change-Id: Ida4d82a9b859234e84a93ac34549076be9c42c46
2016-01-24 11:48:23 +00:00
Thalia 79eeb24bc0 Resize math dialog input to fit the available space
Every time the math dialog is resized, calculate the
vertical space available to the input and resize the
input to fill this space.

Bug: T123891
Depends-On: Ia2e094071f385628449f1935f0250cbeb75196f0
Change-Id: I3f3c915469f282a6e0459a7e4d10e19bee68b8db
2016-01-23 11:08:48 +00:00
Thalia a3a76811d2 Use more generic host and port for updating the math menu
Change-Id: Iaa079b8037d3c73cfc8a283aa3f7c7926feb328b
2016-01-13 20:04:14 +00:00
Thalia f62b625c21 Small corrections to the math dialog menu
Remove some duplicated symbols and correct some typos

Change-Id: I41e98a7b80554f3332e9abff33b9d12701a5d855
2016-01-11 18:18:42 +00:00
physikerwelt c085e6952b Fix link to PNG fallback for IE 8 and older
Change-Id: Iffb65af756a8fc53fcc9f484c783f69f8d908690
2016-01-06 22:16:21 +00:00
jenkins-bot 2499ea5236 Merge "VE: Rename parent tool" 2016-01-04 20:50:58 +00:00
jenkins-bot 867ad7f91a Merge "Allow users to choose math inspector or math dialog" 2016-01-04 17:10:42 +00:00
Ed Sanders ee3e0855f1 VE: Rename parent tool
Depends on I3a0e761f0 in core.

Change-Id: I7c6e5f2bd20e7875efc0ee60e329cdf081b64bd5
2016-01-04 17:07:51 +00:00
Thalia 5fe280c3cf Allow users to choose math inspector or math dialog
The context item for math nodes now has two edit buttons,
one for the inspector (edit inline) and one for the dialog
(edit). Creating a new math node automatically opens the
dialog.

Bug: T120382
Change-Id: Icd3ec75262fcc5e0cbc304051c651278b0d8b01c
2016-01-04 08:20:16 +00:00
jenkins-bot e04098facf Merge "Force Ace Editor to resize after the dialog has been rendered" 2015-12-20 12:57:58 +00:00
Thalia ac1ce967c1 Force Ace Editor to resize after the dialog has been rendered
If the editor resizes first, the height is 0px.

Depends on: I48307bd9184b

Bug: T121164
Change-Id: Ieb4ed963b03c9e7d802e9547478eb3c9cde512ae
2015-12-20 12:51:57 +00:00
Ed Sanders abb5573424 VE MWMathDialog: Fix documentation
Change-Id: Ic362df855ba616d2d2b3e0ccd4cebd3befd4ab94
2015-12-19 17:37:13 +00:00
Thalia 4087a1cec0 Focus the math dialog input after the symbols promise has returned
Bug: T119778
Change-Id: Ia5afe667241543addbda95d4d284b8af63f693a1
2015-12-08 13:26:34 +00:00
Thalia 3f193f6745 Make math dialog menu content scrollable
Also make input widget height respond to its contents. These two
changes address the problems of overlapping when the screen
height is limited.

Bug: T119900
Change-Id: Ie21c141673a9343d05da05cdbd2eaa96efff0a58
2015-12-03 16:25:00 +00:00
Thalia dfbce3f5ce Focus input and move cursor to end when MathDialog opens
Change-Id: Ie963913723b8c5f8ffb32701477627387c77eb85
2015-11-25 14:43:41 -08:00
Thalia bd36680d21 Ensure the formula preview in MathDialog is vertically centered
The formula preview is not centered when the display attribute
is set to block. Correct this by enforcing display: inline-block
when the math image is inside the preview element.

Bug: T119670
Change-Id: I77d9b213a31d3005212c8c11874112ddb64aa74a
2015-11-25 14:22:49 -08:00
Thalia a48a216171 Modify updateMwData in MathDialog to update display and id attributes
Also populate the options form with pre-existing values and add event
handlers.

Bug: T119663
Change-Id: I32fbecdb9b204fa33e309662f1f670942968fee7
2015-11-25 14:22:21 -08:00
Thalia 959d0d7b3a Set autocomplete options for math dialog input
Depends on I57db44c876c in ve-mw

Bug: T119549
Change-Id: I80193b7b662336c65b81556eb000f3895cddf49f
2015-11-24 18:54:48 -08:00
Thalia 6e73aaf86c Make math dialog with clickable list of formula fragments
The main components are:
- a menu of formula fragment buttons
- an ace editor text input into which LaTeX commands are
inserted on clicking the buttons
- a preview of the formula

The deviations from the draft design (full-width menu,
smaller buttons, dialog is 'larger' instead of 'large')
are so that more buttons can be seen at once.

Depends on Ia0f46da2d4 in ve-mw
Depends on Ib75fb7b087 in ve-mw
Depends on I758f90abb9 in ve-mw
Depends on Ibcd941d938 in CodeEditor
Depends on Ie814f59086 in oojs-ui
Depends on If540670bf2 in oojs-ui
Depends on I5f70f133b7 in ve core

Bug: T114163
Bug: T118617
Bug: T118618
Change-Id: I96d4b72f2e49ad3f43a2e5c71f0d348fdfb35503
2015-11-23 16:30:38 -08:00
Ed Sanders e4719c56a7 SVG/CSS generator: Ignore duplicates and 'notWorking' buttons
Change-Id: I5f0c9fc62a1e434576550e142d6b25f329e63e7f
2015-11-20 18:03:06 -08:00
Ed Sanders cbc847222e SVG/CSS generator: Make faster by skipping already-fetched icons
Also keep the CSS file in alphabetical order so additions make
for clean diffs. (The async built file had a pseudo-random order)

Change-Id: Iad76ef36c90f42ba3232f135b05465408f42b2ba
2015-11-20 17:32:03 -08:00
Ed Sanders a682d9677f VE: Correct name of script in header
Change-Id: I4a76d72dcb22a5ebeb02f6c0b6946c1ef4744185
2015-11-18 20:16:13 -08:00
Thalia eac71ab60f Add tool to create SVG files of LaTeX symbols
Also produces a CSS file for the symbol buttons, using the
SVG filenames. Gets the list of symbols from symbols.json.

Bug: T118660
Change-Id: Iaa792418d870a7e266b6455ef037994e31278278
2015-11-19 04:11:59 +00:00
jenkins-bot fabdb488b5 Merge "VE: Register sequence with CommandHelp" 2015-11-05 15:36:46 +00:00
Ed Sanders 17168f573b VE: Register sequence with CommandHelp
Depends on I65e2bfc2 in VE-MW

Change-Id: I8f71b1b242cb5c273c6d4a16bdfef6bf1e0adb55
2015-11-05 10:12:38 +00:00
physikerwelt 6b30663057 Move Math specific CSS from core to extension
Bug: T110492
Change-Id: I3775980916de12aef23bac85c38a6f92253aa479
2015-11-03 18:49:19 +00:00