Commit graph

5754 commits

Author SHA1 Message Date
Ed Sanders 003800f75a Follow-up I88d45aad2: Fix selflink detection
data.title is not set in the cache, use the query title
instead.

Bug: T52497
Change-Id: I6a3047d3c18110052c70277781bc7be6ead2e7b4
2017-03-30 11:56:13 +01:00
jenkins-bot 1dc16af006 Merge "Render self-links as if they were <strong>s" 2017-03-30 09:17:00 +00:00
James D. Forrester cb875a6ccc Render self-links as if they were <strong>s
This is a little inelegant, but it works in both CE and transclusion
content.

Bug: T52497
Depends-On: If058843924c3b30c116df2520aef93a004d98a5d
Change-Id: I88d45aad2aaa45e71b433350986b19764603a1f2
2017-03-29 23:47:01 +00:00
jenkins-bot da05545faf Merge "Replace $wgVisualEditorSupportedSkins with a check for required elements" 2017-03-29 23:14:53 +00:00
Ed Sanders 6d891dc049 Pass section when resolving conflicts in NWE
Bug: T154217
Change-Id: I61f69df228fcbe25840b166a2081cacdb0417431
2017-03-29 22:21:17 +01:00
Translation updater bot 9e893b715b Localisation updates from https://translatewiki.net.
Change-Id: I4adc48e289d109cbde9c890551bdcb8314afa88f
2017-03-29 22:50: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
jenkins-bot 11f562c4e2 Merge "Don't use '#content #firstHeading', unnecessarily specific" 2017-03-29 18:02:22 +00:00
Bartosz Dziewoński 645eb8e543 Don't use '#content #firstHeading', unnecessarily specific
Simply '#firstHeading' does fine.

Change-Id: I7c72496f0d58b86582bd33c018b618e1b75f2c7a
2017-03-29 17:37:29 +00:00
Bartosz Dziewoński 38db8bbe0e Consistently use #catlinks to refer to category links container
The element has both the class and the id set to 'catlinks'. This is
just for consistency, I have no preference on which to use.

Change-Id: Ic96b0f21fe790d0aa03bfd6366ba246e8493a038
2017-03-29 17:36:58 +00:00
David Lynch 1f1be831c0 Add template: don't try to add invalid templates when enter is pressed
Bug: T161715
Change-Id: I12eabe3588fbcbed0fa18b94de7de7239ba490c2
2017-03-29 10:53:17 -05:00
Translation updater bot f5d6ab9aa7 Localisation updates from https://translatewiki.net.
Change-Id: Iade5455bc90d8ba51dc481b7a4e9ac82ed2cc1e3
2017-03-28 23:03:46 +02:00
jenkins-bot 16918a08cf Merge "ve.init.mw.ArticleTarget: Don't construct element IDs dynamically" 2017-03-28 17:23:11 +00:00
Bartosz Dziewoński 6a9f8a1417 ve.init.mw.ArticleTarget: Don't construct element IDs dynamically
Easier to find the usages this way.

Change-Id: I38ce1389af1d30ff1f5e0214b68d094a67da046f
2017-03-28 19:01:46 +02:00
jenkins-bot efc0cad89e Merge "MediaDialog: flag caption widget as being in a dialog" 2017-03-28 16:57:22 +00:00
David Lynch 9e86d17260 MediaDialog: flag caption widget as being in a dialog
This means that cmd+enter won't add a newline when it closes the dialog.

Bug: T161555
Change-Id: I738c9acf8cce437ce6bc4c8db29f28d1fff3d2c9
2017-03-28 11:43:59 -05:00
jenkins-bot d3df69ee99 Merge "ve.init.mw.DesktopArticleTarget: Refactor redirect interface handling" 2017-03-28 16:41:40 +00:00
jenkins-bot 3d9b2fbd8a Merge "DesktopArticleTarget: Make the waiting module list extensible" 2017-03-28 15:59:02 +00:00
jenkins-bot 0dfe429a1e Merge "ve.init.mw.DesktopArticleTarget: Hide redirect subtitle if we cancel editing" 2017-03-28 15:43:09 +00:00
Bartosz Dziewoński 0462b6ed8f ve.init.mw.DesktopArticleTarget: Refactor redirect interface handling
Redirect pages have two extra things not present on normal pages:
* Redirect subtitle: the "Redirect page" shown under the page heading.
* Redirect page content header: the "↳ Foo" at the beginning of content.

Our handling was pretty messy and had some bugs (T161614).

Notable behavior changes:
* Update 'wgIsRedirect' in mw.config after saving the page.
* Use #mw-content-text rather than .mw-jump for inserting the fake .redirectMsg.
  .mw-jump is not guaranteed to exist on the page (it's a skin feature).
* Never replace the real .redirectMsg existing on the page, except by the
  new HTML after a page is saved. Our fake is separate now.

Bug: T161614
Change-Id: I96a5e45a71bf10bf6a2b501dc0cf81e6c37060ec
2017-03-28 17:40:23 +02:00
Bartosz Dziewoński d905d705ce ve.init.mw.DesktopArticleTarget: Hide redirect subtitle if we cancel editing
To reproduce: start editing a page, turn it into a redirect,
cancel editing and go back to view mode. The "Redirect page"
subtitle under the page title should disappear.

Note that #redirectsub is correctly spelled all lowercase,
unlike #contentSub.

This reverts commit 0e1bc7309b
and fixes the code instead.

Change-Id: Ibacd73122dfec63268a77794bc77c4b88876d3ee
2017-03-28 01:31:29 +00:00
jenkins-bot 57d57cdbbf Merge "ve.init.mw.DesktopArticleTarget: Remove unused code" 2017-03-28 00:50:50 +00:00
Bartosz Dziewoński 0e1bc7309b ve.init.mw.DesktopArticleTarget: Remove unused code
As it happens, #redirectsub is correctly spelled all lowercase,
unlike #contentSub. This line does nothing. We remove #redirectsub
correctly elsewhere; I don't think this was ever meant to be here.

Follows-up 96421b283c.

Change-Id: I3e4c6eb2ff94f363b488477b3ddd248e571e723a
2017-03-28 00:39:38 +00:00
Translation updater bot 2f5998000e Localisation updates from https://translatewiki.net.
Change-Id: I922c40abd3ed0ae819f9e59c63c40a0159e09eaa
2017-03-27 23:48:36 +02:00
Translation updater bot d9a3ab6c1b Localisation updates from https://translatewiki.net.
Change-Id: Id8ea802cf94dbdb58777adc559758795080a50ee
2017-03-26 22:48:21 +02:00
Ed Sanders 4ac660ad48 Defer rendering of visual diff until tab is selected
Bug: T161355
Change-Id: I718a92f4c9f8c3a48e359da898ede7dccebcec5e
2017-03-25 13:23:28 +00:00
jenkins-bot 34552aba9d Merge "Use ve.targetLinksToNewWindow" 2017-03-24 23:56:51 +00:00
jenkins-bot 34fa4dcda6 Merge "Use original title or normalized title when inserting link text" 2017-03-24 22:27:33 +00:00
Ed Sanders 738d3aff47 Use original title or normalized title when inserting link text
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
2017-03-24 22:16:31 +00:00
L10n-bot 3cbf2f8078 Merge "Localisation updates from https://translatewiki.net." 2017-03-24 22:03:31 +00:00
Translation updater bot cb6884136c Localisation updates from https://translatewiki.net.
Change-Id: Ic4b43e99dddd8e74ee58ba4a00fc34c3cbeb0681
2017-03-24 23:03:24 +01:00
jenkins-bot 09b0340c90 Merge "Apply the 'external' link class hack to MWPreviewElement" 2017-03-24 21:55:40 +00:00
Ed Sanders b756199dc7 Use ve.targetLinksToNewWindow
Depends-On: I3088e8b95d9032b8e8fd5bff58a8b97ffaa15f98
Change-Id: I07ec10841b62ed1e8c3b3cf82b42653327618cb0
2017-03-24 21:34:47 +00:00
Ed Sanders c485bd4fce Apply the 'external' link class hack to MWPreviewElement
Change-Id: I3ccea9a72f812e73bdc4d8d34635671dfd493be4
2017-03-24 18:53:08 +00:00
James D. Forrester 79b7d0305a *ArticleTarget: Don't trust oldid in the query string, it lies
Bug: T156998
Change-Id: Iacb94710c8f2f5fbd8d3de9c8a44424aba0c7d02
2017-03-24 00:30:00 +00:00
Translation updater bot e8bd893e93 Localisation updates from https://translatewiki.net.
Change-Id: I6463f2e4c50274718ae3bfa80e557be5dcca4d65
2017-03-23 23:03:48 +01:00
jenkins-bot 21ec4e87a9 Merge "Section editing: strip links from heading text used for edit summary" 2017-03-23 18:45:07 +00:00
jenkins-bot 0869a70cfa Merge "Fix typo in surfaceReady documentation" 2017-03-23 18:09:40 +00:00
jenkins-bot 0bb9bd5aa3 Merge "ve.dm.MWImageNode#describeChanges: Ignore borderImage noise from the model" 2017-03-23 16:11:07 +00:00
jenkins-bot e573a5f444 Merge "ve.ui.MWGalleryDialog: Don't die if the dropdown menu doesn't have a value" 2017-03-23 15:55:16 +00:00
James D. Forrester c70526f0a2 ve.dm.MWImageNode#describeChanges: Ignore borderImage noise from the model
Also follow-up 335b56728a by adding the visualeditor-changedesc-align
i18n which was missed.

Change-Id: I801f66c0028f71cf2cdbcb8f1675ba1f5a3cde31
2017-03-22 17:28:41 -07:00
L10n-bot c0c2e5d9c1 Merge "Localisation updates from https://translatewiki.net." 2017-03-22 22:10:38 +00:00
Translation updater bot fe5488bd82 Localisation updates from https://translatewiki.net.
Change-Id: Id53d79ec3c6ace2db8a3a39a039396c80899cafa
2017-03-22 23:10:31 +01:00
jenkins-bot 628852c3bc Merge "ImageCaptionNode: correct documentation typo" 2017-03-22 21:42:48 +00:00
jenkins-bot 048aaa7fb4 Merge "Connect onModelUpdate to the right view node" 2017-03-22 21:18:16 +00:00
Thalia 1f2655ce1a ImageCaptionNode: correct documentation typo
Change-Id: Ic6e66e82662ec2fbf673062a0b3bc1087c54c4c7
2017-03-22 21:10:47 +00:00
Ed Sanders ae780f43ed Fix typo in surfaceReady documentation
Change-Id: I4ae5552000eb6dc160acc4fd2e2b218bf2c7411f
2017-03-22 20:35:42 +00:00
Ed Sanders 9526bcf6a1 Connect onModelUpdate to the right view node
Pretty sure this event does nothing for block images, but
if we are going to bind, bind the the ce caption node, not
the ce image node.

Change-Id: I02b5500f381e932efba87d61ccdf668cda377757
2017-03-22 20:33:55 +00:00
James D. Forrester 555aba7fe8 ve.ui.MWGalleryDialog: Don't die if the dropdown menu doesn't have a value
Bug: T160967
Change-Id: Ic83e204eb5c2d14baadf0e450a27ce836337b983
2017-03-22 13:49:49 -05:00
David Lynch 1dc18b6703 Section editing: strip links from heading text used for edit summary
Stops us including "[edit]" in the summary when people have marked whole
headings for translation.

Bug: T160911
Change-Id: I906398e6bf45433d904795847f59b5bf0148092f
2017-03-22 02:00:24 -05:00