* If the user switches to external links, clear the input
* If the user types something with a protocol, automatically switch
them to external links. If they manually switch back to internal,
remember that and don't auto switch them again.
* If the user inputs something without a protocol into the external
link box, prepend 'http://'
Bug: T93699
Bug: T93700
Change-Id: Ia0e3a04f34077e7bd56254112dafd86ad865cbe2
Replace current, sectioned, order of link inspector suggestions
(existing, redirect, disambig) with order from API.
Reduce number of matches to 5, and show new page suggestion last.
Bug: T93698
Change-Id: Ida887d889730d7749041942636d24e181c335697
This is no longer needed, as VisualEditor now loads the content
from the /api/rest_v1/ entry point at the main project domain.
This reverts commit c741db5378.
Bug: T97500
Change-Id: I9b0dba58484884cdf3c7917c633b9815de4c9f92
The old code in ve.init.mw.Target.static.fixBase was mostly
moved to ve.fixBase(), and the new ve.init.mw.Target.static.fixBase
contains MW-specific logic on top of that. This allows us to get
rid of the base fixing logic in onLoad().
Depends on I607fa579733 in VE core.
Change-Id: I42dfd4b90e86eb67d0111fffafc18e1152249610
In the template dialog, keep the parameter search widget expanded
with all parameters showing if it was already expanded once.
Also keep the parameter list available after inserting each parameter
instead of asking the user to click the add details repeatedly.
Bug: T95696
Change-Id: I14a47dbea5c69532238e7e67290e613121fdc40e
If a load failed due to a revid mismatch, and a new attempt then
succeeded, we would keep remembering that it initially failed.
Then when we loaded the editor a second time, encountering
a revid mismatch would cause us to give up immediately.
To fix this, forget about any previous failures once
a load succeeds.
Bug: T97069
Change-Id: Ie10a7532759095cbb5fb8d23af602aa7b9611a06
Depends on Idd5e163090c9cf1c103d8b40e8ba19d332671cde and
Ifba178d8099b797a0ca33ca990540c8cb9cd3637 in VE core.
Bug: T65227
Bug: T70425
Bug: T95819
Change-Id: I6f08e3c1c3e4134520dac1e2d32d828cdefea23f
This is a quickfix to make the masonry fit recalculate itself after
the window is resized. It is most significant for orientation changes
in mobile devices, as those lead to a resizing of the window and a
complete reorganization of the masonry fit rows.
Bug: T95017
Change-Id: Ibf3c74ea21d42f4a159d0b855be5672c8455639f
These are likely to have been generated by a parent language setting,
rather than an a specific inline annotation.
This won't affect ve-to-ve copy paste.
Bug: T95708
Change-Id: Ic8fe417ab6ffa74e85ab170f413b13b83589293d
So 	 used in page source will render the same as literal tab, etc.
(I have a hidden motivation vaguely related to T96666, but this is
probably a good idea anyway.)
Change-Id: I3d462dd4ece94a71645786fab8771788b991456a
Parsoid doesn't apply these prefixes any more, so this hack is
now doing more harm than good.
Bug: T96643
Change-Id: I73ecea6a87f32437d29dfdca791be3f64c7c40a4
Dialogs should not be position:fixed in mobile as they are full
screen, and that behavior is dangerously buggy in mobile webkit.
Also remove the rules that hide template pieces in mobile so we
can show the citation dialogs in all their glory and function.
* Depends on ve-core fix I748123a362f9
Bug: T86233
Change-Id: I3daa2b733a7685cb5ff127625f6d2e51b416ec33
New changes:
72b9ed6 [BREAKING CHANGE] Simplify getModelFromDom signature
5a6505c ve.ui.SpecialCharacterDialog: Specify 'transition' only for 'border-color', not 'all'
30a2107 ve.ui.SpecialCharacterPage: Use less jQuery for better performance
e5692fd Localisation updates from https://translatewiki.net.
1ff0a0c Only auto-close windows which are not the one we are trying to open
48964b5 Localisation updates from https://translatewiki.net.
1f928ae Fix rendering of search results when scrolling
046dc5e demo: Add device switcher between desktop and mobile
Local changes:
* Use simplified getModelFromDom API from 72b9ed6 in core.
Change-Id: Ib220c4e5c3fc520e10b950c02475783cd710d0df
New changes:
de79de2 [BREAKING CHANGE] Fix font sizes and padding in Surface and SurfaceWidget
aa4a481 Localisation updates from https://translatewiki.net.
c2ff1cb Initialize toolbar tools disabled until surface is initialized
f457c83 Split visualEditor.css into apex & mediawiki versions
aff993c Don't drop <html> attributes when parsing HTML on Opera 12
Local changes:
Fix SurfaceWidget and DebugBar hacks
Change-Id: I93cb8ec787e53c07b5051c0296eb6f59b6048e91
We need it for the strip-if-empty logic in MWHeading,
and for consistency with desktop in general.
Bug: T96395
Change-Id: I9e70df896417811df087f58f3107919ba704f7c4
New changes:
8dc8b26 Trim leading and trailing whitespace from annotations
306feb4 Add get(Col|Row)Count to TableSelection and use in isFull*
1c06d21 Cursor holders for native cursoring to ce=false nodes
b08384d Provide file extension fallback for FileTransferHandlers
28844ed [BREAKING CHANGE] Move all icons to OOjs UI's icon packs
9d37355 demo: Set 'lang' attribute of target
8945420 Follow-up 8dc8b266: account for annotations that return []
c2bbc97 Localisation updates from https://translatewiki.net.
Local changes:
* Switch to using OOjs UI icons for VisualEditor core features
* Update test for whitespace trimming
Change-Id: I12b22a411600b6e8e61858e7ed600fb53eedd95d
For each template result, ask for the templatedata description. If
that description exists, show it under the template result.
Bug: T53436
Change-Id: If28d1eb082edca6f50c6c15c933a0b7d014eaeaf
Use the newly created preview widget to render consistent previews
of references in the context items and search widget.
Depends on ve-core fix Ia7e96e048e4b
Bug: T93042
Change-Id: I3a7f6402018924a18efbb49ba61a16787c41f1f4
Disable the option for basic reference and for existing reference from inside
the basic reference dialog itself.
Also make sure the dialog opens its intended target citation dialogs with the
new mwcite action rather than directly so the reference to the inDialog surface
is preserved.
Change-Id: Idc6e5b849e2dbd422807a6d3cacde8f274e42854
Easy-Deflate.js and its dependency, Base64, are not needed for editor
activation. Defer loading these modules until the editor has been activated.
Also promisify prepareCacheKey.
Task: T94616
Change-Id: I2e754fc835a5608b27d81117e1fbc9ea97d5744b
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
It's much less likely we'll get another conflict if we retry
with ?oldid=12345 than if we retry omitting the oldid again.
Change-Id: I10e40f714fd44d7f0ac16c9d0dc6239a95c0ec51
Also introduces paction=metadata in ApiVisualEditor which
doesn't hit Parsoid but gets all the other information we need.
Bug: T90374
Change-Id: I71edbc0f8dc15a6f8d3672c10ca3c641cc172be7
The scenario for the Formatting pull-down screenshot didn't click
the "More" element in the bottom. This is now added.
The "More" element itself is redefined to be generic and work with
all pull-down menus - there is supposed to be only
one active menu at a time.
Change-Id: I27122f3192b220919311993ecd9a10d85ef5828d
Split up beta and meta dialog show methods so that beta dialog
is displayed as soon as possible, regardless of the surface being
ready. Also make sure that we destroy the temporary window
manager on destroy.
Bug: T90454
Change-Id: Ib8f94518af431487ce940a74a8c268dbdbe403d2
With RESTbase we'll be able to retry the older one, but right now we have to do
both with the same request.
This commit retries loading once, then starts emitting errors.
Bug: T92993
Change-Id: Ifbf44b777279dafbe31ab438838d70acd44de726
New changes:
5197b2d Rangestate optimization
80a07cf Unmix GeneratedContentNode from AlienNodes
f510e9c Make (Node/Annotation/MetaItem)Factory inherit from ModelFactory
b625ff0 Localisation updates from https://translatewiki.net.
5c4653c ve.qunit: Use 'jscs:disable' comment rather than hacks
90e9480 Remove registration of abstract AlienNode classes
d325674 i18n/en.json: Convert from spaces to tabs, like all other files
f40fc15 Add 'classes' config option to focusable nodes to simplify AlienNode
f7c8999 Document config options as @cfg
ad3aa0b ve.ce.Surface.test: Groundwork for testing non-linear selections
cd1a992 Localisation updates from https://translatewiki.net.
c92471e Move drop marker to highlights layer and position absolutely
Change-Id: I437663d93a346a06c6a5137cce5149c7a6fcbb7f
Due to changes in the way VisualEditor is loaded, the trace.activate.{enter,exit}
events no longer enclose the entire VisualEditor initialization process. This
change ensures that trace.activate.enter is emitted as soon as the user clicks
on an edit link / tab and that the trace.activate.exit is not emitted until the
toolbar has been fully activated.
Change-Id: Ief798faa95a58898b9ae4dcbbbd30506c5dbd9a7
On short pages which don't extend below the fold, the progress
bar should center within the #content element.
Change-Id: I0b99e42f5bab8177d3b4ca6dd372d6403ae9b136
Because sending HTML like <h2> </h2> or <h2></h2> to Parsoid
produces undesirable output like == == or ==<nowiki />==
Bug: T51452
Bug: T52100
Bug: T57769
Bug: T61647
Change-Id: If15a1b4b31d4f08c23ecdf2ecf61a8a14a77259a
New changes:
68e20d4 Create AlignableContextItem to quickly adjust AlignableNodes
0150df2 Update OOjs UI to v0.9.3
b333fd3 FragmentInspector: Execute action on enter, rather than closing with data
2d14f7a Fix webkit column hack
be780eb Don't drop whitespace when removing empty slug paragraphs
cc19787 Split handlesOwnChildren and ignoreChildren
7f1c9a7 Localisation updates from https://translatewiki.net.
Local changes:
Add ignoreChildren to handlesOwnChildren nodes
Change-Id: Id3dc7efae8d30b6551b2fc3104ed00bc86339176
New changes:
622693a Work around JS errors when editing image properties
a0498f8 [BREAKING CHANGE] Emit rerender for dead nodes
Local changes:
Use the new traverse function to bind handlers to rerender events of
generated content nodes to update the target of async rendered reference
content in reference context items.
Bug: T91314
Change-Id: I762a6c4c9438b431444c7af7b43043ee1517a15c
Because the mode label is set after measurements of the foot are made,
the body of a ProcessDialog was set to overlap the foot.
At some point T93290 will be fixed, but in the mean time we can solve
this problem by setting an initially.
Bug: T92986
Change-Id: I995d5ecd81b86ee188cf237f74487ec70480e297
The when_not_visible line fails, but it doesn't seem to be needed
in the first place. The when_present line appears to be enough.
Change-Id: I572dabb5d53553d454f6e40c5602fbe3252c3657
The functionality chnaged significantly, so the steps must be changed.
Removing the tag until it's done.
Change-Id: Iacdf78d3b6f00e39cb2bf313b79489035f1c0b62
The element is <div>, and using English text doesn't work
in other languages.
Follow up to
Icd79ec9b489557c3259ff7f2c11b2a899c767d0f
Change-Id: I3859c668921a5f3f6abafb2053fc471dbc8d80c7
When we moved to mw.Api, edit conflict errors stopped going via onSave and
started going to onSaveError instead. So the case to check for them in onSave
would not have worked - instead, they would go through onSaveError and get
picked up by our unknown error code, which just picks out error.info and shows
it, instead of showing our edit conflict screen.
Also return in a couple of other error cases where we probably should've been
(but not necessarily must've been... that didn't necessarily show to the user
if another error emit already caused saveDeferred to be rejected)
Change-Id: Iae7a66a8aa96ee777e9fa780005feeb429129d5f
We're currently rewriting "mwtiming.performance.system.domLoad" to
"timing.ve.undefined.performance.system.domLoad". The "undefined" comes from
the missing targetName property on the event. I'm not sure why it is missing,
but having it default to 'mwTarget' will Do the Right Thing™.
Task: T93156
Change-Id: If70ff601b6c54ec8f95171cbc43c82c87a177508
We moved toward serialization, but in the case where we don't have a
rendering yet and it's happening async, we need to use the same DOM
container that will be rendered into.
Bug: T91336
Change-Id: I53920591fde02175d4162b1fe5899b97b10a5b0f
Relies on I69cf0a88
Using our own new message because TitleBlacklist's own one includes text that
we can't parse on the client and relies on a parameter we don't get from the
API.
This relies on WikimediaMessages' version of the Edit schema being updated at
the same time.
Change-Id: I4c75369b8b97973b72899bfaecbd5a996a440c68
New changes:
44ca3b6 Use store indices in annotate operations
3ebbcce Make range optional in getUsedStoreValuesFromRange
9d03a5e Set originalDomElements whenever a data element is created
4cfffde Simplify annotation hashes
4eeb8bb Add handlers for font annotations
4a6d6f0 Localisation updates from https://translatewiki.net.
05de45e ve.ui.ToolbarDialogTool: Fix documentation
6797d6d Use type from toDataElements when creating annotations
b3a3839 Store reference to DM document in transactions
c073a24 Load special characters in Platform instead of SpecialCharacterDialog
Local changes:
* Add new files to VisualEditor.php
* Re-sort i18n strings in VisualEditor.php
* Re-run extenson.json creation
* Update documentation HTML file
* Update tests for adjacent annotations fix
Change-Id: I7a5e79e68ab8a7aae0e9af42d011943019f7f85f
Set 've-activated' as soon as edit is clicked, with a 've-loading' state.
This necessitates moving the relevant styles to mw.ViewPageTarget.init.css.
Change-Id: Ic9757cdbf63a2f72eda0dd03ff5588d79028ba0e