* Access to Cite options changed
* Various target locators also changed
Paired with Rummana for these changes.
Change-Id: Ib7c3fbd1842879745d3d3128c66d90cc2b4f98cb
If a references list node is selected, open the dialog to edit it.
Otherwise just insert the references list for the default group, since
this is what the user wants to do in 99% of cases.
* Replaced the simple 'referencesList' command (which opened the dialog)
with a custom implementation in ve.ui.MWReferencesListCommand, which
inserts the references list or opens the dialog like before.
* Removed the ability to insert a references list from
ve.ui.MWReferencesListDialog, since it should now never open without
a references list selected. If it does, throw an error.
I considered the behavior of always showing the dialog if there is at
least one references list already in the document, but I think it would
be confusing if the tool behaved differently depending on the state of
the document (rather than merely current selection).
Bug: T71727
Change-Id: Ifbbfa28548de9c0435c5174fb7762079f59bac54
Add a dialog to group the possible citation types and allow the
user to choose the right citation dialog for them.
Depends on Ibf29417 in VE-core; useless without I3d9caef in VE-core.
Bug: T62768
Change-Id: I22a64265475b1b4c94b46c5af196bd08331a05e7
Move requestPageData from mw.Target to TargetLoader, call it
in init init, and pass the promise it returns into load()
via activate().
Bug: T90372
Change-Id: I828b8474e5a76b3d0d7d08735b4d865c29d2f820
This introduces TargetLoader, which manages plugins and RL modules
in a slightly more generic fashion so that Targets themselves don't
have to. This allows us to load all RL modules in one load.php
request, rather than first loading ViewPageTarget which then
loads the other modules.
TargetLoader loads in the bottom queue, so it will be loaded
as part of the main load.php request, but in VPT.init.js we
still have to wait for it with using() because it might not
have arrived yet. This also degrades gracefully on cached pages
where TargetLoader isn't in the bottom queue: it'll be loaded
as a separate request instead, which is suboptimal but no
worse that what we were doing before.
Right now TargetLoader is small enough that it could also be in
the top queue, but in the future we want to add things like
the action=visualeditor API request to it, and mw.Api is
relatively big.
Note: this also makes a breaking change to the plugin API:
plugin callbacks no longer receive the target instance
as a parameter, as they're now executed before the target
has been constructed rather than after. In the long term,
if we want to give plugins access to the target instance,
we could give them the target promise somehow. For now,
I've killed this feature because nothing used it and
the change from a direct object reference to a promise
would have been a breaking change anyway.
Also fixed incorrect documentation index for ve.init.mw.ViewPageTarget.init.
Bug: T53569
Change-Id: Ibfa6abbeaf872ae2aadc6ed9d5beba7473ea441a
It turns out there are events bound to the rendering of CE nodes that
prevent certain events. The quick fix is to just round trip the
reference rendering to through the browser's HTML serializer and
parser, but T92583 has been filed to find a more general solution.
Bug: T92427
Change-Id: I725a0d2dbb24af9cbe7b1e7e0c8e0bda7fd8417c
Since all transclusion nodes can be interacted with (including the
'hidden' ones,) there is no need for MWTransclusionMetaNodes.
Change-Id: I23d37e3d82029b7475ec68ebb04883c7e05370cc
ve-ce-surface is a child of ve-ui-surface. The ve-ui-surface has
margins that would remain in the document flow causing a temporary
growth outwards to the bottom during deactivation (causing the
white area and blue border on Vector's grey background to move down)
after which it would restore again.
Follows-up 77f016a.
Bug: T91442
Change-Id: I5b999b580c968fcd24f07d9a895cfa17afc80c0d
By removing from and re-inserting into the InternalList when the right
attributes change, rather than trying to hack it into the model's
updateInternalItem (which won't get run on undo).
Bug: T71119
Change-Id: Iaf7a3127576b94666e05691902d2782394d24afb
Since Bug T90654 has not been addressed in two weeks, I would
rather make the test pass, assuming that the slightly altered
diff view is a feature not a bug.
Change-Id: Id2ce34b2838cf56a9411173f9b2e9ad8e5320545
This has been failing for a while, for several reasons, originally
because an updated version of Cucumber interpreted an "&"
character in an unexpected way.
Change-Id: Icd79ec9b489557c3259ff7f2c11b2a899c767d0f
It seems to have been intended to allow overriding of which icons
are used, but this isn't used anywhere.
Change-Id: I312f6c8e69d5a4d9c11f4af5f9487d0890a1f4e1
Move the surface focus() call to be done after VE has loaded, to
make sure that the position of the content editable field is at the
top of the page and not -- as happens in Firefox -- after the read
page contents.
Bug: T90420
Change-Id: If91cea42c083d67b1ee6396402c3f607dde70471
Depends on Ib9471bc0 in VisualEditor core. Without that patch
this is actually necessary, because we were removing some event
handlers in the meantime.
Change-Id: I145f1891efd1c91eeb6154e11e96e3fc160e2be3
While showing the content earlier as soon as possible is nice, the ve-ce-surface
remained visible until toolbar and surface were torn down.
This avoids the split second where the new pageview content *and*
CE surface were visible in the page (this it also messed with the scroll position,
and would temporarily cause a scrollbar to appear).
Bug: T91442
Change-Id: I0a7232cd0264bff28ad66aa328de29d339891aa1