Commit graph

104 commits

Author SHA1 Message Date
Kaldari 4fc52b7ba3 Make sure enhanced editing toolbar is loaded before adding button
Bug: T169943
Change-Id: Id8828b0d49ecec5124430d15445739d73795d164
2017-07-10 14:16:36 -07:00
Ed Sanders 91397eb556 Ensure CM surface can't be edited in VE mode
CM surface is just for presentation, it shouldn't
be possible to focus or select anything in the surface,
so in addition to it being beneath the VE surface,
disable it through the CM API and disable pointer-events
with CSS.

Bug: T170170
Change-Id: Ief49c293f514e22bc6db5eebb3a11c1bc695432d
2017-07-10 18:02:22 +00:00
jenkins-bot f28f5adccc Merge "Rewrite VE<->CM synchronizer using transaction op walking" 2017-07-08 00:44:20 +00:00
Ed Sanders 6364cb4c04 Rewrite VE<->CM synchronizer using transaction op walking
Previous hacky method fell apart with multi-line transactions.

Depends-On: I465a3f6a8afcd6536293999eb40c01daeb9d905b
Depends-On: I800085eb3a5f7332eab356b62a34bfc603a29839
Change-Id: I66946d7e3f425d8dbbdae720756a7978fbe25582
2017-07-07 23:33:10 +00:00
Ed Sanders 40cc5449b3 Update BetaFeatures icon, use new template and cleanup slightly
Change-Id: I29b596aef4a203d0b5e5bad5616d3a52284e147b
2017-07-07 16:20:16 -07:00
jenkins-bot 21d4ae4042 Merge "Design fixes for Codemirror" 2017-07-07 18:13:07 +00:00
Niharika29 e8fa11ec94 Design fixes for Codemirror
Bug: T165178
Change-Id: If5b7c0807ff6fcdb30e1b8fe935b53ee0ca46a0d
2017-07-06 15:03:09 -07:00
jenkins-bot bc96cb80db Merge "Make sure popup appears for both classic and wikitext editors" 2017-07-06 17:38:51 +00:00
Kaldari 712b5466c8 Fixing SVG images for buttons
Older versions of MediaWiki apparently require SVGs to begin with
an XML declaration.

Change-Id: I149c3b2d0ecdc4d0cdfc4f793483c5c89f35b8fb
2017-07-06 08:10:10 +00:00
Niharika29 5dd4386821 CodeMirror fixes for beta feature deployment
Change-Id: Ib7c7ebaed4f8b1643bc4de506de8f2b443d33fa3
2017-07-06 00:12:06 +00:00
Niharika29 55092521c3 Make sure popup appears for both classic and wikitext editors
Bug: T165003
Change-Id: I4b1c9498df7931643ea3c39d6d2afd9384e47de0
2017-07-04 00:15:56 +00:00
Niharika29 a1b41c6099 Fixes for Codemirror popup patch
Bug: T165003
Change-Id: I52e3cdb3afde242451e9cab68baecc1ab77868dc
2017-06-30 18:43:50 +00:00
Niharika29 99e31d152f Show a popup for first time Codemirror users
Bug: T165003
Change-Id: I545a57bdb273ab6906711e2d65dc029293ecc02a
2017-06-29 00:20:14 +00:00
niharika29 48358c1f57 Add syntax highlight as a beta feature
Bug: T165543
Change-Id: If7eb2dc3f7c00a91e5ca39ae564f63efa07bbead
2017-06-20 05:07:53 +00:00
jenkins-bot a9cd58f25e Merge "Replace CodeMirror icons with new icons (#36C)" 2017-05-20 16:13:08 +00:00
Pavel Astakhov 8ff5f6afee Replace CodeMirror icons with new icons (#36C)
Bug: T164441
Change-Id: I2e185dfa468ede51bd1a0e41b3b4dcf43a74313c
2017-05-14 23:44:17 +06:00
Pavel Astakhov 0cdf013c73 Take out gray background behind list bullets in syntax highlighting
Bug: T165001
Change-Id: Iec64336881ee38938739cab76a3090542b1ff973
2017-05-11 12:10:15 +06:00
Ed Sanders 59aed7d2e2 build: Update eslint to 0.4.0 and make a pass
Change-Id: I580e7a2ed7276dc3b9546b497ecf2f8f4efe1aa6
2017-05-08 16:54:10 +01:00
Ed Sanders de6b08919b Use consistent label for button across editors
Change-Id: I1a299522e95cdb4a6e5bdbdda1c65d4fcec22133
2017-05-08 16:54:10 +01:00
Ed Sanders 7b01a98ad0 VisualEditor source mode support
Long-term todo:
* Performance will be poor on large pages due
  to using a auto-height textarea which CodeMirror
  doesn't optimise.

Change-Id: I16598fcdbeee51e6fae88376ec81f1c8552b383d
2017-05-08 16:54:10 +01:00
Pavel Astakhov c9b4aa65fd Refactor the Integration with other extensions (v 4.0.0)
This patch makes initialization easier and cheaper.

Since only the PhpTags extension uses the CodeMirrorGetAdditionalResources
  hook it was removed. Instead, the CodeMirrorPluginModules and
  CodeMirrorTagModes properties are used in extension.json file.

This patch adds ext.CodeMirror.lib.mode.php module for the PhpTags
  extension (with dependences). In CodeMirror there are a lot of modes
  they will be registered on request (if they will be requered for
  extensions).

Examples of integration:
* Cite: I1bf156fa813af4d5f891619f692047bbdb8a1a86
* PhpTags: Ie339f0475e63885e603defaee2cdcccd6a95fafc

Bug: T163238
Change-Id: Idb7a1a5769a1047ef2f7cd25a7152f73a6613225
2017-05-04 21:20:21 +01:00
jenkins-bot 8f8a68f056 Merge "wikiEditorToolbarEnabled: Rewrite if block as statement" 2017-04-27 01:45:49 +00:00
jenkins-bot 0f22c06b9c Merge "Swap the enable/disable labels" 2017-04-26 17:19:25 +00:00
Pavel Astakhov 3954552b43 Swap the enable/disable labels
Bug: T163916
Change-Id: Ie868556fe31ea4aae976e94526cc96bb79803626
2017-04-26 22:48:13 +06:00
Pavel Astakhov 6ce71b3667 Add additional classes cm-mw-ext-{tag name} to extensions tags
They can be used to create specific color themes (T163533)
See also bug T161694

Change-Id: I499e1e4b2e1e4fa972e28fc05a65047ecadc204c
2017-04-23 13:51:24 +06:00
jenkins-bot 1c7bac5c17 Merge "Syntax highlighting: Switch extension tags to green" 2017-04-21 18:34:38 +00:00
Ed Sanders 9205f900bd wikiEditorToolbarEnabled: Rewrite if block as statement
Change-Id: I516a8e8f1bf53dc784a2ab3ff49bd20b172dc6e8
2017-04-20 23:31:58 +01:00
Kaldari 14eea32e44 CSS hack for ext.wikiEditor module no longer needed
Change I7c7c3ba49 fixed the underlying bug.

Change-Id: Ida8a5dbd4e3602484f723d43bfa562389565e9d4
2017-04-20 13:59:42 -07:00
Pavel Astakhov e3ca35adf5 Syntax highlighting: Switch extension tags to green
Bug: T161694
Change-Id: I1817cd151ac253998f0381126a60960106db3848
2017-04-20 23:45:11 +06:00
Pavel Astakhov b7bc84d783 Remove some outdated code
Since WikiEditor uses wikiEditor-toolbar-doneInitialSections event
  we don't need to add it to ResourceLoader dependencies.

Bug: T161475
Change-Id: I7c7c3ba495c0292d2df052145e7930c86fcb48f5
2017-04-18 14:07:51 +06:00
niharika29 2fb08d548f Swap parser function and assessment template colors
Bug: T162206
Change-Id: I2d8705a8ec44c668aebc4728cd84e0953cd497a1
2017-04-17 20:01:33 +00:00
jenkins-bot 36d0cf9fea Merge "Add some extra spacing around H1s and H2s" 2017-04-06 00:14:16 +00:00
Pavel Astakhov 6be1fbc134 Add some extra spacing around H1s and H2s
Bug: T161559
Change-Id: I0d10d39313c11fddefadff7ab13c262bd6606ed0
2017-04-05 11:18:12 +06:00
Pavel Astakhov cf07be26b3 Take out the blue highlight for cursor location
Bug: T162204
Change-Id: I6aca0103a2603bf37ff856a7dd6f2aa4137ee53c
2017-04-05 10:50:42 +06:00
Reedy c4e0cf86d4 Fix some indenting
Change-Id: I6bb9a8875d053ddac564d6d74ad34c8c9b0332ae
2017-04-04 01:15:09 +01:00
Ed Sanders 02c22f53ff Styling fixes
* Move CSS out of mediawiki.css which is for wikitext
  highlighting rules.
* Account for wikieditor-ui adding wrappers even when
  disabled.

Change-Id: I0fca693a6771ee1d790800c9afd5c7091fda20c1
2017-03-27 14:02:25 +01:00
Pavel Astakhov 29fa173331 Fix CodeMirror state when initializing
Before CodeMirror was enabled every time (ignoring user settings)
since switchCodeMirror was called in initialisation and some others bugs...

Change-Id: I418c64000e05dbfac62f5bb2327cfe7ed74efb17
2017-03-27 14:23:21 +06:00
Ed Sanders 3980fa0af0 Cleanup and use SVG icons
Change-Id: Idcad8e2554c5e44155c88bd925186095e3aad930
2017-03-27 02:59:13 +00:00
jenkins-bot 47b8f19d8e Merge "Switching fixes" 2017-03-27 02:54:23 +00:00
jenkins-bot 1512e38c4e Merge "Only give code mirror focus for specific commands" 2017-03-27 02:54:23 +00:00
jenkins-bot eaac96c5e1 Merge "Update CodeMirror to 5.25.0" 2017-03-22 21:57:42 +00:00
Ed Sanders 806527d8a1 Switching fixes
* Fix state toggle in WikiEditor
* Update options API code
* Fix font-size and line-height so text doesn't move
* Append to WikiEditor after loading so it appends in
  correct part of DOM.
* Only add border in classic editor

Change-Id: I5e80298030633d4859d01a92b6c61ef1fa969e96
2017-03-22 11:48:41 +00:00
Ed Sanders 53c64371dd Only give code mirror focus for specific commands
Previously focus was being called even for getContents, causing the
editor to instantly steal focus from the edit summary input (!!).

Change-Id: I5a14850d90a7c5605026e1fac192585ee62b4615
2017-03-22 11:48:41 +00:00
Ed Sanders 66ba217ba2 build: Replace jshint/jscs with eslint, introduce stylelint
Change-Id: I9b5afb39f5a0d32e722b2a1f56c219b8c85b451c
2017-03-21 16:45:56 +00:00
Ed Sanders 75ca882e38 Update CodeMirror to 5.25.0
Change-Id: I47680ba98e1ab39360608aa7a923e7fee7db615e
2017-03-21 15:05:52 +00:00
Pavel Astakhov faf7246cd4 Update CodeMirror library to version 5.16.0
Change-Id: Iae9df045d0e897e03b3edcb935188731e019811f
2016-07-19 17:05:52 +06:00
Pavel Astakhov 339e677bee Remove usage of mod function
Change-Id: Id84d85318ef498b4aa8fcbe073b8bc8a8c8c7ed7
2016-07-19 16:31:35 +06:00
Paladox 45ebd2d55d Update Jenkins tests
Test jshint and jscs through npm using latest version of jscs and jshint.

Add support for composer.json running phplint and in the future php code
sniffer.

Change-Id: Id8f11f9414fae8313dc18a857a07e11694354dcb
2016-03-03 13:29:48 +00:00
Legoktm bf5da5eec5 Revert "Compress PNGs with zopflipng"
This reverts commit a64a74ce7d.

Change-Id: Ifc03d61aabc711bde030f3e013669edc8f07a6b2
2016-02-27 23:32:49 +00:00
Ori Livneh a64a74ce7d Compress PNGs with zopflipng
Zopfli is the most efficient DEFLATE compression algorithm, trading run-time
performance for file sizes that are typically 3-8% smaller than those produced
by zlib with the maximum compression setting. Its output is Deflate-compatible,
so no specialized decoder is needed.

This change was created by running zopflipng against all the PNG files in this
repository. The exact invocation was:

  git ls-files --exclude-per-directory=.gitignore -- '*.png' \|
    parallel zopflipng -m -y {} {} \;

Files which zopflipng was not able to compress more efficiently were left unmodified.

Bug: T127608
Change-Id: I765f876aa2cf863479f93912efe387160b4ef348
2016-02-21 00:59:49 +00:00