Commit graph

1560 commits

Author SHA1 Message Date
James D. Forrester f51a6d5020 stylelint: Drop no-unsupported-browser-features references
The rule hasn't been applied for a while, as it was deprecated upstream.

Change-Id: I7877d0e3bdcd05a609d61add2dc62d7598e348cb
2017-04-10 08:36:37 -07:00
James D. Forrester d1c24ce226 Update VE core submodule to master (da9c49395)
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
2017-04-10 08:32:51 -07:00
Roan Kattouw 445f8b76a0 MWVESwitchPopupWidget: Fix alignment by removing margin
Since the PopupWidget rewrite, margins for aligning popup anchors
should be set on the anchor itself, not on the popup.

Change-Id: If8237ae5edbc2e8c5cb99147f392aae52e642765
2017-04-06 11:50:43 -07:00
jenkins-bot d4438549e5 Merge "ArticleTarget: building summary in source mode, strip links from section titles" 2017-04-05 23:57:18 +00:00
Bartosz Dziewoński c45ad46433 Allow loading progress bar to appear on skins other than Vector and MonoBook
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
2017-04-05 20:13:28 +02:00
David Lynch 758b2fd689 ArticleTarget: building summary in source mode, strip links from section titles
Bug: T162017
Change-Id: I76e96d1e36f7bad0b3e17d8bb842c6ad1172f8cc
2017-04-05 11:16:11 -05:00
James D. Forrester 8463524e18 MWSaveDialog: Run links through a render function for preview & visual diff
Provide a utility funcition in ve.init.mw.LinkCache to do this.

Also use this in ve.ce.MWTransclusionNode/ve.ui.MWPreviewElement, and
introduce to ve.ce.MWExtenionNode

Bug: T73900
Bug: T153535
Change-Id: Ieb9a0274b8c5ae1932c431546f09d18000fa6dd9
2017-03-31 10:51:35 +01:00
jenkins-bot 9e69bd360f Merge "WikEditor switch widget: Fix styling regression since OOui 0.20.1" 2017-03-30 21:31:37 +00:00
Ed Sanders 1b1b95acd4 WikEditor switch widget: Fix styling regression since OOui 0.20.1
Change-Id: I489e45a587e2c10cfb60ade2b5f180f872495324
2017-03-30 22:18:54 +01:00
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
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
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 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
Ed Sanders b756199dc7 Use ve.targetLinksToNewWindow
Depends-On: I3088e8b95d9032b8e8fd5bff58a8b97ffaa15f98
Change-Id: I07ec10841b62ed1e8c3b3cf82b42653327618cb0
2017-03-24 21:34:47 +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
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
Ed Sanders ae780f43ed Fix typo in surfaceReady documentation
Change-Id: I4ae5552000eb6dc160acc4fd2e2b218bf2c7411f
2017-03-22 20:35:42 +00: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
Ed Sanders 1adedfbd8b Disable clickable categories bar in wikitext mode
Bug: T160733
Change-Id: I79b7c880e63675a322b2ada053819b36a175ccbe
2017-03-20 11:07:52 +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
jenkins-bot 0ae808913c Merge "Introduce visual differ in the save dialog" 2017-03-16 21:28:41 +00:00
jenkins-bot 85736d5a7b Merge "Follow-up eb8ba26a: Make MWNoticesTool#setNotices() display its own popup" 2017-03-16 20:14:05 +00:00
Ed Sanders 12c73bc01f Update VE core submodule to master (ef5dc965f)
New changes:
4b94f212e Add tool to change directionality of document view

Bug: T153356
Depends-On: I1e3d89e8250b75d0b6992cf4664e84de66d99bc0
Change-Id: Ic832cc661a0899b1668eb650fb09b66ada54d1ef
2017-03-16 12:42:42 -07:00
James D. Forrester ec5590418e Follow-up eb8ba26a: Make MWNoticesTool#setNotices() display its own popup
Running setNotices( [] ) makes MWNoticesTool run this.destroy() to avoid taking
up extra space in the toolbar when not needed.

Also, make setNotices() bail earlier.

Change-Id: I492fd59a1e15e8f296bf7f03d9b0035c40dafa59
2017-03-16 11:29:34 -07:00
David Lynch eb8ba26adf DesktopArticleTarget: Only try to show notices if some exist
This avoids an OOui deprecation warning for trying to toggle a popup which
isn't connected to anything.

Bug: T160161
Change-Id: I9ad97785f0de4ecf81d189985459689644e25923
2017-03-16 11:35:10 -05:00
Ed Sanders 335b56728a Introduce visual differ in the save dialog
Bug: T143350
Change-Id: I1297d0f4bb87e69be3b50220c1830a22dac1bbae
2017-03-16 15:33:54 +00: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
jenkins-bot 797aac9d88 Merge "ArticleTarget#switchToVisualEditor: Bail if the server won't let you switch" 2017-03-14 16:19:06 +00:00
David Lynch 4864189781 DesktopArticleTarget: Discard edit summary when canceling an edit
Bug: T160130
Change-Id: I2a631b63c3f90bcd60a81312ee031f90dcbf6586
2017-03-14 10:53:21 -05:00
David Lynch a9f54aacd4 DesktopArticleTarget: Clear stored summary value after save completes
Bug: T160130
Change-Id: Id906da69c743f3a966d4182862cd173b26017059
2017-03-10 10:19:12 -06:00
James D. Forrester d1f2bf1ecf ArticleTarget#switchToVisualEditor: Bail if the server won't let you switch
Because otherwise you're just throwing all the user's input on the floor.

Bug: T158692
Change-Id: I5df00842697be11ecde9ea8ba2ab16b0dc90205e
2017-03-09 17:09:16 -08:00
David Lynch 05e2a3119e ArticleTarget: Improve edit summary behavior when switching
Distinguish between the initial summary state, and a value stored from the
summary when switching modes. This lets us avoid overwriting a stored value
when section-editing, or assuming a stored value after a switch was never
edited.

Bug: T159686
Change-Id: Ie7640538140a14bbafd539b3a45928f5c55cf804
2017-03-09 14:23:36 -06:00
jenkins-bot 71fe1a8cea Merge "ArticleTarget: use existing initialEditSummary if present" 2017-03-09 19:12:52 +00:00
David Lynch 261d4e8974 ArticleTarget: use existing initialEditSummary if present
Switching modes recreates the toolbar, so if someone has already edited the
save summary it shouldn't update the initialEditSummary to that.

Bug: T159686
Change-Id: I4109442853916bebae2bce804fcd6777e3eb6d34
2017-03-09 12:05:12 -06:00
David Lynch c5bb912e80 ArticleTargetLoader: wikitext switch shouldn't require FullRestbaseURL
The non-FullRestbaseURL branch didn't handle converting the provided wikitext,
causing data loss when switching from source to visual modes.

Bug: T158692
Change-Id: I283afc4be1e322228d6ec572bfa8542ba8fd9ce7
2017-03-09 11:30:16 -06:00