New changes:
57f8064b6 tests: Enforce dm unit test coverage at 20% per file and 80% globally
6f757c670 LinkAnnotation: add a getFragment method for consistency with MWInternalLinkAnnotation
c40a3f152 Drop the classList polyfill for IE9
d1af6c6bb Update OOjs UI to v0.21.1
bfb35aaef Localisation updates from https://translatewiki.net.
Bug: T162277
Change-Id: I5146bc421bb88e56bafadccefc7bbdee106504ea
New changes:
719f8c667 ve.ce.DocumentNode: toggle all contentEditable properties, not just the outer one
35cadd7db Introduce single-line mode for surfaces
41fe321b2 Restore pointer-events comments for IE10 support
42f556820 Upgrade to jQuery v3
c1b8f142c Pass toolbarConfig position to actions toolbar by default
0d4c6a5fc Fix styling of table context in MW theme
db6eb4ebf Localisation updates from https://translatewiki.net.
Bug: T161944
Bug: T162808
Bug: T162830
Change-Id: I9b11673b4a77b7aebcdc282953d83ade08a8d8bd
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
* Pass a wikitext promise, instead of wikitext
* Handle writing of content to the dialog from within
the dialog.
* Handle diff errors within the dialog.
* Never disable the 'Return to save form' (approve) button
* Remove redundant messages
Change-Id: Ibd76e8951998f751abfb4f407682202c2f73ac7e
New changes:
dc0cad28c tests: Factor out ve.dm.TestRebaseClient/Server into their own files
98061108b Convert RebaseServer tests to data provider
3e746a51b Update OOjs to v2.0.0
16231a812 [BREAKING CHANGE] Drop support for Internet Explorer 9
64daeb4b5 Localisation updates from https://translatewiki.net.
3310e876c Update DOMPurify to 0.8.5
579033a83 Follow-up 16231a81: Drop IE9 support in createDocumentFromHtmlUsingIframe
Bug: T162277
Change-Id: If17c6a3fac0920db29f80069f344ffd6be46c3c9
The styles are not specific to the Vector and MonoBook skins, but rather
to the MediaWiki and Apex themes of OOjs UI. Rename them to reflect that.
Change-Id: I757e8d96625feb8290cbf7837b5d801961cda344
The bare minimum of elements that must be present on the page for
VisualEditor to start and mostly work is:
* '#content' to attach our interface (toolbar etc.)
* '#mw-content-text' to replace with the editing surface
* '#ca-edit' to start up the editor
When those elements are missing (and we expect them to be present,
e.g. we're not on a special page), we print a console warning.
For example, VisualEditor now launches on Timeless and CologneBlue.
It does not launch and prints a warning on Modern and Erudite.
(It is actually possible to edit and save pages on CologneBlue,
although various pieces of the interface look funny.)
This does not change which skins we claim to support: these are still
currently only Vector, MonoBook and Apex. But it allows third-party
skin developers to more easily test the editor and fiddle with their
CSS to make it look right.
Bug: T161373
Change-Id: I97c786f3c8c795c238b10bef332a129ea26f86c2
We support all versions of IE that MW supports, so no need
for additional blacklisting.
Bug: T160494
Change-Id: I771459b4d6a0e2d5781a69a905a51323369b3b66
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
Ensure dm.LanguageAnnotation exists when it runs, otherwise
it won't match and the context will fall back to a tool
context which doesn't have the clear annotation button.
Change-Id: Ie5474a93fcc1beab2a752bbc3beb17b3ef9cab76
Pencil is the icon we use for 'edit' elsewhere in the UI.
Use the eye icon for the VE tool to specify 'visual'.
Bug: T116417
Change-Id: I12b6bab2a52758685abde04579b274a32d651174
This will make it easier for third parties to load the required
modules for an article-like target.
Also cleanup mobileArticleTarget to better match desktopArticleTarget.
Change-Id: Idb75e2bd99d8cf2c298e101cf92e8af4f85f5ad5
New changes:
f27169f68 Localisation updates from https://translatewiki.net.
edd78cf50 Increase margin on DiffElement
d723ce56a DiffElement: Use important background colours to force override
b71ee15b5 demo: Use windowAction to open diff dialog
de88ca28b Move standalone diff dialog into separate module
d18bb1379 Don't allow slug buttons to take focus on click
Bug: T158295
Change-Id: Ic67bed00c100acf9a24cc0f5b984a64c14357fa4
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
Algorithm for deciding which cells handle sorting is exactly
the same as in the real jQuery Tablesorter.
Depends on changes in VE core:
* I50426e173c68af7df49e47fe3bec0465a9a55c26
* Iabb372dfe7bf5feef314315ac74a788c6c58dc20
Bug: T139072
Change-Id: I4446be2ad459b05590754da9bb6c3dd8f796be42
New changes:
778dd0709 Destroy unicorns properly when cursoring to another branch node
2877cbbbc dm.Document: Make tree validation stricter
342a71e05 Update OOjs UI to v0.19.1
d2df4b6d4 Explain that Escape/Ctrl+Enter can be used to cancel/confirm a dialog
d978507f0 Move platform handling from CommandHelpDialog to CommandHelpRegistry
4dbceb403 Honorably discharge ve.dm.DocumentSynchronizer
0eb0e4214 Localisation updates from https://translatewiki.net.
Bug: T157019
Change-Id: I5066b1d2c60e116bc3b80b9a8242a72db243d8cf
New changes:
d79138b Overwrite selected content when pasting via DataTransferItem
3c4737f Ensure clipboard is never empty text
3b1339e Create dummy platform and target for tests
4d63c8e Pass text as string to insertDocument when detected as plain text
Local change:
Remove VE standalone module
Flow used to use it, but not anymore. Going forward no one should
be using it in MW.
Bug: T154020
Bug: T156302
Bug: T156498
Depends-On: I078c244ef524669da477a43f9b37c847252e5ad7
Change-Id: Ifc4be16269f819890f2dcdddbbdebf9694ad2868
The hacks contained within context were ancient and no
longer used, and thanks to a typo in mw.MobileArticleTarget
neither of these classes was being used anyway.
Change-Id: I52f2b6d5aa5ddbcc45ac6107eaf9407570b73672
Refactor save dialog setup so logic for canPreview/canReview
is external and passed in.
'Show preview' will show in the VE command help dialog until
I56c1036e6 is merged in core.
Bug: T149914
Change-Id: Id718ad622be43c03df61d12b8688d53462c59f36
When switching from the old wikitext editor to VE, we stored "editing..." as
the original page title. Then restored that when saving / switching to "read".
Instead, detect if we're on top of the classic editor, and use the pagename
message to make a plausibly-correct title.
Bug: T126077
Change-Id: Ib0289de71c3ae947ca0a3e45fe1e620378689c35