Commit graph

14034 commits

Author SHA1 Message Date
Ed Sanders d5a61eb95d Make edit notices popup wider (320 -> 450)
Bug: T184379
Change-Id: Id2df8f8d162db3389206666fa07ea4cc0be8cdec
2018-03-02 13:29:54 +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
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