Although an internal link is unlikely to be a valid external link, this
prevents an annoying experience when the user switches to external and
then back to internal while exploring features.
Change-Id: I178cf3f641db683f5dd0a49c246c204ded89760c
Once MW images are registered, we should remove core image support so
we don't accidentally match to them (e.g. an MW inline image with an
unsupported extra RDFa type).
Change-Id: I1c8567346c371fe338f95b232c9ac53e009c5a46
This new property is optional and should not be assumed to be present.
Follows-up 2ac7959849.
The constructor defaults 'maps' to an empty object, so there's no need
to add a "|| {}" in extend() or getMaps(). We merely need to make sure
we don't accidentally dereference the default in exchange for undefined.
Change-Id: Id2cb93696d12a20ee14f9d59705877dc174e6564
New changes:
9d162ce Restore the selection to a sensible place when closing FindAndReplace
57229ac Only apply annotations if 'done' is clicked
bfb17ee Always show cancel button on annotation inspectors
91672cf Disable 'done'/'insert' button when input invalid
aef9cbd Only create annotations from text input if it is valid
a384b96 [BREAKING CHANGE] Make getTextFromAnnotation/getAnnotationFromText static
fa09ab7 Scroll table selection into view when it changes
Local changes:
Make getTextFromAnnotation/getAnnotationFromText static
Change-Id: Id3c2a1efb1f327fa6d5b93d57d90bb5bb8ee88f8
The red-linked inline images in VE are now identifited as red links and image errors.
They can be changed and thereby be modified just as any other inline image on the editor.
Change-Id: Idb6f6f2da14379fd7db6ca19613dad32fe40023d
New changes:
a6144f3 [BREAKING CHANGE] Allow models to specify which extra RDFa types they support
Local changes:
* Use new allowedTypes property in model registry
* For reference nodes, allow 'dc:references'.
* For transclusion nodes, allow any other types.
* For image nodes, allow 'mw:Error'.
Bug: T98999
Change-Id: I7eb2b61eb9336792535e9fd6d5a8dd2d57065f04
OOUI was effectively overriding this with it's own rule for labels in an option
widget.
Bug: T99267
Change-Id: I82ce2d5ec1a859075d7bf1010ca76cdea9ead1a0
We were selecting the outer <div>s rather than the actual links which you could
interact with via the keyboard.
Bug: T97323
Change-Id: I797739e45f2c0b4a1d39e4b1901bc0836c82f281
The red-linked images in VE are now identifited as red links and image errors.
They can be changed and thereby be modified just as any other image on the editor.
Bug: T52788
Change-Id: I9cbb992c34d71b7073157fe276fee04e901845b1
* The element's class name changed.
* Zooming is removed - it was breaking the test and
it's not needed anyway.
* Fix another element with the same class.
Change-Id: I46a867619ed49936c3868f6b1b15e773bdb6f6b1
All this is no longer needed since 121216184718e7ebe22d6ecc8f5af5fe4e202465 in
OOjs UI and started causing issues after bb9c9c4f6a2fca6aed0e671e904e469d57da5f34.
Bug: T98795
Change-Id: I6493d6b52b313aac521aee2b0cff1571ea63bbe5
* Add a 3rd stage will triggers on API load
* Allow stages to complete in different order (as happens
on second load)
* Use CSS transitions
* Start slow and speed up using ease-in and progressively
shorter transitions
Bug: T95137
Change-Id: Ib9090e6c80b7a186bf353c40921d40456d90211a
Don't use the full IndexLayout for now as it doesn't
work easily in variable height situations.
Depends on this feature being preset in MW core.
Bug: T97878
Change-Id: I5d949bf69b0721b288c37c1f12210b0265658eb5
New changes:
68959f2 Localisation updates from https://translatewiki.net.
2c0224d [BREAKING CHANGE] Link widget refactor
f81eefa [BREAKING CHANGE] Rename LinkInspector to LinkAnnotationInspector
Local changes:
Adjust for link inspector refactor
Create separate widgets for internal and external link
annotations. Remove annotation specific logic from link
target input widget.
Change-Id: I054c3fe7ac9c61fbc3302471abd58cab89fed5a4
The toolbar.destroy() call that was added in 5c38995bd9 was
needed to destroy the dummy toolbar when tearing down VE
before a surface had been intialized. But when tearing down
VE after the surface had been initialized (e.g. exiting using
the Read tab), we would do:
* setTimeout in tearDownToolbar()
** Set toolbar height to 0 and wait for transitionend
*** toolbar.destroy() once transition complete
* toolbar.destroy() in cancel()
This meant that we'd listen for a transitionend event
on an unattached element (because once the setTimeout runs,
the toolbar has already been destroyed by the second call),
which of course never fires, so we'd never resolve the
tearDownToolbar deferred and never finish tearing down VE.
Bug: T98388
Change-Id: I504f0cb0bf13643773fc98cb18b7b380cccb2f88
Allow references to be created as placeholders and exclude
them from ReferenceListNodes and the ReferenceSearchWidget.
Bonus: Fix reference numbering when items are skipped (in
list nodes and search widget).
Change-Id: I8dc5146c21f309e89ff4ddd939f7c65a0c358378
Prevents read-mode elements placed inside the target from
getting scaled down (e.g. firstHeading).
Change-Id: I55ed38e2855c4eb317ec71cebb1842b9b70790b6
In wikitext editor these messages were in mw-body-content where they
inherited a sensible line height, so apply one manually.
Bonus:
* Make header bold
* Remove some duplication with inheritance
Change-Id: Ia7eaa556815ee6645a85162de03198e5a4dc7b03
* 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