Bartosz Dziewoński
d23ffa17cb
Update VisualEditor styles for Vector changes
...
Bug: T252471
Change-Id: I6ba64f2deaa27172842ee5f71363708758324aff
2020-05-12 00:42:03 +02:00
Ed Sanders
4d53bcbe09
VE: Don't load CodeMirror code until tool is activated
...
This saves about 300k uncompressed / 80k compressed whenever VE loads!
Change-Id: I7cf1c35292c2ea48cc15ceb4c22d4473a25484e9
2020-03-19 20:23:24 +00:00
Fomafix
6075e4cb83
Enable spellchecking on Firefox
...
The spellchecking was disabled for Firefox on non-Mac systems because
Firefox had a bug and inserts characters (like B) into the content when
enter an access key combination (like Shift+Alt+B).
Firefox 65 fixed the problem by changing the default for
dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content
from false to true.
The old behavior can activated in about:config by setting
dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content = false
This change reverts 29f6b48eeb
.
Bug: T177509
Change-Id: I23773b2ea2a154269a5b3064cd8d9e9132051c38
2020-02-29 22:54:43 +01:00
AronDemian
d0418ae8bb
Don't let CodeMirror set the font to monospace if it's set on an ancestor.
...
Bug: T245568
Change-Id: I135bf0f7bf73e0d9faaa43c565cef43c5c934a34
2020-02-29 18:01:27 +00:00
AronDemian
d70bd9d1ae
Unify monospace font stack. Avoid potential sizing bug caused by weird browser behavior with font-family: monospace;
...
Problem: browsers implicitly and unexpectedly set the font-size to something around 13px with `font-family: monospace;`, but not with `font-family: monospace,monospace;`.
See: http://code.iamkate.com/html-and-css/fixing-browsers-broken-monospace-font-handling/
Bug: T176636
Change-Id: Ied24a0cde7db4a6092d2cd7a6207d0a361424c3f
Related: T245568
Related: T245476
2020-02-28 04:44:07 +00:00
Derk-Jan Hartman
006d4ba9d8
Add comment to make usage of jquery.ui module discoverable
...
Change-Id: I79a54686024b22e2851bd396bb51101ca84626fa
2020-02-25 22:44:34 +00:00
Fomafix
b17c8b7557
Move check for 'usebetatoolbar' from JS to PHP
...
This change avoids useless loading of the module 'ext.CodeMirror'.
Change-Id: I2637487b72c028d272748f2891239401412f77b5
2020-02-23 20:50:17 +00:00
AronDemian
f0e689d203
Remove the unnecessary 1.5em padding in MinervaNeue skin that misaligns highlights.
...
Bug: T245532
Bug: T245568
Change-Id: Ib29678eb38ebb5a5d2975a087e55b2ddd2a4b35d
Related: I135bf0f7bf73e0d9faaa43c565cef43c5c934a34 - T245476
2020-02-19 15:00:43 +01:00
Bartosz Dziewoński
5a1501d46f
VE: Update padding to match VisualEditor changes
...
See Ib7ffbf09d5aa23fddb894aa3b081ec993ddcee2d.
Bug: T238678
Change-Id: Ia9d38599e76b63147318c6604dbd9b9fabf35b16
2019-12-13 14:54:03 +00:00
Ed Sanders
a134e66777
Don't replace whitespace characters in VE
...
Bug: T153434
Depends-On: Ic4a5ab803c89b3671f452579bca0da08b779bdfe
Change-Id: Ic3d848ff86cceceeeea9385bfc49ad2241e3801b
2019-11-14 22:30:32 +00:00
Ed Sanders
cf9885b586
Match tabSize to surface view CSS property
...
For browsers that don't support the property, assume
the default value of 8 is used.
Change-Id: Icb9a97fa79e08458bf717903f1d7b68e433e7904
2019-11-14 22:30:32 +00:00
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
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
jenkins-bot
4df91bb67a
Merge "Fix target detection for jquery.textSelection overrides"
2017-12-21 01:07:21 +00:00
Max Semenik
dee8f42080
Fix target detection for jquery.textSelection overrides
...
CM intercepted textSelection() globally but assumed
nobody will ever need to call it for anything but wpTexbox1.
Thus, attempts to get edit summary returned article text.
Lots of things can probably be fixed in this area, but here's
the beginning.
Bug: T177175
Bug: T179287
Depends-On: I113394a473e8fe534f17815676ec7014203db7d6
Change-Id: I72d7d72b2a891a0ad242a565dddc076fa6dd1bd1
2017-12-19 21:00:14 +00:00
jenkins-bot
d25705d804
Merge "Disable WebkitTextFillColor in Firefox+OSX"
2017-12-12 19:44:09 +00:00
Niharika Kohli
a6c9441490
Don't break codemirror if wikEdDiff is enabled, only if wikEd is enabled
...
Bug: T178348
Change-Id: If579d4da99f364e73dec5a7e6bed87019431386b
2017-12-05 19:15:12 +05:30
David Sn
62894aafff
Update comment text color CSS
...
This patch changes the comment text color
to #84A0A0, as suggested by Kaldari in T170067.
Bug: T170067
Change-Id: I016b8ce360a06f14b02cee13b629fa578c889347
2017-12-05 09:32:34 +00:00
jenkins-bot
daef8e333c
Merge "Unify BetaFeatures SVG screenshot markup"
2017-12-01 19:23:28 +00:00
Prateek Saxena
d0653940df
Unify BetaFeatures SVG screenshot markup
...
- sort attributes
- indentation
- remove unnecessary ids
Bug: T180427
Change-Id: I04d37d4c58aa3499af241dc434985a98a13f51ea
2017-12-01 18:52:17 +00:00
Ed Sanders
80241fb717
Disable WebkitTextFillColor in Firefox+OSX
...
Avoids opaque selection covering text.
Bug: T175223
Change-Id: Iede96501d4a03ccd80488b4661c18647eb9118e1
2017-11-30 18:05:52 +00:00
Ed Sanders
0296e2dcad
Fix typo in name of non-webkit hide class
...
Also increase opacity to 40% so selection & cursor
are more visible.
Change-Id: Ia957f816de9003eb8b709de3d7993bbfef99e3bc
2017-11-30 16:35:57 +00:00
jenkins-bot
530c2e3684
Merge "Remove eslint-disable-next-line no-use-before-define"
2017-11-29 19:04:25 +00:00
Fomafix
394a8b7183
Remove eslint-disable-next-line no-use-before-define
...
Since 7ac2322
this is not needed anymore.
Change-Id: I4cc5ea402286e418b30fd9ddba72c7ef434fbcb2
2017-11-25 23:07:57 +01:00
Prateek Saxena
e7154d0852
Update betafeatures icons' colors
...
Base80, Yellow90, Yellow50, Accent50
Old: https://phabricator.wikimedia.org/F10949243
New: https://phabricator.wikimedia.org/F10949242
Bug: T180427
Change-Id: Iebd9026b37bf63d66a3d0976302e09c4df59e81d
2017-11-23 10:36:04 +05:30
jenkins-bot
99b919f626
Merge "Execute codeMirror.save() on beforeunload"
2017-11-08 00:21:15 +00:00
jenkins-bot
5cd02ddca7
Merge "Moving code for adding the toolbar button to its own function"
2017-11-07 03:24:29 +00:00
jenkins-bot
d2855c76f4
Merge "Make textbox height flexible with CodeMirror"
2017-11-07 01:26:17 +00:00
Niharika Kohli
a0062e3100
Make textbox height flexible with CodeMirror
...
Bug: T170906
Bug: T176449 (hopefully)
Change-Id: Ic0ac663c413db5c29ae786d3c17f7396ad620226
2017-11-06 17:20:51 -08:00