* Move SpecialCollabPad.php to /.
* Move screenshots for BetaFeatures to images/.
* Move localisation messages to i18n/.
Change-Id: I874ae135a3ac58118c3dea105136c8c8b6fb41bc
ext.visualEditor.articleTarget (for ve.ui.MWSaveDialog) previously
missed the editing-advanced pack, so the [[ ]] icon only showed up
by happy accident of the VE toolbar loading it and generally being
there.
ext.visualEditor.diffPage.init (for ve.init.mw.DiffPage.init) just
needed being switched over.
Bug: T178532
Change-Id: Id12ef14434fd30a442bbbf6e9ccd8e50c3376cd5
Basic inspectors for editing. Changing from block to inline, or
adding "hidden" or "describe" flags not supported.
The UI layout for two-way and one-way rules could certainly be improved.
Bug: T49411
Change-Id: I5ce29e4bf47abf509afde0a57f64b5d1189f5185
Also:
* Add ve.dm.Change.test.js to MW test suite
* Remove server scripts from ext.visualEditor.rebase, they
only need to be in rebaser.build in core.
* Don't load ext.visualEditor.rebase on every page
Bug: T175828
Change-Id: I0ed0c320373b0d653b0d7a012aa7416e88e43e00
New changes:
4523b11c0 Make RebaseServer asynchronous
2eb09b6ba Localisation updates from https://translatewiki.net.
c806b7131 Remove execute mode from non-executable
622c62c9e Follow-up 2eb09b6b: Add kab to build to unbreak the repo
b69e4ba1c DiffElement: Fix insert/delete-to-end loops
8c6dfdde9 FocusableNode: Redraw highlights using focus toggle
2bded2d16 Debounce FocusableNode#redrawHighlights
3cb7844b1 Localisation updates from https://translatewiki.net.
fb13239b2 VisualDiff: Don't diff close elements
7a8829509 Localisation updates from https://translatewiki.net.
Also, exempt the Rebaser ES6 code from jsduck, as we do in VE itself,
because jsduck doesn't understand ES6 syntax.
Bug: T129541
Bug: T171862
Bug: T173860
Change-Id: Ia08022afb0b94b8a6907f97b161bc04d8a210232
Changing `->text()` to `->plain()` and some variable
names and comments to match that. This is now the same
as normal ResourceLoader behavior for messages added
via `'messages'` in RL modules.
Also remove a duplicate use of the
'visualeditor-quick-access-characters.json' message.
Bug: T159529
Change-Id: I63593db445433e7da5c71e6800f96daf63054fcf
Avoid confusion by using `twoway` instead of `bidir`, which could be
confused with the Unicode bidirectional layout algorithm.
Depends-On: Ib59dff22e64f235e30778a5a5b3e525e4fc7fdd3
Change-Id: I7efb35245d48125b167dc0f0ef8f12aa0fff94e5
Implement special node types for language variant markup, so that they
display appropriately based on the currently-selected variant.
(Parsoid uses empty elements to represent this markup, so without this
patch anything in -{ ... }- is alienated and disappears.)
A follow-up patch will implement context items and inspectors to
allow editing these nodes. This patch is basic "read-only" support.
Depends on I4fcdebc2290ec35ba188f4c2e69d578791fbcd67 in Parsoid to
generate the appropriate markup, but this patch is safe to merge
independently.
Bug: T49411
Change-Id: Ie11e9301d2513bfe4a36036481cee9a047f46d37
Only shown if VisualEditorEnableDiffPage is set, or query
string param 'visualdiff' is present.
Currently:
* All VE javascript is loaded (could be cut down to just DM code)
* The entire Parsoid HTML of both revisions being compared is loaded
* Both Parsoid HTML docs are parsed into VE DM trees and diffed
Bug: T167508
Change-Id: I151fc9bab3d3032f50c8d11be6b54e45a06fcc34
New changes:
839311756 Add missing icon set 'layout'
66634c032 Add missing icon sets to rebaser demo
2e8bca7b9 Localisation updates from https://translatewiki.net.
cd4e0fa2d Depend on 'movement' so we have arrows in the find and replace dialog
Change-Id: Idd888df1d59fe13cb982610d0e465ab87f61362a
New changes:
26085a853 Make author list a ListPopupTool
c4ea53eef Update OOjs to v2.1.0
8c94697f3 Update OOjs UI to v0.22.0
cdebc4817 Follow-up 8c94697f: Actually commit the icon changes I had locally
8be817396 Update OOjs UI to v0.22.1
Local changes for author list popup
Change-Id: I36bcaf122528a4a12882aaff3b33ef936082a391
New changes:
d336169fe rebaser: Don't spam the entire document into the log on initialization
1963a9993 ve.dm.SurfaceFragment#delete: Don't pre-build a sequence of transactions
6c915f305 TransactionProcessor: modify DM tree branches instead of rebuilding them
8773258bb ve.dm.ElementLinearData.test: Cover compareElements
7a073c78f RebaseClient: Don't log empty rebases in acceptChange
5adce57ea rebaser: Implement author names
78c7beecb rebaser: Tidy up author list UI
85d26f491 Get minimal diff when word starts/ends the paragraph
ca273a56c rebaser: Move author list to widget
ab693bead rebaser: Show active user count
Bug: T160795
Bug: T162762
Bug: T165772
Change-Id: Ibd21e6a78c3958db1c0ec8f0317c4c07f3fa5735
Follows-up 914eb1cde3; reverts the logic to have the label change, but
sticks with new "-current" i18n messages, so the "X editing" instead of
"Switch to X editing"; the old i18n messages are now dropped entirely.
Bug: T162864
Change-Id: Icdad6c5bb06ff86e9b8976840bb1a94b939609a8
Sites like to customize 'readonlywarning' with things that we can't parse.
Instead, use 'apierror-readonly'. The old message is still shown in edit
notices.
Bug: T163455
Change-Id: I592accde17b256ecee27820df12d9d312499f8f7
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
Create a new MWSaveDialogAction, which can be hooked up to triggers. Switch
the existing save dialog accesskey to just use the trigger system.
(Maintaining all the accesskey logic, so we don't change the shortcut on
people.)
Bug: T149914
Change-Id: I9b4ef8504148703556f802b266a517dd5098c06b
New changes:
f58ddea DiffElement: Use document slices with full internal lists
83800c0 DebugBar: Remove hard-coded i18n
b4f89e1 Update OOjs UI to v0.18.1
40c7bf6 Factor out active node functionality from SectionNode for captions
2d967be Move 'mode' property to surface, rename target property to 'defaultMode'
5d8c214 wrapAllNodes in sourcefragment
dd3d9e5 Refactor ve.dm.Transaction
9d61aca Use canonical ve.dm.TransactionBuilder.static.newFrom* methods
df4f72a Make table caption node an active node
b79f72d Core source mode
7533ac4 Localisation updates from https://translatewiki.net.
ae30d71 SourceSurfaceFragment: Check range is not collapsed
Local changes:
Get edit mode from surface where possible
Depends-On: Iec758c1892d518ad4bc2c0d1aaf6ca00fa354323
Change-Id: Ifaf6a26078b2731b374aaad2cb40c08928de9c84
New changes:
00efc39 VisualDiffs: Improved styling for moves
009de03 VisualDiffs: Use semantic del/ins tags
4a90e12 Localisation updates from https://translatewiki.net.
c671cf8 Add diffing to mobile SA demo
c4ff29b Replace deprecated $.andSelf with $.addBack
b122328 Fix labels on diff dialog
41a700c ve.dm.Change class with rebase operations
2c336da Localisation updates from https://translatewiki.net.
4c7cb68 Hijack EventSequencer timeouts in unit testing
dea2883 Focusable cursor tests: place cursor in cursorHolders
Change-Id: Id6640e02999c079bcf3709f2d048394ec6719904
Make this new modules a direct dependency of mwgallery so
that galleries work even if mwimage isn't loaded (e.g. mobile)
Bug: T150840
Change-Id: I7f1d9fe0c0133abe5cd56c1e5e34b93d9edde9bc
* Remove mwsig's direct dependency on core. Everything depends on core.
* Remove language from 'experimental', it isn't anymore.
Bug: T145139
Change-Id: I28b6e95f32d6276956269e24222586f49567e706
These are actually configurable via MediaWiki messages, so use those
instead of hardcoding the default URLs.
Change-Id: Ie66a1b53f9c011947fe9e8db198a5904373f3192
Get rid of the 504 Gateway Timeout handling while we're here, in preparation
for bug T135748 where that kind of thing will be made normal.
Change-Id: Ia4abb1a68ff7ab7ff365c7348bf4d2ad35c43a27
Update VE core submodule to master (89ce43b)
New changes:
c3d3d29 ce.CommentNode: inline preview of comment
Change-Id: I8a7f1b69eaf84165742a1f2d10fed3594961a9e9
This gets us the variants (which we need for OOUI 0.17.9); note that I've
cheated and used 0.17.9's colour for the MediaWiki theme's progressive flag
rather than 0.17.8's value of 347bff.
Change-Id: Ic436970e9298ea31f48c6cfdd04b80847aaebbee
For example, MWWikitextTransferRegistry (in .mwcore) expects
ve.init.platform to exist (in .mediawiki).
In normal operation this isn't a problem, but it appears
in some cases (switching to VE from edit source) it can be.
Bug: T144881
Change-Id: Id1a5367472a3f837e7563330dd5220e61adb1889
To align with the linked patch in MediaWiki core. Taking advantage of
the opportunity to use core's messages for these, and remove some dead
wood old messages that were never used like "restore" items in mobile.
Bug: T139033
Depends-On: Ie81b5edd275963a965cd44d0fd325cae9ee2f1a6
Change-Id: Ie00e94cc77cb750a7e8d1104366bb3dad65af8a4
New changes:
14b5fbc [BREAKING CHANGE] Move originalDomElements to the IV store and use MD5
c5d21f0 Provide methods to (de)serialize transactions
Local changes to move originalDomElements to IV store
Depends-On: I8a71c1a40ec35108d0a9a388da6f75632f8dc53c
Depends-On: I32c9b5f984fcf96e3354841ecfcd444149e8f159
Change-Id: I0fbb6324eede94558426178cbdad6b5daf0f8318
New changes:
acf0983 Create SourceSurfaceFragment for editing source documents
8bf0568 Make keepEmptyContentBranches an option of #sanitize and simplify usage
9cad9de ce.Surface: only change selection during CleanupUnicorns if it's in the document
bda3f0b Localisation updates from https://translatewiki.net.
Change-Id: I1fa8af7e4b881238f77e0601b2b275e2b8e1cd2c
Fetch default options for mode, image heights and image widths
rather than hard-coding them.
Bug: T139632
Change-Id: I1adc7987fdeb1258ee87ce46acbab469ea18116e
New changes:
e7cb202 Mark context wrappers as wrappers
20b75af Localisation updates from https://translatewiki.net.
a4dde9f Annotate pasted external text
8148301 Always preserve leading whitespace when converting for clipboard
82a35b7 TransactionProcessor: Apply annotations to ranges at the highest uniform offset
21fc1eb Restore previous selection when annotation inspector is dismissed
358181c Preserve prior valid DOM selections in showModelSelection
a0f7dba build: Bump various devDependencies to latest
0ae0f7e Follow-up Iabec6a6: Fix typo in mousemove selection update code
d69a4df Provide tools to make text bigger or smaller
Local changes for big/small tools
Change-Id: If418a1a47276cc1e1530c4a3ad6784136d8d14f8
Create an ext.visualEditor.mwextensionmessages module in our
ResourceLoaderRegisterModules hook and load them there as available instead.
Bug: T139550
Change-Id: I89e942052f86291085652ae93ae8d10efefb5f44
When our remember-last preference changes work, alongside changing the
label of the edit tab, also change the label of the edit section links.
I seriously have no idea WTF I was thinking back in December when I
put some of this code into #activatePageTarget.
Bug: T137424
Change-Id: I581c0acf0a3ad11ad3bcf4e2e46242907ca9166f
This replaces ve.safeDecodeURIComponent(...).replace( /_/g, ' ' ) . This action
is really specific to the quirks of mediawiki title processing.
Change-Id: Ia9e525c9340e6de9e485355899996c97867ccb48
Make new graphical interface for editing existing
galleries and adding new galleries.
NB The dialog does not yet support rich text in the
image captions, nor does it provide separate fields for
e.g. link, alt text, etc. These are dependent on parsing
the text within the tag, which is yet to be implemented
by Parsoid. For now, these attributes should be
specified in wikitext in the image-specific caption
field.
Bug: T45037
Change-Id: I2b4082e991268241a15b9bbd6d85c94cdc2185f2
New changes:
1cda586 Split about groups on text nodes
7b4619d ve.ui.TabIndexScope: provide a scope for tabIndex
54d7a35 Insert undo breakpoints at word breaks
9e6a562 Use cloneWithData in beforePaste
04c0921 Lower supported Firefox version in stylelint
8e0c513 Update OOjs UI to v0.17.4
Change-Id: I14cf5187954f954fb6039b28fb8b0ee18658fd21
Some code was expecting an associative array with content model IDs
as keys, and some wwas expecting a numeric array.
Make it work more like namespace checks.
Change-Id: I804db88ed4562a6eea2b6723cb5cc8ae39d7c08f
T52720 (link corruption in FF13/14) appears to be fixed.
T52780 (editor not loading in FF11/12) appears to be fixed.
FF11 has a new issue where templates are normalised even
when not touched (T136607)
Change-Id: I34358e3d90b8186e6b89c04c038ab79c908fc81b
The first two are deprecated. Take advantage of this to consolidate the
code and add comments. Note that these config options are not currently
used in WMF production, and might never be used again, depending on how
futher roll-outs go.
Bug: T135071
Change-Id: Ie7638b1aed9f71c19d0735e831956f853201902b
Define $editableContent on target construction, and mark
all non-ancestor nodes between that at the target container
as uneditable (50% opacity, no pointer events).
Bug: T58289
Change-Id: I7fe51104bd5aa1bd53ffc604e5f02752c7553578
New changes:
f50f6a9 Remove directy dependency on stylelint
c45cfeb Add <BDI> support
4e5d312 Update store hashes when modifying items in store during #sanitize
eadc310 build: Bump grunt-stylelint to v0.3.0
a55520f Fix watch path for css
f016c4d Re-clone linear data on each paste
Change-Id: I2a1340261ce1f457f28c34fb1aaec7d4966783ea
This puts IE9 on the greylist, meaning it will open but with
a warning.
Bug: T133094
Depends-On: I817b286e16b7923dd4dd456467466a0128805da1
Change-Id: I55fcbd1b7c4a82e11d61d3b93b4fdb7e992fba1d