Commit graph

260 commits

Author SHA1 Message Date
Isarra 90ac9d3475 Remove Timeless VE styles, too many variables to do them properly here
Move this stuff to Timeless itself since we can just reuse the width cutoff
and padding variables directly there and don't need to worry about them
randomly changing.

Corresponding change: Ic64b9786cb7186dba3eb2042a3238149c3bb44c6

Bug: T230756
Change-Id: Ia7168341bcadbc60e307b58b67afc1975a2424f9
2019-08-20 20:26:45 +00:00
Derk-Jan Hartman d1a3e49265 Highlight match end tag with different capitalization
This recoginizes <ref></Ref>

Bug: T179321
Change-Id: Ib1e501f97654a019281eddd6cc69ea3b979daec7
2019-04-14 01:25:40 +02:00
jenkins-bot fc4d4b0c36 Merge "Do not load module 'ext.CodeMirror' when CodeEditor is active" 2019-03-20 21:31:03 +00:00
Fomafix f0757cb0dc Do not load module 'ext.CodeMirror' when CodeEditor is active
Change-Id: I8fd0de727f2ebb1bf9f23981438d6cafa962ad17
2019-03-20 21:01:35 +00:00
jenkins-bot d48a8caa0d Merge "Conditionally load CodeMirror lib" 2019-03-15 08:50:49 +00:00
Derk-Jan Hartman 758523b65f Conditionally load CodeMirror lib
Also remove two unneeded dependencies

Bug: T209824
Change-Id: I5b528bde346780ca5ae5d615c4ca0d617a6cd615
2019-03-14 23:31:18 +00:00
jenkins-bot 71a96af684 Merge "Make Special:JavaScriptTest pass on Webkit and on Firefox" 2019-03-12 10:32:28 +00:00
jenkins-bot f6c86b9867 Merge "build: Update eslint-config-wikimedia to 0.11.0" 2019-03-06 14:39:37 +00:00
jenkins-bot f048f45b50 Merge "Use 'wikiEditor-toolbar-doneInitialSections' as trigger" 2019-03-06 14:39:27 +00:00
Ed Sanders 37b49bfdc4 build: Update eslint-config-wikimedia to 0.11.0
Change-Id: I7ca5276791d9add0709387422016d7193e8d9945
2019-03-06 12:10:29 +00:00
Fomafix 9c04302f23 Use 'wikiEditor-toolbar-doneInitialSections' as trigger
Also refactor out single use functions and call enableCodeMirror
from within addCodeMirrorToWikiEditor.

Change-Id: I77d37ae401483e187fe0bc355d7173b57fbe454b
2019-03-06 12:09:28 +00:00
jenkins-bot 8a1e8552f3 Merge "Wait for DOM ready before querying DOM" 2019-03-06 11:59:14 +00:00
Fomafix 4181729151 Wait for DOM ready before querying DOM
This avoids a race condition on loading.

Change-Id: I31c01f9c2b2025b4a46d5afc6ada5044f750eff7
2019-02-25 21:55:31 +01:00
Fomafix ebd382f004 Make Special:JavaScriptTest pass on Webkit and on Firefox
CodeMirror inserts

 style="padding-right: 0.1px;"

only on Webkit.

The test case now strips this pattern from the rendered HTML before
comparing with the expected test case output.

Change-Id: I34b201f790d3d85a5f51d8200bf8219f11d14506
2019-02-25 08:14:58 +01:00
Fomafix 5161c6abe9 Make Special:JavaScriptTest pass with and without extension Cite
Change-Id: Ib3bae7968c7d1eb0d5f862f0410f016f47abcd15
2019-02-25 08:10:32 +01:00
Ed Sanders 7604581cc1 Remove obsolete aliases from closures
Bug: T208951
Change-Id: I64c2966b7c41d6b2b1911e2fb52e4c7364bf7964
2018-11-12 13:19:41 +00:00
James D. Forrester 8ac2d11b1b Drop support for MediaWiki core's removed "2006 wikitext editor"
Change-Id: Ib8d104ddf104cfeeee1fc7a055293a03fe8e2d3d
2018-10-25 14:06:59 -07:00
Bartosz Dziewoński 079d240a2c ve.ui.CodeMirror: Fix padding to match VisualEditor's padding
VisualEditor's default padding for the source editing surface was
changed in Icdc6f1e2a7544ebbd828f85ff370113a0e06983a (June 2018).

Since then the alignment of editing surface and CodeMirror syntax
highlighting surface was broken in skins that don't override the
default padding (basically every skin except Vector and MonoBook).
Unfortunately Vector and MonoBook happen to be the only skins we
officially support and actually test, so the issue went unnoticed.

Bug: T205154
Bug: T205658
Change-Id: Ic85a6c20b266f6b93ab8ec9c2d35acff679f31bc
2018-09-27 22:06:00 +02:00
Ed Sanders ef8c62c74b Use renamed ve.visibleWhitespaceCharacters
Change-Id: I246079505d4c37406b3f99ca17b7e8e926adaec5
2018-09-24 16:34:54 +01:00
jenkins-bot 7dd9688663 Merge "build: Update linters" 2018-09-13 12:27:47 +00:00
Ed Sanders 1be09a9a1d build: Update linters
Change-Id: I8d3aaf0b7d453033b72e5d6622b8f54df2c86bca
2018-09-12 00:03:19 +01:00
Derk-Jan Hartman d5124e2920 Make use of new WikiEditor 2010 toggle tool
Bug: T198781
Depends-On: I8b7fd41571a48fa4f6560790d94bb966972e740f
Change-Id: Id275142c0d50ca6a133129eebeee8cfc5c1ca99a
2018-07-25 01:12:28 +02:00
Derk-Jan Hartman 4ebe54a588 Focus before setting the cursor/selection
Bug: T197263
Change-Id: If5efed656746e3e40fcda118e487cdcb00e0114a
2018-06-26 21:55:09 +00:00
jenkins-bot 7fa197b2dc Merge "Accessibility: mark syntaxhighlight button as a switch" 2018-06-18 16:04:35 +00:00
Derk-Jan Hartman 42e3dc7cdb Accessibility: mark syntaxhighlight button as a switch
* Protect from setActive not being defined on the old toolbar button
* Use role is switch on the button, since WE only supports simple
buttons
* Add the checked attribute to reflect state of the toggle button

Bug: T196512
Bug: T197534
Change-Id: I48dfef1740f124105f65859ce4f51098f1157fd0
2018-06-18 15:53:37 +00:00
jenkins-bot 579611ff5e Merge "Accessibility: Disable both directions of tabbing in CodeMirror" 2018-06-18 03:41:25 +00:00
Derk-Jan Hartman 736c63fd0b Accessibility: Disable both directions of tabbing in CodeMirror
Bug: T197534
Change-Id: Ia05c3ccbdb4baa8e701bf46478c42d2473777535
2018-06-17 19:24:14 +02:00
Max Semenik 63647bb5dc Remove all BetaFeatures support
Bug: T185030
Change-Id: I1ad451acfd163c783e7b8ec604d8695c14342667
2018-06-13 16:42:40 -07:00
Max Semenik f973652942 Disable ULS when CodeMirror is on
Bug: T194102
Change-Id: I25894d98a28e2c6096796ab912cc0ee04dd0a6e3
2018-05-30 13:07:07 -07:00
Ed Sanders 341a67496a Simplify target lookup
Change-Id: I00449f043c391c7648e2c17651d15c2807044402
2018-05-12 13:10:05 +01:00
Ed Sanders fca1d62a6c Apply line height selector to CodeMirror line wrapper
Bug: T193219
Change-Id: I7973b5e1a4f602c0fc371d78a1ebead093c48e74
2018-04-27 21:42:45 +01:00
jenkins-bot d3c7f3cdd4 Merge "Use CM API for setting document direction" 2018-04-25 18:36:32 +00:00
jenkins-bot 466fca0ec0 Merge "Load CodeMirror with VE always" 2018-04-25 16:04:39 +00:00
Niharika Kohli 7c848abd8d Load CodeMirror with VE always
This patch makes Codemirror on VE independent of the beta feature,
making it always load.

This is a first step to graduating CodeMirror out of beta.

Bug: T191923
Change-Id: Ide794e8f986d3f0455ff282819c71d9144dd75db
2018-04-23 20:54:43 +00:00
jenkins-bot 6e2bdac5d2 Merge "Remove 'Try syntax highlighting' popup for all users" 2018-04-18 21:02:25 +00:00
Ed Sanders dcf28f37a1 Use CM API for setting document direction
Bug: T191923
Change-Id: I68ee7de8ff2d26044fc8a71a04ade65b5d4420c8
2018-04-16 16:53:29 +01:00
Ed Sanders d428893b80 Merge selectors for VE & CM surfaces, and add 'hyphens' rule
Keep all our font rule settings in one place to make it
easier to keep them in sync. Also add a rule for 'hyphens' in
case the browser default has changed.

Bug: T192019
Change-Id: I2c27e5075a9bc6aaed9fe048d163f57976708357
2018-04-16 16:43:35 +01:00
MusikAnimal 7d99bbefde Remove 'Try syntax highlighting' popup for all users
A Node script was used to remove the now unused i18n messages.
This same script sorts the messages alphabetically, so it looks
like some unrelated messages were changed, but they weren't.

Bug: T191297
Change-Id: I69cce06133c1d055d31d12ebc8408123c187b574
2018-04-12 18:22:31 -04:00
jenkins-bot 6d9bc58727 Merge "Fix some small edge cases with font matching" 2018-04-12 16:12:00 +00:00
jenkins-bot fb20072a4a Merge "Unbreak VE integration in IE11" 2018-04-02 15:58:24 +00:00
jenkins-bot 6772e087e5 Merge "Tests for MediaWiki CodeMirror syntax highlighting" 2018-03-29 23:17:39 +00:00
Ed Sanders c09151d659 Fix some small edge cases with font matching
Change-Id: I6e2df8e13f19a29a3a80fbbfc0ed5332c33eb584
2018-03-27 22:35:00 +01:00
Ed Sanders 4f2ace3ad9 Unbreak VE integration in IE11
Element.remove is not supported in IE11 so use
parentNode.removeChild.

Change-Id: Iacfdc2fb563d5ed168dc691ecf439e60e94d4e2a
2018-03-27 21:46:00 +01:00
Ed Sanders 6d92dd818d Use upstream OOUI icons for WikiEditor toolbar
Also uses upstream tool-active styling, which was
based on cm-on.svg.

Depends-On: I3e6f65f6f290778d3fbfa22f5d212c26fee12a86
Change-Id: Ib42be9f8b87efe1387eb5c77698fd2f0af0a673d
2018-03-23 13:43:30 +00:00
MusikAnimal 4d2783eb3e Tests for MediaWiki CodeMirror syntax highlighting
Bug: T169592
Change-Id: I0750d3a320af5451f847e6062f82523fb18f12bc
2018-03-20 16:27:55 -04:00
jenkins-bot 0e4bb8feb6 Merge "Don't match // as protocol unless used in a link" 2018-03-15 23:51:21 +00:00
MusikAnimal 5c8eb20c33 Don't match // as protocol unless used in a link
Bug: https://phabricator.wikimedia.org/T185069
Change-Id: I2111e7c7ae599c5aed2f5ae779bc3d7b2d8ce82a
2018-03-13 22:51:35 -04:00
MusikAnimal ccbce0e69d Highlight void tags and invalid self-closing tags correctly
Bug: T170238
Change-Id: Ice1bdae3d16cf365da14c6df0e8d91d2b914e074
2018-03-13 22:18:59 -04:00
jenkins-bot b7a201e2f0 Merge "Fix highlighting of table headers on single text row" 2018-03-13 22:39:01 +00:00
MusikAnimal 62a53c5905 Fix highlighting of table headers on single text row
Bug: https://phabricator.wikimedia.org/T179534
Change-Id: I6e353d52af849678da63624e456ec2a82c680df4
2018-03-13 18:23:16 -04:00