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
New changes:
21c07f275 Move getDom/Html to surface model
521118e40 autosave: Upstream methods for storing dochtml/state
a5ddae575 Capitalise comments
Change-Id: I109f6c19902baf9c14b8003b03f5bdb0131c4219
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
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
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
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
New changes:
d81550c2d Minify the serialized form of Transactions
a25ebf010 Minify the serialized form of Changes
Bug: T188020
Change-Id: I406102ba756a55d16f40a78f778c05bc80f1588d
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
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
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
For galleries with 0 items, this would previously return an empty
jQuery collection, which caused funny rendering issues later.
Bug: T75230
Change-Id: Ia68e4f1b74b5ec494fa3d86f0b792f69eadb02fb
We still don't allow inserting such galleries, but we can handle them
in existing content.
Bug: T75230
Change-Id: I5d7350f00871ac295b0ebc00a633b44570347d85
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
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