Objectives:
* Introduce new icon for a reference
* Repurpose existing reference icon for references block
Change-Id: I1bfcdbeda3b9730d62d6b264ef72921e93623f7e
At the moment we create an alien meta item if an annotation
wraps contents of zero length, however we also need to handle
nested empty annotations, i.e. where the contents is other
empty annotations (i.e. alien meta items).
As alien meta items simply preserve DOM elements we don't
mind what type of alien meta items they are, so this also fixes
the case of an annotation wrapping another alien meta
e.g. a comment or <meta> tag.
Bug: 48605
Change-Id: I98d88b341efcd6384ee1fda5d6d7e1e1acb107aa
Previously pageExists thought matchingPages was an indexed object when
in fact it was an array. This didn't manifest as a bug as we subsequently
check the normalised URL in the correct manner (using indexOf), but it
did remove the optimisation of not running mw.Title if there was an exact match.
Change-Id: Ic616cbfa0d7ed5447e032dd1f772779db2dc19e5
Until this is fixed by Parsoid, this is a dirty hack that compares
HTML attributes on annotations, excluding data-parsoid. Obviously
we shouldn't have any parsoid specific code so this should be removed
as soon as it is fixed properly.
Bug: 48194
Change-Id: Ibb18b4f653c664e8ab7876498dc8395d878f7aaa
Was previously doing the text slicing before the cluster split
using substring, instead of after using splice.
Bug: 49233
Change-Id: If9c0860e2fe7b01eb0b27aae67c671062799a0fa
The API gives us normalisation information about all titles,
including titles of which it couldn't provide any template data.
Spec storage should only have properties with valid values
(has property means to have a valid value, like database). The
absence of this check was causing it to turn this:
{
pages: {
'Template:Unsigned': { params: { .. } }
},
normalised: [
{ from: 'foo bar', to: 'Foo_bar' },
{ from: 'template: unsigned', to: 'Template:Unsigned' }
]
}
into:
{
pages: {
'foo bar': undefined
},
normalised: [
{ from: 'foo bar', to: 'Foo_bar' }
]
}
Bug: 49493
Change-Id: I0b661744d0388345561897c9631f15e691737031
Previous condition was put in as part of I9ed6f9fb as a
temporary fix for bug 42842. However this code was causing
the popup widget to not appear for items at the start of
the document. It appears the bug it was put in to fix
has since been fixed elsewhere.
Bug: 49421
Change-Id: I8bcdea0f7a6951216bf8368865d23ef6246880ea
The transclusion dialog lets you completely delete all templates
within it. If this happens we should delete the node completely, or
not insert it if it's a new instance.
Bug: 49831
Change-Id: Ic5d4fbf73f3d1be9cf877bc8b98096de9e98991a
This function builds a transaction that takes a document slice and
inserts it back into the document it came from, applying any changes
that were made.
This makes editing document slices simple:
slicedDoc = doc.getDocumentSlice( captionNode );
// Edit slicedDoc using a surface
tx = ve.dm.Transaction.newFromDocumentInsertion( doc, captionNode, slicedDoc );
surface.change( tx );
Specifically, newFromDocumentInsertion replaces the node's contents
with the document's contents (meaning any changes made to the node in
the meantime are lost). It also merges the stores internal lists
of the two documents and remaps indexes accordingly. This means editing
of references inside of references is supported.
This functionality is not specific to slices, and can also be used to
safely insert data from a paste buffer, with internal list data being
transplanted correctly.
ve.dm.MetaLinearData:
* Make merge( [ undefined, undefined, ... ] ) return undefined rather
than [].
ve.dm.Document:
* In getDocumentSlice, store a pointer to the original dm.Document in
the new one, and also store the length of the internal list. This
allows us to figure out which internal list items the two documents
have in common when we insert the modified slice back into the main
document.
* In getMetadataReplace, optionally take the inserted metadata as a
parameter, to allow for operations that insert both data and metadata.
Per Ed's review, rewrite this function to return null rather than {}
if no metadata needs to be replaced.
ve.dm.InternalList:
* Add method to merge two internal lists
ve.dm.Transaction:
* Remove newFromNodeReplacement and replace it with newFromDocumentInsertion.
* In pushReplace, optionally take the inserted metadata as a parameter.
Change-Id: I786ee7bad796aa54bc242993b4de3ad18ad0773e
Without these properties set, the layout is collapsed into a 0x0px square due to the
parent having overflow-x: auto; and no width/height set.
Change-Id: I77aef8afa3327b11f453196badcdfad3f51f7c3d
The check for the toolbar not overlapping the last branch node
'fixes' an edge case where the user has scrolled too far, and
the viewport is shorter than the last branch. A more common
problem caused by this is that if the last branch is very tall
the toolbar disappears whenever you scroll past it.
Bug: 48662
Change-Id: I1c7662f2b6f1ced6f80dec16c6ed69a8cc0c06c8
Removed inherited (and often wrong) documentation, replaced direct
usage of onApplyButtonClick with more standard onClose handling,
and one case of calling the wrong parent method.
Change-Id: I86ed16860e996b42c141a6499eefb9084d759a72
"Template" parts should be labeled with a normalized version of what you would actually write inside a set of curly brackets.
Change-Id: I4b9c541a01da86cb078d38012e5a9fead2fa233c
Objectives:
* Clear this.titles when resetting, otherwise results are shown once and
then blacklisted forever.
* Attach done() before always(), so done() gets called first and not
after always() has dereferenced the request object.
* Remove use of imaginary variables like this.loading, which were never
set, and were referencing even more imaginary methods on other imaginary
objects like this.request.abort()...
Change-Id: Ifbe74346f68b6a91f425b56a2696fd1e46b61e02