Commit graph

237 commits

Author SHA1 Message Date
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
jenkins-bot 25302e1be3 Merge "Add <translate> as a permitted tag" 2018-03-09 21:59:26 +00:00
Ed Sanders 1dc74c66fe Avoid using bold with VE+CodeMirror
We can't guarantee the preserve glyph width, e.g.
on Firefox with Chinese characters.

Bug: T184467
Change-Id: I6fc92fcd034bda3d9a94749935aae03c8373f7c5
2018-03-07 19:56:51 +00:00
jenkins-bot c2e1f91c7d Merge "VE: Use different approach for transparent text issue" 2018-03-06 16:35:15 +00:00
MusikAnimal 980f3d2848 Add <translate> as a permitted tag
Bug: T172456
Change-Id: I2315053b79bfd2dd009a98c0fe824ccdbcaf431c
2018-03-05 15:01:45 -05:00
Ed Sanders 06af670325 VE: Use different approach for transparent text issue
Deferring the insertions can lead to sync issues, so use
a different technique to selective refresh the CodeMirror
view when the height changes.

This reverts commit 8e3d96f75f.

Bug: T188473
Bug: T185184
Change-Id: I502501cc0325db64f29a67716306733859d102a9
2018-02-28 12:38:44 +00:00
Ed Sanders 9c59f7ede5 Remove unused mode files
We currently only provide modules for
* wikitext
* css
* javascript
* xml
* htmlmixed
* clike
* php

Change-Id: If47827f61043bd2c474ec160af56f651b3cf3af0
2018-02-28 12:24:30 +00:00
Ed Sanders 48e37ce2fc Remove themes, keymaps and addons
We don't support these

Change-Id: Ib237e5b885b8a7ac9fdba36efb1c666c8cbb2619
2018-02-28 12:24:13 +00:00
Ed Sanders 2614d071ad Update CodeMirror to 5.35.0
Change-Id: I4da7497600189b6c87c9fcb829f7876c98bf4929
2018-02-28 12:14:29 +00:00
Ed Sanders cc611f4254 TextSelection: Make chainable methods chainable
Bug: T188119
Change-Id: I40030e1cbd3bc77a0db424d38cd61815deac2e12
2018-02-26 11:47:43 +00:00
jenkins-bot b0ee15034a Merge "VE: Match whitespace rendering of ve.ce.TextNode" 2018-02-25 22:40:46 +00:00
jenkins-bot 348949d15b Merge "Defer update of CM surface to avoid invisible text" 2018-02-25 20:58:45 +00:00
Ed Sanders 8e3d96f75f Defer update of CM surface to avoid invisible text
Bug: T185184
Change-Id: I0b115d892ab322911c895dda030b77f35cc9195a
2018-02-25 18:05:19 +00:00
Ed Sanders 8b27277b20 VE: Refresh rendering after surfaceReady
Bug: T188215
Change-Id: I4c53f554d8091aa71ce59fe04857b588209639d3
2018-02-25 17:58:32 +00:00
Ed Sanders 452d6d0a80 VE: Match whitespace rendering of ve.ce.TextNode
Bug: T187694
Change-Id: Ie27e9862e0f55fcc10af91a2bdd9c5d21d49ddc4
2018-02-19 10:43:53 +00:00
Ed Sanders 3e0d9773d4 textSelection: Replace encapsulateSelection with replaceSelection
encapsulateSelection is now defined in terms of other methods,
so we don't need to duplicate it here.

Follows on from T185917.

Change-Id: I1f99b3140ed363658ed2724a58c8b34ef20769fa
2018-02-09 10:31:47 +00:00
Ed Sanders b05b537744 Simplify textSelection overrides using 'register' and 'unregister'
Also add support for .textSelection() on the .CodeMirror element.

Change-Id: I46ac070ca141c3c2f993bee6ab898c96cb1edd4f
2018-01-30 06:38:50 +00:00
Ed Sanders e795883f0d NWE: Fix padding in Vector
Bug: T185299
Change-Id: Iea8e61654608259ddc90286aef59014a37e4f44d
2018-01-19 10:13:53 +00:00
jenkins-bot 6a2d427a9b Merge "Make NWE integration background transparent" 2018-01-04 16:30:52 +00:00
jenkins-bot f3f82ae47a Merge "Fix WikiEditor dependencies" 2018-01-04 16:30:22 +00:00
Ed Sanders 8d998f97ed Make NWE integration background transparent
Allows for VE's placeholder text feature to work.

Change-Id: Ieee01baf3dc049f248a97408af70499dcea8f4c9
2018-01-04 12:37:42 +00:00
Ed Sanders 12d420b7e9 Fix WikiEditor dependencies
Change-Id: Ibaa17e581ada5fcb202217797e70f9fed2510ec4
2018-01-04 12:36:55 +00:00
Ed Sanders 9df6ec9df8 Expect that deprecated mediawiki.toolbar may not be available
Bug: T177098
Change-Id: Icaf51c234981b4572362a0d76bf0b4b6653f3854
2018-01-04 12:35:36 +00:00
Ed Sanders 9960ed601f Remove font-size now it is set by editfont
Bug: T180678
Change-Id: Ic9e8bdb3b34dbb2f2c5748d6bb57e9da90112118
2017-12-21 12:21:57 +00:00