The activation timing was always a bit of a lie even pre-TargetLoader,
because the timer only started when the first RL request for VE
modules had loaded. But at least the process it covered was consistent,
which is no longer true with TargetLoader. Now that we start the
request for the HTML together with the RL request, the activation
time might include some, all or none of the HTML request depending
on how fast the RL request was.
This change makes the activation timings more useful by measuring
from the moment the user clicks "edit" to the moment the editor
is done loading, which is what actually matters.
* Moved start of activation timing to VPT init
** For mobile this falls back to when mw.Target#load is called;
we'll have to fix that in MobileFrontend later
* Moved end of activation timing out of TargetEvents#onSurfaceReady
into individual onSurfaceReady handlers
** This is necessary because VPT's onSurfaceReady does quite a lot,
and we want to include the time that takes in our measurements
Change-Id: Ie44f0b839b39a2b3b22dcd86e20f0d1170cb6069
In case of FlaggedRevs, for example, the software is given a loose
string of html with a Bold element, Text nodes, and Anchor element.
Bug: T95989
Change-Id: I3d345677507ffc08feec0f7785e148ac98f19cb7
When the dialog opens make sure the first input is focused.
** Depends on OOUI change I9f1e908e0d **
Bug: T95450
Change-Id: I789bcf98ada7c3e2b9544426546775f65bab0edd
/_preconnect is a special end-point that is handled by Varnish with an HTTP
204, sparing the RESTBase backend. See I95a716592.
Change-Id: I0c0430014768d7a1c6673d078569d0cf4062d338
Per Timo, this avoids us having pointless code that is never
executed, and the replacement notification to the user (that
ve.blah.UnicornAnnotation.foo is null and not a method) is
sufficiently clear that the issue lies in the lack of existence
of the ve.blah.UnicornAnnotation#foo method.
Only ones in this repo appear to be in ve.init.mw.ApiResponseCache.
Bug: T54482
Change-Id: If44b8d63b8e7b2a5c289fe7278ad54e722b185fa
Set up the surface widget as inside the reference dialog, and let
the citation action notify the template dialog the name of the
dialog it is in. If the tool was executed from within the reference
dialog, skip over creating a reference and instead insert the
citation as a template.
* Depends on ve-core fix I709eeb0de475 *
Bug: T94621
Change-Id: I4871f8c0afe190117cc90e88227b37f292a71e20
Keep VisualEditor load times snappy by eagerly establishing a connection with
RESTBase via a beacon request, which is deferred until after window.onload /
setTimeout to ensure it does not slow down the loading of the page.
Task: T94784
Change-Id: I19fd2ef6beffe1c4c4f05c2716da079b49e88b95
MWExtensionNode:
* Inherit from LeafNode at the top level. Inline and block only
differ in CE where inline has isContent set.
MWAlienExtensionNode:
* Inhert from MW(Inline|Block)ExtensionNode respectively. Both
mixin MWAlienExtensionNode.
Bonus:
* Bring in paragraph unwrapping on inline nodes from MWMathNode
Bug: T93712
Change-Id: Ib04234f740cf1f27c861d8b3cfeea5e323b94678
If70ff601 didn't really fix anything. The only reason you'd want this data is
to distinguish between mobile and desktop data, but it just set the value to
the desktop version always...
Bug: T95432
Change-Id: I76722e3ad8b7dbe644374b24093bec696f27f48c
Also fix up logic duplicated between ExtensionInspector
and LiveExtensionInspector.
BREAKING CHANGE:
* nodeModel property no longer exists, use NodeInspector's modelClasses
property, which is an array.
Bug: T93592
Change-Id: Ib0131c9485a903d73b770090bf8a938056782ba3
New changes:
4c1a5ea [BREAKING CHANGE] Give the converter a 'fromClipboard' mode
d855043 Add core tests for annotation merging
fae083e Localisation updates from https://translatewiki.net.
11710e9 Encode and decode HTML entities in comment nodes
Local changes:
* Update getModelFromDom signature
Change-Id: Ida1b9b33d5e25e7d467ef16dd2240442270b9d32
Currently we compare some HTML attributes, but as wikitext doesn't
allow you to set arbitrary attributes on a link they can never
represent a meaningful difference (unlike <b style="color:red;"> vs. <b>)
Bug: T95028
Change-Id: I267604e4b2140d3c4fe4f9ab07961c6f17a1f2fa
Don't rely on this.$element.width()/height() when showing the
category widget popups - instead use the default sizing. If one
thing goes wrong and the popup is clipped, all subsequent popups will
have a smaller and wrong sizing.
Change-Id: I38ac0ae97dd5d7c38cdcdcfb31f736b19837bd5a
Reduces event overhead and prevents accidental interaction with
content while loading, and with content sub while editing.
Change-Id: Ief997cd4d5cf444fb2ee0d28c709301d26e814f9
When a citation is selected from the general citation dialog that
opens from the citoid inspector, make sure it opens the correct
citation window, namely the relevant cite-XXX window rather than
the transclusion window.
Bug: T94602
Change-Id: Idc8dd653e42011bd02c4bcec4aa9a02c9e2b7567
If the Parsoid document has an invalid base URI or none at all,
construct one based on wgArticlePath so link href resolution
still works properly. This is needed especially when creating
a new page, because the "Parsoid HTML" is an empty document
in that case.
Bug: T94315
Change-Id: I5d9709725ef471c7ce1987ce887708ac5ee4259a
Also use an array instead of an object. The keys were already
meaningless (index numbers). A "wikimedia/*" Git search did not
show any usage outside MWNoticesPopupTool. However, the array is
backward-compatible with any code using it as an object for keys
or looping (just in case).
This should also make the order more reliable.
Bug: T87412
Change-Id: I683cc902bda5ba768e962af6725e657871b79b9a
Also make sure only one icon is appended in the case where
$element consists of multiple siblings.
Depends on I7b4d9a54c in core.
Change-Id: I5a7985b7a2c709f079afcdfd5108d73cc7bfc688
VE core changes would be needed for the remaining 9. (To deal with 3 titles in
the UI, and 6 encapsulating the selected text with one character before and one
after).
Change-Id: Id7c0fa06b1c873ab286cffb7a83016a2d37ab744
When deactivating, verify first that the welcome dialog was
initialized before calling 'close' on it.
Change-Id: Ife98b396f3d8641e2bd313c549fe867bcd84db9b
This is not pretty and probably isn't optimal, but it works well
enough. The bug about getting rid of this all is T91152.
Bug: T94071
Change-Id: If926286f1d0c7835489914ed653a0d65ed24f53a
Stripped out X-Parsoid Performance Headers, previously used to gather and
forward Parsoid's performance information, from ApiVisualEditor.php,
ve.init.mw.Target.js and ve.init.mw.TargetLoader.js. Change I936ada7b1 strips
out the corresponding X-Parsoid Performance Headers from Parsoid. Parsoid's
current performance instrumentation is achieved using Graphite and txstatsd.
Change-Id: I57d6f866a7d8287a5115e6236b0fb25bc4d0eabd
It looks differently in different languages,
and it is likely changing now with Citoid being deployed,
so it shold be disabled for now and revived when Citoid deployment
stabilizes.
Change-Id: If6a6ecf450060eb1387aaf90fd0cfb937b08bd3d