User::setOption() is deprecated and should be replaced with UserOptionsManager::setOption()
Bug: T277818
Change-Id: I7395a8620064dcbe019b92feba17d9c9996ffbb7
Also move the maintenane script to a name that makes
MediaWiki.Files.ClassMatchesFilename.NotMatch not error,
and use the more restrictive licence tag usage for
MediaWiki.Commenting.LicenseComment.InvalidLicenseTag.
Change-Id: Ifa5518cd590ae83c6fd76f1dbb5a2ce40de4b119
Principal code is in includes/*.php with the file named the same as the class it
contains. The maintenance script is moved to maintenance/ for clarity.
Change-Id: Icb4cdffb1bd4716e14f883d667def96671b42992
'grunt build' builds modules/ve/test/index.php, demos/ve/index.php
and .docs/eg-iframe.html from the associated *.template files.
Got rid of the JS-based SVG/PNG switching logic. Instead, we now
just use SVG unconditionally. We'd already dropped browser support
for browsers that don't support SVG anyway.
Change-Id: Iba2e68f17904687cb13e793a410e095f28f1b13c
* Split files according to ve / ve-mw paths
* Split messages according to msgs-ve / msgs-ve-mw
* Update dependencies accordingly
* Remove ve-mw/ hack in makeStaticLoader.php, no longer needed
Bug: 45342
Change-Id: I6cb89606c307e27e237a1e9b56b94dfdcd310f41
VisualEditor.php:
* Make jquery.i18n a dependency of ext.visualEditor.standalone
makeStaticLoader.php:
* Remove ve.init.platform.addMessages() call with PHP-generated messages
* Add fake module for jquery.i18n
** Needed because the module might come from MW core
** Also add special treatment for fallbacks.js and language scripts
ve.init.sa.Platform.js:
* Remove basic message system, replace with jquery.i18n
* Add initialize method that loads messages for current language and
fallbacks
ve.init.sa.Target.js:
* Wait for the platform to initialize before actually doing things
* Add .setup() method to allow callers to short-circuit this process
** This is convenient for callers of ve.init.sa.Target in the test suite
ve.ce.test.js:
* Use existing ve.test.utils function for creating a surface
ve.test.utils.js:
* Call .setup() on the target so we can get a surface synchronously
ve.init.Platform.test.js:
* Make these tests async, wait for the platform to initialize
* Allow for missing messages to be output either as <foo> (MW)
or foo (jquery.i18n)
* Get rid of message clearing code, namespace test messages instead
Change-Id: Iac7dfd327eadf9b503a61510574d35d748faac92
* Don't add ext.visualEditor.base to it, and strip of ve-mw stuff
** .base doesn't contain ve-mw stuff any more, so no stripping needed
** Instead of appending .base, just load .base and create a
separate fake module for Standalone init.
* Don't manually register .sa files
** Instead use ext.visualEditor.standalone, it's right there.
** Add missing CSS file to .standalone.
* Documented the purpose of 'Dependencies' and removed scripts
from that fake module that don't fall under that rationale and
instead add them as regular modules (rangy, unicodejs).
* Removed weird 'jquery' dependency in 'ext.visualEditor.core'
module. This is strongly recommended against, and might
actually cause jQuery to be reloaded due to outstanding bugs
in core with the state machine in the startup queue (jquery, mediawiki).
* Unlist unused 'jquery.client' dependency in makeStaticLoader.
As per the module definitions in VisualEditor.php, this is
only used by the .mediawiki module. Grepped modules/ve/ and
found 0 uses.
* Update dependency order to roughly match the dependency tree
as it is specified in ResourceLoader (e.g. rangy is for .core,
not .base).
* Keep fake modules out of ResourceLoader.
Change-Id: I2a31543e5ad2fc39f5980fea855172108eda4428
* Move and rename generic parts of ve.ui to OO.ui
* We now have a UI test suite because ve.Element (outside ve.ui)
is now part of oojs-ui, so it needs a test suite.
* Added to the MW test run (just like we do for unicodejs).
* Updated csslint config (also added ve-mw and syntaxhighlight
which were missing).
oojs-ui still depends on the TriggerRegistry in VE, this is addressed
in a follow-up commit.
Change-Id: Iec147155c1ddf20b73a4d15d87b8742207032312
Math, hiero, language and alienextension are now each in their own
module. Kept the experimental module for backwards compatibility,
it just has all of its constituent modules as dependencies.
MWExperimentalTool.js was split up, and ExperimentalTool.js was
renamed to LanguageInspectorTool.js.
Change-Id: I63b49dfbdb59dc9a494049553cc0c01e89e48826
Objective:
* Make makeStaticLoader.php compatible with ResourceLoader module
definitions that use a string instead of an array with a single element
when describing a single file
Changes:
maintenance/makeStaticLoader.php
* Cast styles, scripts and debugScripts to array when iterating over them
Change-Id: Ib91daba732c2035145c479467a0b6b9ca3155659
This was broken after 92c38ea removed ve-mw files from the
static loaders but didn't update makeStaticLoader.php so
it was harder to keep the files in sync and a few minor issues
on the documentation pages.
Since the files are still mixed in the non-mw modules the only
way to exclude them is to do what was manually done in 92c38ea:
Filter out paths starting with "ve-mw/" from non-mw modules.
Change-Id: Id58ee89ac18c63c01719dc11ec7a07ddeee3ea0b
unicodejs.graphemebreak.js
* New file: singleton class with splitClusters method
* On load, builds graphemeBreakRegexp from unicodejs.graphemebreakproperties.js
unicodejs.js
* Remove old splitClusters method (was just a placeholder)
* Change "conjunction" -> "disjunction", for consistency and correctness
unicodejs.textstring.js
* Use new splitClusters method
modules/ve/ve.js
* Use new splitClusters method
unicodejs.wordbreak.text.js
* Add new splitClusters test
* Refactor charRangeArrayRegexp test to use splitClusters
PHP files
* add unicodejs.graphemebreak.js, unicodejs.graphemebreakproperties.js
.docs/categories.json
* add unicodeJS.wordbreak class
Change-Id: I8f512e2fc2c46eb4b5f00994a8dac88f3c8f7dd2
unicodejs.js:
* charRangeArrayRegexp to write surrogate-aware regexps
* private helper functions
unicodejs.wordbreak.test.js:
* test charRangeArrayRegexp
* corrected tests for non-BMP wordbreaks
unicodejs.wordbreak.js:
* use new surrogate-aware regexps
unicodejs.wordbreakproperties.js:
* generated from Unicode data
unicodejs.graphemebreakproperties.js:
* generated from Unicode data
unicodejs.wordbreak.groups.js:
* delete as no longer used
unicodejs-properties.py:
* generate unicodejs.wordbreakproperties.js from Unicode data
* generate unicodejs.graphemebreakproperties.js from Unicode data
index.php:
* update script tag links
/VisualEditor.php:
* update script tag links
/demos/ve/index.php:
* update script tag links
/maintenance/makeStaticLoader.php:
* update script tag links
Change-Id: I39c0386a85b0cf21d68d3385b84018a5d7648de5
Follows-up 2e76271 and 231a50f which made manual changes to
the static-loading files without updating makeStaticLoader
(thus causing the load order and if-statement to be out of
sync between different index.php files).
Updating makeStaticLoader to include those changes and applying
it to the other index.php file.
Change-Id: I9bbe97d85f663b1cffeb384d52b5cc54e2f6601b
We previously tried Rangy 1.3 alpha but rolled back due to a bug
with getting cursor position in IE. Rangy developer Tim Down fixed
the issue here:
https://code.google.com/p/rangy/source/detail?r=780
Both 1.2 (filenames without file versions) and 1.3 in the repo
for now.
Change-Id: I26263fc1d10e3c2bdda7f1c9135544ca3bc05d97
Takes a path as input, reads it in and replaces the
"Generated by" sections and writes it back to disk.
:
Change-Id: Idd68032ba5b621958a353582ea994acd0c4cfbd3
Currently when running this maintenance script it outputs
the full path to the i18n file. This was done that way because
of .docs/generate.sh (which pipes it to php through stdin).
This however means that currently the output is not suitable
for pasting into demo and test index files (as the path should
be relative for those).
The --fixdir option will function as toggle between a fixed
path to the directory on disk, or a dynamic resolution at
run-time. The default is the latter. generate.sh passes --fixdir.
Change-Id: Idebca553587aaff9b31255d884461f4a51e70afd
Depencency tree looked like this
* ext.visualEditor.viewPageTarget
- ve.init.platform
- ve.init.target
** ext.visualEditor.core
- (most ve.* classes)
*** ext.visualEditor.base
- ve.js
Some of the ve classes are calling ve.msg from the global scope
at load time (e.g. in the definition of static properties or in
constructors of classes that were immediately instantiated in
the same file).
Platform needs to be initialised in the base module.
ve.init.Platform.js was already there, but that's just an
abstract base class. The the ve.init.platform property is set
from the implementation classes' files.
Updated makeStaticLoader.php and re-ran for test and demo html.
The fake "Standalone Init" module is now gone, which shows that
this was needed as test/ and demo/ already put their platform
code in/after the 'ext.visualEditor.base' module in the html.
Bug: 45175
Change-Id: I47d7d92495974572194700c98a219d22ecbfaf4b
When running from Jenkins, we publish only the docs/ directory.
So the live previews are failing as there is no ../modules to be
found.
This will allow Jenkins to instead pass a different --ve-path.
Also, needed to fix the eval in PHP to not use vePath directly.
The vePath is the path for the web browser to the module directory
not for the server-side.
On the server-side we can just use __DIR__ as maintenance/
is always next to /modules and /VisualEditor.i18n.php.
Change-Id: I02101454a1977938bf861425db2141bdb446725b
Initially just with a Wordbreak module to implement Unicode standard
on 'Default Word Boundaries'. Due to it's standaloneability this has
been written as a separate library. Non-BMP characters are currently
not supported.
Bug: 44085
Change-Id: Ieafa070076f4c36855684f6bc179667e28af2c25
Layouts
* Makes widget inherit from element
* Adds layout which also inherits from element
* Adds grid and panel layouts
* Uses grid layout in meta dialog
Other changes
* Corrects issues with several of the stand-alone files by fixing and using makeStaticLoader.php
Change-Id: I6b92c0204e176c914c26eff8c03ea417578e080c
Refactored the (previously unused) eg-iframe file to be a
template with 2 placeholders for script and styles.
The previous version was just the basic version to execute
javascript code, but that's not good enough since we need a
whole bunch of classes to be loaded.
A bash file processes the template into proper html, with the
help of the makeStaticLoader maintenance script we already had.
Updated demo.css, cleaned up redundant properties restyled
slightly to be more like the Vector skin and less "raw".
Fixed default $IP path in makeStaticLoader.php to work with simple mediawiki core installs having the extension in the
regular extensions directory, and prefixed __DIR__ so it
doesn't rely on the directory you call it from.
Change-Id: Ic789121dfeca08d9db69564d2ad2e52b3fa45de9
Although $.toJSON optimises heavily for modern browsers (it
becomes a direct reference to JSON.stringify), we still load the
extra plugin.
JSON is specified as part of ECMAScript 5, but most browsers
supported this one before they supported the rest of ES5.
http://caniuse.com/#search=JSON
Cut off for native JSON is IE7, Firefox 3.0 (3.6 supports it) and
Safari 3. Not any of our concern as VE will most likely never
support those (certainly not at this point in time, and less
likely as time goes on).
Change-Id: I4e8f26ac94763fa38d29e41264de0247f53a21e5
* Fix 404 error for ve.ui.Icons-{raster,vector}.css
Follows-up 9563f08 / I840f72426f9a.
makeStaticLoader.php:
* Clean up old code.
* Error out early for missing module.
* Put i18n stuff in the right place
(some modules access ve.msg from the global scope to
assign status variables, for standalone on demos this was
failing due to wrong load order)
Change-Id: Idbff4c5136d567da747d9ae373cd2f6c3ee7fb1c
* CenterNode missing in ResourceLoader registry
* UI classes and rangy not in static test/index.html
* Transaction and TransactionProcessor listed twice
Added a maintenance script that generates the <script> and <link> tags for all
files in the same order everywhere.
Change-Id: I5d22d33769b4e356e8065d295505f6f9a8b0bea8