Commit graph

14043 commits

Author SHA1 Message Date
Ed Sanders c8d0f62095 fetchSpecialCharList: Set directionality
Specifically, set arabic(extended) and hebrew to 'rtl'.

Logically depends on I14abd3e0c0d23f79aa01d96c216eea913024b4c8
to set the dir attribute in UI.

Bug: T56310
Change-Id: I1c7e28d3d2f20ca84115be6d49650cd9a81d78dd
2018-03-01 23:22:45 +00:00
Translation updater bot 936fa0b617 Localisation updates from https://translatewiki.net.
Change-Id: I2fa78e1b238f9b58362cbebe1d9d01f1b844423e
2018-03-01 22:42:12 +01:00
James D. Forrester fbc37064a5 Update VE core submodule to master (f5c88eb30)
New changes:
bdb1a680a SpecialCharacterPage: Allow setting lang/dir via special attributes property
37945174e Localisation updates from https://translatewiki.net.
19766f68b Follow-up 37945174e: Add 'myv' language to build to unbreak the repo
a9a87f97e Fix blocked triggers on OSX
76774b366 Map 'Ctrl+D' on OSX to forwards delete key handler
f5c88eb30 Use unsafeDeserialize in restoreChanges

Bug: T56310
Bug: T187920
Change-Id: Ic9853bccae87aab7c8f1d07f715fca3e532017a0
2018-03-01 10:50:47 -08:00
jenkins-bot e7d7d5bab1 Merge "autosave: Don't store initial document state until first change" 2018-03-01 18:47:39 +00:00
jenkins-bot fbbda2a480 Merge "ve.ce.MWBlockImageNode: Remove unnecessary #setupSlugs override" 2018-03-01 18:39:48 +00:00
Ed Sanders 11ac2736a1 autosave: Don't store initial document state until first change
1. It wastes valuable time during setup.
2. If a user reloads the page without making changes we
   should give them the latest html from the server to
   minimise the chance of an edit conflict.

Change-Id: I9a1f8cfd65ef2552fe2c3d6d2bbf975851b52003
2018-03-01 18:25:10 +00:00
Bartosz Dziewoński 5b7c93f0d5 ve.ce.MWBlockImageNode: Remove unnecessary #setupSlugs override
MWBlockImageNode already can't have any slugs:
* It can't have inline slugs, because it can't directly contain
  content (`this.canHaveChildrenNotContent()` is true)
* It can't have block slugs, because it can't contain paragraphs
  (`this.isAllowedChildNodeType( 'paragraph' )` is false).

(The only thing it can contain is a mwImageCaption.)

Change-Id: Ice6505da2356f004ef048ed0b1a9e03d08af02d1
2018-03-01 01:08:30 +01:00
Translation updater bot a8b91c1e33 Localisation updates from https://translatewiki.net.
Change-Id: I54ab3faf9d29c9e5eb090f70cff9b22881832807
2018-02-28 22:27:47 +01:00
jenkins-bot 6155cd4434 Merge "Remove autoGenerated hack" 2018-02-28 18:41:29 +00:00
jenkins-bot 9840316ee9 Merge "Centralize Parsoid resource name parsing logic" 2018-02-28 15:09:20 +00:00
Ed Sanders 90b6a1b5cf Clarify autosave comment
Change-Id: I0bdaf989886be8537ea45237ceea88a5cca11fc1
2018-02-28 14:36:58 +00:00
Ed Sanders 19d9e9eb98 Tag TODO comments with bug number
Change-Id: I965e8d4bed4fdfa24738ca5cce0ae3f51e7f2b40
2018-02-28 14:36:42 +00:00
Bartosz Dziewoński 98a1bb09c0 Centralize Parsoid resource name parsing logic
Let's keep the ugly regexp and the comments about why we do this in a
single place.

This is mostly without behavior changes, with three exceptions:
* ve.dm.MWImageModel#attachScalable now passes a title with spaces
  instead of underscores to the Scalable (this doesn't matter because
  it's normalized to use spaces later anyway).
* ve.dm.MWImageNode#getFilename now returns a title with spaces
  instead of underscores. This is used in some API queries and when
  rendering thumbnails for missing files, and this format is actually
  more correct for both of these.
* ve.dm.MWTemplateModel now URI-decodes the template title. This
  actually fixes a bug where trying to edit a template transclusion
  whose title contains a '?' would throw an exception about invalid
  title.

Also, clarify that the return value of ve.dm.MWImageModel#getFilename
and ve.dm.MWImageNode#getFilename is different :(

Change-Id: I8e09015cea82308017ed925ec755b7231518126e
2018-02-28 03:01:05 +01:00
jenkins-bot 8727ecd181 Merge "Do not use deprecated jquery.byteLength" 2018-02-27 22:10:23 +00:00
jenkins-bot b5ceb1b956 Merge "ve.ui.MWSaveDialog: Allow limiting comment length by characters rather than bytes" 2018-02-27 22:06:01 +00:00
Bartosz Dziewoński 974ea82c50 Do not use deprecated jquery.byteLength
Change-Id: If3f921d60563bd614c269d1d26b745161f8cfc7b
2018-02-27 22:35:29 +01:00
Bartosz Dziewo??ski dbfe6c0b5a ve.ui.MWSaveDialog: Allow limiting comment length by characters rather than bytes
Bug: T185948
Change-Id: I882d69beb1cd442868c8d73988f5b3a2bbb084bc
2018-02-27 22:35:08 +01:00
Translation updater bot 2b7e9289ec Localisation updates from https://translatewiki.net.
Change-Id: Ie97979d688c8b1cc345f770e5c651cf47871e4b9
2018-02-27 22:26:04 +01:00
jenkins-bot 12323a022e Merge "autosave: Use upstream methods in ve.dm.Surface" 2018-02-27 21:03:52 +00:00
jenkins-bot b3adaa5fc1 Merge "Show notification when document is recovered (or fails)" 2018-02-27 21:03:51 +00:00
Ed Sanders c670ce76ee autosave: Use upstream methods in ve.dm.Surface
Change-Id: I150b21d7767153d8457b5da658bb8b51b5464aa9
Depends-On: I859b57aef9d591597956f3d942dd2cf1b0aecee0
2018-02-27 20:54:59 +00:00
Ed Sanders a46b30a161 Show notification when document is recovered (or fails)
Change-Id: Id2f6651ba7743c05043bbbe64cd9cb7bd762d74b
2018-02-27 20:54:18 +00:00
jenkins-bot c44390e6f8 Merge "Use session storage to auto-save" 2018-02-27 20:20:31 +00:00
James D. Forrester 6a4ba8a2bf Update VE core submodule to master (0bc548e83)
New changes:
21c07f275 Move getDom/Html to surface model
521118e40 autosave: Upstream methods for storing dochtml/state
a5ddae575 Capitalise comments

Change-Id: I109f6c19902baf9c14b8003b03f5bdb0131c4219
2018-02-27 11:37:12 -08:00
jenkins-bot ff05933b34 Merge "Update $wgMessagesDirs in VisualEditor.php" 2018-02-27 19:22:33 +00:00
Bartosz Dziewoński 41c89e8027 Update $wgMessagesDirs in VisualEditor.php
Follow-up to 4987c07793.

Change-Id: I347553be3b59d88d76a4fbff4690eebf4c98746c
2018-02-27 19:47:14 +01:00
jenkins-bot 92470ae024 Merge "Always set sourceMode=true on dm.MWWikitextSurface" 2018-02-27 16:49:09 +00:00
Ed Sanders 76caef6b4b Use session storage to auto-save
Ensure we start with the same HTML (i.e. if an edit has
been made since the crash-recovery):
* Whenever an article target is activated, stash the initial
  document html, other parsoid response data, and the request
  parameters (pageName, mode, section) in session storage.
* Whenever an article is fetched through the target loader,
  recover from session storage if the request parameters match.

Store transactions:
* On document transaction (debounced) append the latest
  changes to session storage.
* If a document state is recovered from session storage,
  attempt to re-apply the stored transactions.

Clear transactions:
* Whenever the target is torn down (i.e. save, deliberately
  closing the editor to go back to read mode)

Other:
* If writing to session storage fails once, disable future
  attempts for that session (assume storage quota exceeded)
* Disable tempWikitextEditor when recovering. We don't have
  the transaction code loaded yet to perform the recovery.

Bug: T57370
Depends-On: I3832243fc347a99641fcb7e39a887a153c9a3b22
Depends-On: I448fb566fe9f7f5b5a76e88b70ca000e3d35b415
Change-Id: Id9d877f903cf4796a52f90991c030417a9f8786f
2018-02-27 12:19:06 +00:00
Ed Sanders 366219e953 Always set sourceMode=true on dm.MWWikitextSurface
Change-Id: Id46d5ef9c8a585784b8fbd55418d012fff96823f
2018-02-27 12:19:06 +00:00
James D. Forrester 2f42ebbd9d Update VE core submodule to master (bdf88934d)
New changes:
ca5c7af0b libs: Update jQuery.uls
040a9e56d lib: Remove old classList LICENCE.txt
2c0fdef5c lib: Update jQuery.client to master
adb7d7d39 lib: Update jQuery.i18n to 1.0.4
ab83e52cb lib: Update PapaParse to 4.3.7
23d44d9a5 lib: Update SparkMD5 to 3.0.0
2750f2cfb AuthorItemWidget: Add a color picker
f089f62de Rebaser: color change API
b9107987f ve.ui.DebugBar: Group together runs of text when showing linear model data
bdf88934d demo: Fix standalone autosave demo

Change-Id: Icdb334066764b772a2ea0cdf67e923ac31e5089f
2018-02-26 16:07:56 -08:00
James D. Forrester 4dfacbbca7 Follow-up 89c0fb9d2: Consistency, consistency
Change-Id: I4e1efe4570cdd9595c2480309d771e036362bdb9
2018-02-26 14:57:36 -08:00
James D. Forrester 89c0fb9d25 Follow-up e19092240: During the config cut-over, don't graduate 2017WTE
In e19092240 the ability to configure the 2017WTE to be "graduated" out of
beta and available to all. However, for a week of config cut-over, this is
re-using a config switch which previously gated the beta feature, and so
will be immediately available to all users until we put it back under beta
when Ie13215bd is deployed. Oops.

Change-Id: I1bc556849a6eb1e895f03412a9cb78002c8a0aee
2018-02-26 14:00:20 -08:00
Translation updater bot 9a5fb6c880 Localisation updates from https://translatewiki.net.
Change-Id: I86d29f095bc1f48e654659abe038d9b608849054
2018-02-26 22:20:58 +01:00
jenkins-bot b9b729b615 Merge "Make it possible for wikis to have the 2017 wikitext editor by default" 2018-02-26 20:32:14 +00:00
jenkins-bot 9c9c21c22d Merge "Simplify 2017 wikitext editor config when Beta Features is enabled" 2018-02-26 20:32:13 +00:00
James D. Forrester e190922403 Make it possible for wikis to have the 2017 wikitext editor by default
Bug: T150578
Change-Id: I1cb47a044c9c8ee58229d83ee98dbdd1f07af9de
2018-02-26 20:23:14 +00:00
Ed Sanders 31f7015260 Whitelist style tags from Parsoid, e.g. TemplateStyles
Bug: T188143
Change-Id: I7a30d8a8c40de8b786d59c8bf0ebcb77f2baeb2a
2018-02-26 16:52:01 +00:00
Ed Sanders 5a58634e44 Update VE core submodule to master (a8da324)
New changes:
1c94ebf Create a local copy of ve.dm.ElementLinearData.static.getAnnotationIndexesFromItem
87d1693 Further minification of tranasctions
014ca4c ve.dm.Change: More minification
a8da324 ve.ui.DebugBar: Remove duplicated code block

Bug: T188020
Change-Id: Icd15a6c8332e4b35c13e548fc1d1980cdc3cd92b
2018-02-26 14:43:31 +00:00
James D. Forrester 4ede488647 Simplify 2017 wikitext editor config when Beta Features is enabled
Depends-On: Id12e08f9dca0a6676488a255480670e9badeb300
Change-Id: Ibe031f0ce5a7b06aa4b8f6d59c2a85b873b8e35b
2018-02-26 12:27:19 +00:00
James D. Forrester 96a3a15fa6 Update VE core submodule to master (35cf6d9ff)
New changes:
d81550c2d Minify the serialized form of Transactions
a25ebf010 Minify the serialized form of Changes

Bug: T188020
Change-Id: I406102ba756a55d16f40a78f778c05bc80f1588d
2018-02-25 16:51:59 -08:00
L10n-bot 3952f1dfdd Merge "Localisation updates from https://translatewiki.net." 2018-02-25 21:36:48 +00:00
Translation updater bot 8c2b034917 Localisation updates from https://translatewiki.net.
Change-Id: I342f6e7b9b9c3068d3b5740fda56dcb4ee85784f
2018-02-25 22:34:33 +01:00
Ed Sanders e12cfc35a3 Update VE core submodule to master (e6b9330)
New changes:
a57bb5b Do less work when building the diff document
0f6a33a Remove IE<=10 fakePaste support
a89c817 Localisation updates from https://translatewiki.net.
39f140b Auto-save: docstate -> dochtml
0df1428 Implement an append-only list data structure in sessionStorage
b7814fc Remove methods for creating obsolete metadata ops
2e68048 Implement auto-save using transactions
9e20e44 Drop IE10: Remove ve.ce.Surface.prototype.supportsPointerEvents
757c96e SessionStorage: Return booleans for setters
d0fd0c9 Make get/removeSession exception safe
fdf8bbf ve.dm.Change: Allow unsafe deserialization
d24ad15 Transactions: Only set insertedDataOffset/Length when meaningful
4b6c0fb ve.dm.IndexValueStore: Serialize empty stores to null
13a3d05 Filter out meaningless properties when comparing elements
e4f7a88 Stop diffing originalHTML for internal items
575f219 Use #cloneWithData in #getInternalListChangedNodeElements
c8cf2ea Set the initial store length to the initial store length
d88669a Emit undoStackChange when the undo stack changes
d985bc6 Autosave: Store and apply transactions by breakpoint

Bug: T187070
Bug: T187613
Bug: T188020
Depends-On: I215c1b060d0758e669b62ba27db96ece56bff2f0
Change-Id: I6a8a6bca041131e175ff4be56f371fd3e7e5171b
2018-02-25 21:00:32 +00:00
libraryupgrader a503c7004a build: Updating mediawiki/mediawiki-codesniffer to 16.0.1
Change-Id: Ifc670629f1dfe9c9ac3880118d4b73ead77393b5
2018-02-25 05:34:34 +00:00
jenkins-bot 72756d5a26 Merge "MWImageNode: getHashObject -> getHashObjectForRendering" 2018-02-24 13:42:15 +00:00
Ed Sanders d17121d1f3 MWImageNode: getHashObject -> getHashObjectForRendering
The latter was introduced for this very purpose: defining
which attributes affect the rendering (in this case the
thumbnail URL). getHashObject should be reserved for making
full semantic comparisons.

Bonus: Don't distinguish between block/inline images
for URL caching purposes.

Change-Id: I6e6d2547a0d110f07c4d18b8179c168d8c251059
2018-02-24 12:44:53 +00:00
Translation updater bot 522dff63c6 Localisation updates from https://translatewiki.net.
Change-Id: I01a77b2a41193eeaa82eae5db5b09d7864db5686
2018-02-23 23:01:57 +01:00
Translation updater bot 22af5d6c17 Localisation updates from https://translatewiki.net.
Change-Id: Ifc9eda6c7b692d56671ef1f46a3741ab350830e7
2018-02-22 23:22:41 +01:00
David Lynch abe3d0a4a5 DiffPage.init: Enforce a valid diff mode
Bug: T173400
Change-Id: I48b97e10fc6c6e2ca84563b58dd0bb8f42fa251f
2018-02-22 11:48:37 -06:00
jenkins-bot 3d93d195c7 Merge "Drop IE10 support" 2018-02-22 00:55:50 +00:00