Commit graph

15227 commits

Author SHA1 Message Date
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 1f38e7f87b Revert "Follow-up e19092240: During the config cut-over, don't graduate 2017WTE"
For Monday.

This reverts commit 89c0fb9d25.

Change-Id: I9140d4bf8113741f08fdfc3ec5de918930468598
2018-02-26 14:58:39 -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
Ed Sanders 05a504887d Drop IE10 support
Change-Id: Ib1cb8fb32c499ba0bdc87ec55e1e2e95d2eb39ec
Depends-On: I68c882e64fba95d5e1bf41f64658fcef7524dcf5
2018-02-22 00:47:38 +00:00
Jforrester 2e87e03a29 Merge "ve.ce.MWGalleryNode: Ensure we always have a focusable element" 2018-02-22 00:33:23 +00:00
jenkins-bot 35efed480b Merge "Update VE core submodule to master (1a0bc9981)" 2018-02-22 00:31:32 +00:00
jenkins-bot c5cc11079b Merge "ve.ui.MWGalleryDialog: Handle galleries with 0 items" 2018-02-22 00:31:30 +00:00
James D. Forrester f1f9a5f848 Update VE core submodule to master (1a0bc9981)
New changes:
7a0e5e2cc Drop IE10 support
b8bbcb015 Use sessionStorage to auto-save
785698dd4 Increase selector specificity for .ve-ce-focusableNode-invisibleIcon

Bug: T57370
Change-Id: Id21e93b7635864ad82e2f0a3f6aa702a103d66c0
2018-02-21 14:15:08 -08:00
Bartosz Dziewoński 180eb91f3f Increase selector specificity for .ve-ce-focusableNode-invisibleIcon
Otherwise our width/height rules are overridden by OOUI styles.

Change-Id: I2bbf81231615e6fcfd95573f5f590b5101e66bdf
2018-02-21 22:30:45 +01:00
Bartosz Dziewoński a5e2f60d7e ve.ce.MWGalleryNode: Ensure we always have a focusable element
For galleries with 0 items, this would previously return an empty
jQuery collection, which caused funny rendering issues later.

Bug: T75230
Change-Id: Ia68e4f1b74b5ec494fa3d86f0b792f69eadb02fb
2018-02-21 22:22:49 +01:00
Bartosz Dziewoński 3d422bac2a ve.ui.MWGalleryDialog: Handle galleries with 0 items
We still don't allow inserting such galleries, but we can handle them
in existing content.

Bug: T75230
Change-Id: I5d7350f00871ac295b0ebc00a633b44570347d85
2018-02-21 22:11:41 +01:00
jenkins-bot dd94837192 Merge "MWTemplateTitleInputWidget: recover gracefully if TemplateData not present" 2018-02-21 18:14:12 +00:00
David Lynch bd64b58071 MWTemplateTitleInputWidget: recover gracefully if TemplateData not present
Bug: T187917
Change-Id: Ica0c853e1a7bc908651260df115d59d1939a7939
2018-02-21 11:53:56 -06:00
James D. Forrester 59453e3824 Update VE core submodule to master (aa4aa2842)
New changes:
e4d59929c Rebaser: Generate random doc name if none provided
82093a6c2 Show reference moves in visual diff
ebe736495 Use offsetWidth/Height instead of jQuery.width()/height()
87158b496 Pass correct arguments to Node.insertBefore

Bug: T171587
Bug: T187864
Change-Id: I22f2529cd6e5826323e9ad1cafe13c64fe2029fc
2018-02-21 09:16:51 -08:00
jenkins-bot 5de7185687 Merge "Rebaser: Generate random doc name if none provided" 2018-02-21 16:37:36 +00:00
jenkins-bot 8d3e702976 Merge "Disable tempWikitextEditor for section=new on talk pages" 2018-02-21 01:29:58 +00:00
Translation updater bot f2e78128c0 Localisation updates from https://translatewiki.net.
Change-Id: I442f97f06bab9a509600b6fb12a7b6923803a44d
2018-02-20 22:29:14 +01:00
James D. Forrester 53c089973b Update VE core submodule to master (8c5b27028)
New changes:
7ddd588f5 SurfaceSynchronizer: Use palette for author colour
f7f904bfd Localisation updates from https://translatewiki.net.
cb9ff9657 Avoid jQuery.parseHTML
608d9e54a build: Lint JS inside HTML files
52a81146f Account for visually diffed element having to clientRect

Bug: T187713
Bug: T187726
Change-Id: Ie83ac5dbb156b16a6d42e44678b819e4fd14b577
2018-02-20 09:11:16 -08:00
Derk-Jan Hartman 249c52b6a4 Hide historical diff controls when UA doesn't support JS
Bug: T187780
Change-Id: If29974323ef21016edbbb66870914a6dc37e7bbb
2018-02-20 16:54:31 +00:00