A missing image should return some data to say the
image is missing, not just reject the promise.
Bug: T169337
Change-Id: Ib41a64a783c1baca88f428417c98e7fb913d14a1
We were incorrectly handling transclusions with trailing
newlines after the template name.
This also improves handling of non-template transclusions,
e.g. parser functions like `{{int:mainpage}}`, which are
no longer mangled as if they were page names.
ve.dm.MWTransclusionNode#isSingleTemplate will now match
a template even if it's name is itself template-generated.
Logic for turning Parsoid's hrefs into page names stolen
from ve.dm.MWImageNode.prototype.getFilename.
Bug: T167613
Change-Id: Ibecf71338eb37bb3da81a7372e4ed41140a9af57
Sub-classes want to dynamically change type, e.g. inlineFoo/blockFoo,
but doing this after storeGeneratedContents invalidates the cache,
so ensure this is done as soon as the element is generated.
Bug: T151130
Change-Id: I80e2f2587cff8e9d9fe6ded5d8581263268deaa8
Back in de98382a55, references to MWTransclusionTableCell were introduced,
but weren't followed through on. So, actually add it. Have cellable
Transclusions use it as their type.
Bug: T144122
Depends-On: I054f12f4218102a12d7a9ea843f9c61e8825c52c
Change-Id: I367f878bfd1c58e20b62368cb78120604b48d791
We're getting rid of meta item grouping, so we need to prepare.
Merged:
* ve.dm.MWIndexMetaItem
from ve.dm.MWIndexDisableMetaItem and ve.dm.MWIndexForceMetaItem
* ve.dm.MWNewSectionEditMetaItem
from ve.dm.MWNewSectionEditDisableMetaItem and ve.dm.MWNewSectionEditForceMetaItem
* ve.dm.MWTOCMetaItem
from ve.dm.MWTOCDisableMetaItem and ve.dm.MWTOCForceMetaItem
These three now inherit from ve.dm.MWFlaggedMetaItem to avoid code duplication.
Change-Id: Ic8a9cdb1226dccac2c27e7f4b965c1590a7387c0
Original title will preserve the case of what the user entered
into the inspector. Noramlized title will remove any unwanted
leading colons from file/category links.
Bug: T118408
Bug: T124410
Bug: T160977
Change-Id: I92ffc19eab4eead0d124e84afc1e5a0a3e535867
After 79ccfb9372cb57afa569036ef39ead13abfba673, MediaWiki's `<pre>`
tags get rendered as `<pre typeof="mw:Extension/pre">` in Parsoid HTML.
MediaWiki's indent-pre syntax (block indented by a single space) is
still rendered as `<pre>` in Parsoid HTML, however.
Indent-pre is still handled by MWPreformattedNode (no changes).
Introducing MWPreNode, which will handle `<pre>` extension tags,
and MWPreDialog to change its contents (and allow converting
to MWPreformattedNode).
Pieces copied from MWGalleryNode, MWLinkNodeInspector, CommentInspector.
Possible future improvements:
* Add a specific icon for MWPreContextItem
* Avoid API roundtrips for rendering (but rendering wikitext <pre>
is not as simple as it looks)
* Consider a way to insert these other than '<pre' sequence
Bug: T159900
Change-Id: I5bc4ea6e5d893736f65ef0dd43b08c18cb1a1e85
Though neat, this hack to get the internal list doesn't seem to be used
and creates an invalid document (just an internal list with no content,
so the internal list is at the start and the default selection position
is inside it). Instead, use the ve.dm.Document.static.newBlankDocument()
utility function that was made for this use case.
Bug: T153509
Change-Id: Iba5931cb5e3f939a803c1d59fa0d8f30a0513f84
We request the generated content of a template to determine
if it will be block or inline. This is the same request as
the view makes later to show the rendering, so we should cache
this repsonse.
Bug: T156698
Change-Id: I0ffd36ccd0aa821aa44d99328f2e3a2abc23dc0f
We don't support editing <div>s right now (as they're BranchNodes) nor
<span>s (as they're annotations), but most of those are inside templates
and so not editable in VE anyway.
Bug: T157989
Change-Id: I647b2a544fd16952696d0de8d07cb72189b27ecb
The progress bar dialogs interfere with the life cycle
of the window you are trying to open. Just disable these
progress bars for now to avoid catastrophic behaviour.
Change-Id: I77c8ae67a2d502bbd189836deb320cd55c3cb11a
These are actually configurable via MediaWiki messages, so use those
instead of hardcoding the default URLs.
Change-Id: Ie66a1b53f9c011947fe9e8db198a5904373f3192
Logically depends on I575d92c4fa.
Should really use a registry, and also doesn't update when
format is changed by deleting text, but is an improvement
for now.
Bug: T147218
Change-Id: I0cb87dbad2ab4269c4f89bdff8a4ccd9b35c8635