Commit graph

391 commits

Author SHA1 Message Date
James D. Forrester 84ec8739e3 Update VE core submodule to master (3b8a164a3)
New changes:
c61044a89 tests: Cover LinkAnnotation#getFragment()
a18e7bd75 tests: Cover <bdi> tags
4e6b991e2 VisualDiff: Don't describe internalItem changes
572ca6d09 VisualDiff: Don't try to render empty node changes
f794e511e LinkAnnotation: fix getFragment behavior
a5deb2b73 tests: Test rich annotations' describeChange()
88e1493a9 [BREAKING CHANGE] QUnit: Remove all code for counting tests
bbabdc425 Remove eslint:fix
31e6b40ce ve.dm.ElementLinearData.test: Cover getAnnotationIndexesFromOffset
97f7eda77 Transaction#isNoOp: Simple code is simple
dd97c627b MergeCellsContextItem: Make sure we're on a TableSelection

Bug: T163945
Bug: T164199
Change-Id: Iba64f64373e05f2dbe56d07dc9e8a8fe282887a9
2017-05-01 11:31:21 -07:00
Ed Sanders cd8b059e7d Synchronise VE availability checks in frontend and backend
Adds better support for NWE loading on action=edit.

Change-Id: I35208cce0696607377378a1b58d426e914a3ba7d
2017-04-28 17:45:27 +01:00
Ed Sanders fefb76eebc Rewrite logic for choosing initial editor
Expanding from a single if-expression lets us make the
code much more readable, and reveals some minor bugs.

Change-Id: I49e57bfc093e019c837a73eab5c25fdbd14de0af
2017-04-26 12:07:51 -07:00
jenkins-bot babba81a66 Merge "Fix logic for redirecting unsupported browsers to old editor" 2017-04-19 21:45:44 +00:00
jenkins-bot 459dac8de2 Merge "Make onUserLoggedIn() check read-only mode" 2017-04-19 18:03:05 +00:00
Aaron Schulz e7f430e5a0 Make onUserLoggedIn() check read-only mode
Also try to defer the master connection to post-send.

Change-Id: I6c8f5b2e48493cd09de3c93604b3a546d7fa1454
2017-04-19 08:15:06 -07:00
Bartosz Dziewoński 21bd2a5b18 Fix logic for redirecting unsupported browsers to old editor
Browsers that support JavaScript, but that get served a no-JS
experience by MediaWiki (for example, IE 6), would always get
redirected to an URL with &venoscript=1 - even when it was unnecessary
because we're not in single-tab mode, and even when the form was
previously submitted, causing the loss of user input.

Follow-up to 188ec0f5d2.

Bug: T163226
Change-Id: I212baa0f4305559fa6f6abdfa230b76c122d4909
2017-04-18 20:05:25 +02:00
Bartosz Dziewoński ae8b0a1f36 Replace $wgVisualEditorSupportedSkins with a check for required elements
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
2017-03-29 18:13:05 +00:00
David Lynch 217640624a DesktopArticleTarget: Make the waiting module list extensible
So that GlobalCssJs and other extensions can hook in.

Bug: T156899
Change-Id: I045c7b045ce28047298b28a05e77ef27749c1ee1
2017-03-16 17:48:03 -07:00
James D. Forrester c07a6df74c Don't load VE or NWE on lint-targetted pages (until that works)
Bug: T160102
Change-Id: Ibb364ff2d89975d5907fa887cca666eee6e78d37
2017-03-15 14:23:17 -07:00
Ed Sanders f51d86df20 Update VE core submodule to master (8211ebc70)
New changes:
c99e7f0b6 Diacritic insensitive search in find & replace dialog

Bug: T154195
Depends-On: I95eb851c10a44e18382a6a4a0cb22559db6752b7
Change-Id: I6b74fc3dbaa27de67a565a3c2c6bf8a951b24364
2017-02-28 16:30:22 -08:00
James D. Forrester 667dc5231b Allow the signature button to work in NWE as well as VE
Previously we were only letting the button work in VE-enabled namespaces,
which means that on namespaces where you can use NWE but not VE (oh, you
know, most of them) the signature button was always disabled, which was
somewhat discombobulating.

Bug: T159211
Change-Id: I4ffffb3a7e14df78a45a6e3afa49718c0329ca55
2017-02-28 13:38:26 -08:00
James D. Forrester 3302ba9203 Update VE core submodule to master (c1884680a)
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
2017-02-09 08:46:29 -08:00
Ed Sanders 1d7f929a91 Update VE core submodule to master (139bdf7)
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
2017-01-29 18:50:47 +00:00
WMDE-Fisch 5852080e74 Add missing return in doc block
Change-Id: Ia1f23c19c3ae26fce45d7ebdaafe91012b1684f1
2017-01-27 11:11:40 +01:00
jenkins-bot a973528d67 Merge "Don't block VE/NWE from loading if 'editintro' is specified" 2017-01-03 20:13:29 +00:00
James D. Forrester 122f49b2dd build: Bump file copyright notices for 2017
Change-Id: I3c20809e71cc0da58123e1b5f29c4f3aac945496
2017-01-03 08:58:33 -08:00
Ed Sanders fe85ee1ba6 Don't block VE/NWE from loading if 'editintro' is specified
Later we should actually show the edit intro, but that is a
separate issue (T56029).

Bug: T153481
Change-Id: I97622a3d86b975866305aaa745bac51f6b55f217
2016-12-31 15:22:11 +00:00
Alex Monk 807cb6b54e Move NWE URL changes into JS
Bug: T148077
Change-Id: Ic9b94184a48026254cf4a0a812fe6fc8455841b5
2016-11-11 18:31:22 +00:00
Alex Monk 7c80976f5b Remove 'vesection' parameter
Just use the normal section parameter, haven't been able to figure out why VE
would need to be special about that.

Bug: T149958
Change-Id: I9338d0f1498fbb579fa8c340d6e7274c6d48155b
2016-11-05 02:08:13 +00:00
jenkins-bot 64f85a2ef7 Merge "Cleanup dependency graph" 2016-11-02 21:33:45 +00:00
jenkins-bot 65236ae67f Merge "Try to make client and server code to get last editor work the same" 2016-11-02 20:07:07 +00:00
Ed Sanders 0304b7e730 Cleanup dependency graph
* Remove mwsig's direct dependency on core. Everything depends on core.
* Remove language from 'experimental', it isn't anymore.

Bug: T145139
Change-Id: I28b6e95f32d6276956269e24222586f49567e706
2016-10-31 17:26:53 +00:00
Alex Monk 70bf00e9b0 More NWE-SET integration fixes
Also stop calling $skin->getUser() so much, store the result

Change-Id: Ic91a660bc4b97a82f1d2b0bffb55425564696da1
2016-10-13 22:46:16 +01:00
Alex Monk 418bd32217 NWE: Use a different change tag to the visual editor
Bug: T147587
Change-Id: If9b466ff8449ceeb0e71f9d36ea0b4ec8c1bae2d
2016-10-12 01:11:15 +01:00
jenkins-bot c7399b5ab9 Merge "When we have multiple tabs and NWE enabled, set the edit tab's URL to NWE" 2016-09-30 20:49:54 +00:00
cenarium 0dfadc057d Use RecentChange::addTags rather than ChangeTags::addTags
To avoid consecutive DB writes on changetag table.
See I8df2fd983c12632337e8d2922fa357808482338c

Change-Id: I246b26ff1506b0ba82ef4eb08e06e3ef59ff8cad
2016-09-28 00:33:48 +02:00
Alex Monk dd1e4cf8fb When we have multiple tabs and NWE enabled, set the edit tab's URL to NWE
For middle click/ctrl+click

Bug: T146323
Change-Id: I66d75d222cad2183beebd49759a35ee8d85969b2
2016-09-24 23:40:27 +01:00
Ed Sanders e56ed2274d Only show NWE beta feature if enabled in config
Change-Id: Iaa2e3620ab15ece136fe425e61b72f33c8d2f4b4
2016-09-21 13:24:04 -07:00
David Lynch 5bc54fd036 dm.MWInternalLinkAnnotation: Add some test cases
Change-Id: Ie338d5538959ea2cc296886b623e9dc2cd84fa8f
2016-09-21 09:57:45 -07:00
jenkins-bot 0e8e7d17eb Merge "Avoid RequestContext::getMain()" 2016-09-16 16:41:44 +00:00
jenkins-bot 6ca113a83f Merge "Remove unused ContentHandlerDefaultModelFor hook" 2016-09-16 16:40:27 +00:00
Kunal Mehta b42292fa0b Avoid RequestContext::getMain()
Change-Id: I7802ad88ec7a86d2323f3c582cadf8d80d53ab7d
2016-09-15 18:17:51 -07:00
Kunal Mehta 04f2027d77 Remove unused ContentHandlerDefaultModelFor hook
This was supposed to be removed in 7f02824ec4 except it got missed
somehow...

There was nothing registering it in extension.json, so it was entirely
unused.

Change-Id: I991c464ef0b60543a0ecd4cb1f9dda62e9d73dd4
2016-09-15 18:17:40 -07:00
James D. Forrester 59bd5393dc Don't allow auto-enroll of new wikitext editor Beta Feature
Change-Id: Icc8e27a8e2a7d88fbbdeaf31b1ef8a5f5c85311f
2016-09-13 14:52:25 -07:00
jenkins-bot 9721998763 Merge "Provide the new wikitext editor as a beta feature" 2016-09-13 00:56:48 +00:00
James D. Forrester 1d64e3280c Provide the new wikitext editor as a beta feature
Still needs to be de-feature-flagged later.

Bug: T142644
Change-Id: I8e2588909ff95085b5a4d58f4394d9bc805f5598
2016-09-08 00:38:08 +00:00
James D. Forrester 5788252c2c Switch constant from deprecated DB_SLAVE to DB_REPLICA
Change-Id: I04ba5cb3844942a9dcfb71a14ff944f29ef8d8d0
2016-09-07 12:14:07 -07:00
James D. Forrester ba4532aa9d Rename EditButtonPublishNotSave to EditSubmitButtonLabelPublish
Depends-On: I4fbe54876095378a476399bf5e336c8df3e91e14
Change-Id: Iface24f77775216a0ab9eb464e7e10624af7719d
2016-08-29 10:46:49 -07:00
James D. Forrester deef47414a Vary the 'save' labels to 'publish' for public wikis
Bug: T131132
Change-Id: I4a497265661d5ce0f6144988b514509dfa1bddfd
Depends-On: I56634ed223778a0650cf36ac7256151b13c494f1
2016-08-25 09:37:52 -07:00
Aaron Schulz 5f8dfc4b8f Defer preferences update and avoid CAS errors in onUserLoggedIn()
Bug: T143367
Change-Id: I9509f6ef565d9953f9c05b00b02b57098eef9e3a
2016-08-18 16:11:52 -07:00
Ed Sanders c452e134cc Wikitext surface alpha feature
Edit wikitext with the VE interace.

Bug: T104479
Bug: T142138
Change-Id: Ic95b47e0dd378578555c4a2342ca9c87064ed1d5
2016-08-12 18:37:29 +00:00
Thalia d156af59aa Fetch default options for gallery dialog
Fetch default options for mode, image heights and image widths
rather than hard-coding them.

Bug: T139632
Change-Id: I1adc7987fdeb1258ee87ce46acbab469ea18116e
2016-08-05 14:08:20 -07:00
jenkins-bot 8bbfeb08b9 Merge "Don't depend on captcha extension messages in ext.visualEditor.mwcore module" 2016-07-27 16:35:52 +00:00
Alex Monk c1e14db757 Don't depend on captcha extension messages in ext.visualEditor.mwcore module
Create an ext.visualEditor.mwextensionmessages module in our
ResourceLoaderRegisterModules hook and load them there as available instead.

Bug: T139550
Change-Id: I89e942052f86291085652ae93ae8d10efefb5f44
2016-07-12 21:08:59 +01:00
Alex Monk 16c38ec27a DAT.init#setEditorPreference: Change section edit alongside tab labels
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
2016-06-30 10:22:44 +00:00
jenkins-bot 81f9eb7c2f Merge "When logging in, if VEE cookie is set, change the user's preference to match it" 2016-06-29 12:20:12 +00:00
Tpt 2a2a041933 Allow extensions to register a specific target per content model
Bug: T138489
Change-Id: Ic9d2fa34b90afc58f7e31adf38f97a701aac64f9
2016-06-24 15:38:28 +00:00
Alex Monk b471ef3868 When logging in, if VEE cookie is set, change the user's preference to match it
Bug: T133304
Change-Id: I9660cfc7b0e980192dd063f44d32d04cf34b1d6d
2016-06-20 22:15:40 +01:00
Ed Sanders 6ee6ac7bdf Make namespace and content model lists extensible
This should really be done automatically by resource loader,
but merging only works on globals. We use this same hack
for plugin modules.

Change-Id: I5f729ddb6146565dc839f60353ac8fa5b2a29ca8
2016-06-01 09:29:34 -07:00