Commit graph

16529 commits

Author SHA1 Message Date
Bartosz Dziewoński 3458d8a27e Don't offer switching to VE if it's disabled in preferences
In many places we check whether VE is available before doing things
(init.isVisualAvailable). This variable includes checks for whether
the page is wikitext, etc. Now it will also include checking whether
VE is enabled in user preferences.

In almost all places where init.isVisualAvailable is used, we were
already also checking if VE is enabled, so this doesn't affect the
behavior. But notably, we didn't do it when showing the option to
switch to VE in the welcome dialog and in the toolbar, causing T243723.

Changing init.isVisualAvailable this way makes it consistent with
init.isWikitextAvailable, which has always included a checking whether
NWE is enabled in user preferences.

Bug: T243723
Change-Id: Ie174bc3f16bceb29cb155b9223e0acef70167fd6
2020-01-28 16:26:03 -08:00
Bartosz Dziewoński 0791dd352d Fix tab initialization if NWE is enabled but VE is disabled
Bug: T178976
Change-Id: I16b7ef564e8c28c0c583c724ffb482b2c9fcbadb
2020-01-28 16:26:03 -08:00
Bartosz Dziewoński 5c8d04afdb Disallow switching in NWE welcome dialog if VE should be unavailable
When NWE is enabled but VE is supposed to be unavailable on the page
(e.g. in talk namespaces), do not show the option to switch to VE in
the welcome dialog.

This is relevant if new users use NWE, due to config like below
(we use this on WMF Office wiki):

    $wgDefaultUserOptions['visualeditor-newwikitext'] = true;

Change-Id: Iee8c3d3604a13dcd20efa713e49461ba9b885749
2020-01-28 16:26:03 -08:00
Bartosz Dziewoński 36c2cb90ab Allow switching in welcome dialog on mobile
This code works perfectly on mobile now, I believe change
4fb17205b6 fixed that.

Note that the dialog is currently never shown due to the override
in MobileArticleTarget, but I tested after removing it.

Change-Id: I305a01fc78366a3d2d13662e6d71711864e0dffc
2020-01-28 16:25:53 -08:00
Translation updater bot ff6c7ec702 Localisation updates from https://translatewiki.net.
Change-Id: I7763599de42e8d33c3c0a83f55ce50592e3d0a4b
2020-01-28 08:26:55 +01:00
libraryupgrader 1baeb9ef0c build: Updating composer dependencies
* mediawiki/minus-x: 0.3.2 → 1.0.0
* mediawiki/mediawiki-phan-config: 0.9.0 → 0.9.1

Change-Id: Ibf55f382c586603967da0086f86bfe4924e7cf96
2020-01-26 18:27:39 +00:00
Ed Sanders 62145b11e6 Fix variable scope in ArticleTargetSaver
Also fix docs

Change-Id: Ida47968c995166b1dca36fc9fe28fac374010564
2020-01-24 15:32:46 -08:00
jenkins-bot 2abe5931e9 Merge "Update VE core submodule to master (13a8f4092)" 2020-01-24 22:21:42 +00:00
Translation updater bot 4984b3d7da Localisation updates from https://translatewiki.net.
Change-Id: I0898365c628b60cbd351a806fd0297fe60c0b71f
2020-01-24 08:16:00 +01:00
James D. Forrester e73ecef638 Update VE core submodule to master (13a8f4092)
New changes:
b609a378c Localisation updates from https://translatewiki.net.
908602288 Localisation updates from https://translatewiki.net.
13a8f4092 Update OOUI to v0.36.3

Change-Id: Ib615394fac35a007d98eca80468a256912f0bcce
2020-01-23 16:26:06 -08:00
Translation updater bot ac8dbe8363 Localisation updates from https://translatewiki.net.
Change-Id: Ia2455634fb322b3a30a3b1f416f118b00d0aa447
2020-01-22 08:30:56 +01:00
Translation updater bot 37ba2c223a Localisation updates from https://translatewiki.net.
Change-Id: Ice1e8344729a4a505205ad3c2cea31f00ea7844e
2020-01-21 08:17:20 +01:00
Translation updater bot 22f99583b5 Localisation updates from https://translatewiki.net.
Change-Id: Ie8ff32ca1c0c60536177635c2dac13e2d76a54e9
2020-01-20 08:51:05 +01:00
libraryupgrader 63fa79a946 build: Updating jakub-onderka/php-console-highlighter to 0.4.0
Change-Id: I668a20ccee89a7822d6cb3fe6001d865ee266f0d
2020-01-17 05:29:10 +00:00
Bartosz Dziewoński f708ff907b Update VE core submodule to master (eb68d80cb)
New changes:
d9eb26ac7 Localisation updates from https://translatewiki.net.
c9478e729 Localisation updates from https://translatewiki.net.
b71e36065 build: Upgrade stylelint-config-wikimedia from 0.7.0 to 0.8.0
eb68d80cb ve.ce.Surface: Fix copy-pasting `display: inline` lists into NWE

Bug: T239550
Change-Id: Ib12500c4e9e2a31bba3ea9f19931b211559dc767
2020-01-17 01:28:19 +01:00
Bartosz Dziewoński a9066989f2 ApiVisualEditor: Refactor edit notice code
* Query permission errors for 'edit' and 'create' in the same way,
  and consistently with how MediaWiki core EditPage does it.

* Prefer using Title::getUserPermissionsErrors() instead of custom
  code for user blocks. The result is the same, except for an extra
  line like "You do not have permission to edit this page, for the
  following reason:".

  Note that this loses the 'type' => 'block' property on each notice,
  which was previously used to track when a block notice was shown.
  This was however removed in 96de1353d3,
  and could probably be re-implemented by using the root 'blockinfo'
  property anyway.

* When Title::getUserPermissionsErrors() returns multiple messages
  (for example, you're blocked *and* the page is protected),
  display them all in a list instead of only the first one, using
  OutputPage::formatPermissionsErrorMessage().

  That method returns wikitext, which we have to parse ourselves. This
  is a bit silly, but I found this approach in SpecialChangeContentModel
  in MediaWiki core, so it should be fine.

Change-Id: Ifaf95d8aab836e45665b1fbdf98dd1980a867d8c
2020-01-17 01:18:46 +01:00
Bartosz Dziewoński ac36b242c3 Pass the "count" parameter to 'cascadeprotectedwarning'
It will now correctly say "page" instead of "pages" when there is just one.

Change-Id: I7be6368da977a7eeba976ca63134efce3db1e01a
2020-01-17 01:17:30 +01:00
Bartosz Dziewoński 18c899374b Display log entry underneath 'titleprotectedwarning'
The message ends with "The latest log entry is provided below for
reference:", but we were not providing it. Use the same code as
'protectedpagewarning' and 'semiprotectedpagewarning', which behave
the same.

Change-Id: Ibe5463aa3d93cd1d6d6e3c0b9da82bfa2c813f86
2020-01-17 01:08:12 +01:00
jenkins-bot 523e9379c2 Merge "ApiVisualEditor.php: Add notices also when not blocked" 2020-01-16 23:29:36 +00:00
Translation updater bot 6d5b9c31dd Localisation updates from https://translatewiki.net.
Change-Id: Ia68d5015e3816268fa770270827d1130b53b92f2
2020-01-15 09:54:22 +01:00
Translation updater bot 24480a24bd Localisation updates from https://translatewiki.net.
Change-Id: I4ab6ba49c3319a880c9a8df293c2e1d4cd43afe5
2020-01-14 10:59:54 +01:00
Translation updater bot a335e3acdf Localisation updates from https://translatewiki.net.
Change-Id: I917f992c01e252317149598a1ba30156b113a4a9
2020-01-13 09:12:32 +01:00
Umherirrender a7497703a7 Fix new documentation sniffs
Change-Id: If9fc2d1d29aefdcb61a5f69c28f7d50c86b3ac4a
2020-01-10 16:28:16 -08:00
libraryupgrader 6afa14fe4d build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag

Change-Id: If59d450236a7d1afa3c6a05536abea819535f984
2020-01-10 17:51:43 +00:00
jenkins-bot 9e6a40a827 Merge "Use mw.Api#getErrorMessage instead of custom handling" 2020-01-10 14:22:14 +00:00
Translation updater bot a09935cc41 Localisation updates from https://translatewiki.net.
Change-Id: I281f83f9442ad20b8f2d67dc673c64a509d29181
2020-01-10 08:34:54 +01:00
James D. Forrester 3f9bd6bf54 Update VE core submodule to master (57689b9ed)
New changes:
b90385a44 Update OOUI to v0.36.2
95cf15506 doc: Point to gerrit, not Phabricator Diffusion
57689b9ed doc: Update copyright statement for new year

Change-Id: I3edd80c990101e4ba33163b1da5a45c300654977
2020-01-08 16:45:10 -08:00
jenkins-bot bc2204b6c0 Merge "Add handling for mw:DisplaySpace" 2020-01-08 22:26:08 +00:00
James D. Forrester 2c77e88d2c doc: Bump copyright year for 2020
Change-Id: I30539877543dc2a57bd1428a00d10ac46d8fc294
2020-01-08 09:13:24 -08:00
Translation updater bot 2ab5aef421 Localisation updates from https://translatewiki.net.
Change-Id: Ib450dc57902a8d86f1ee90a20695e6f551ae1c9a
2020-01-08 08:43:15 +01:00
Bartosz Dziewoński 8341f96217 Add handling for mw:DisplaySpace
It's supposed to be non-editable but deletable text, like mw:Entity.
We decided to handle them this way in 2015 but never implemented it
(T94509). Currently, accidentally editing text inside of
mw:DisplaySpace node causes the changes to be lost when saving.

Bug: T241906
Change-Id: I78a0cc7a75061a7eefb8b677898b5756326615d6
2020-01-08 01:40:12 +01:00
libraryupgrader 4637b224b4 build: Updating npm dependencies
* grunt-stylelint: 0.12.0 → 0.13.0
* stylelint-config-wikimedia: 0.7.0 → 0.8.0

Additional changes:
* Added .eslintcache to .gitignore.

Change-Id: If99039fc56e5090e4eab9aaef4b5bd395703938f
2020-01-07 09:54:44 +00:00
James D. Forrester 924d7cc81f Update VE core submodule to master (6006b2c6e)
New changes:
69ac0debb Localisation updates from https://translatewiki.net.
d963d023c Localisation updates from https://translatewiki.net.
6575ffc1a Fix CodeMirror overlay alignment on new lines
9599ffd38 Localisation updates from https://translatewiki.net.
987a8ad84 Localisation updates from https://translatewiki.net.
6006b2c6e Localisation updates from https://translatewiki.net.

Bug: T198278
Change-Id: Ib399cb8df6df196e1a29038c78c04f89e1b2059b
2020-01-06 16:06:59 -08:00
jenkins-bot 3e3a84f9b6 Merge "Fix 2017WTE change tag for edits that blank the page" 2020-01-06 18:30:29 +00:00
lens0021 a01f28c8a3
ApiVisualEditor.php: Add notices also when not blocked
Bug: T241693
Change-Id: I2c4355f7a2398b742d635f1de0cf87d4ec527cb3
2020-01-06 17:41:17 +09:00
Translation updater bot 5ec81c5069 Localisation updates from https://translatewiki.net.
Change-Id: Id966da96f871c9bb4d14e702b56c24dd883b9341
2020-01-06 08:51:12 +01:00
Bartosz Dziewoński 54f2ba68d7 Fix 2017WTE change tag for edits that blank the page
Bug: T241797
Change-Id: I5c843f7ebcffba720f3dd0564947c197a76cf82e
2020-01-03 08:49:44 +01:00
Translation updater bot 0b7dc6686a Localisation updates from https://translatewiki.net.
Change-Id: Ibf43db6187bc504b75c389b2a022f6712a168341
2020-01-02 09:00:25 +01:00
Translation updater bot 85f0f7cbf7 Localisation updates from https://translatewiki.net.
Change-Id: I1d1a6b8bdb8509001816e0c38694b1124166a717
2019-12-29 20:42:41 +01:00
Translation updater bot 208f7d72bb Localisation updates from https://translatewiki.net.
Change-Id: I9cf1085b6b79e5be2ea8f75adf4768d2f9cd334b
2019-12-26 16:22:32 +01:00
Translation updater bot a1fb5abda3 Localisation updates from https://translatewiki.net.
Change-Id: Ic41a81816ae84a904f9c21abc373024649935ff4
2019-12-24 10:03:50 +01:00
Translation updater bot f4fb6fc356 Localisation updates from https://translatewiki.net.
Change-Id: I7aeff0bfc6025b868490f9744a02c4163455d98b
2019-12-22 17:42:00 +01:00
Ed Sanders 8e20c1c66b Update VE core submodule to master (6bed6aaa5)
New changes:
06ad0c769 git-build: Fix name of grunt.log.error
6bed6aaa5 CommentAnnotation: Replace 'reply' with 'comment'

Change-Id: If7e298eaafdd7cf9ab07b6314cb9c214a2072229
2019-12-20 16:22:33 +00:00
jenkins-bot b25902b123 Merge "Fix Special: title in ApiVisualEditorEdit" 2019-12-20 16:11:47 +00:00
jenkins-bot 7452bcca73 Merge "rebaser: Add missing message" 2019-12-20 15:52:36 +00:00
Ed Sanders 21b676452e Fix Special: title in ApiVisualEditorEdit
We also do this in ApiVisualEditor.

Change-Id: I5c27c6e7770d0a5093684cadeaf1786f85dc32ff
2019-12-20 15:50:48 +00:00
jenkins-bot cf6ccfd058 Merge "MobileArticleTarget: Find DOM nodes after early return" 2019-12-20 15:47:39 +00:00
Ed Sanders 90eb775978 rebaser: Add missing message
Change-Id: Id9fbbe47d0e886a235d5fcafefcb768e8c28e666
2019-12-20 15:38:13 +00:00
Ed Sanders edacc5bf65 MobileArticleTarget: Find DOM nodes after early return
No point running this jQuery search if we are about to return

Change-Id: I2240d4a15abbf7deb9b1f77154f299bd0d97ae18
2019-12-20 15:30:43 +00:00
Ed Sanders f2a5c10dee Update VE core submodule to master (0aa09c12e)
New changes:
0aa09c12e Make CommentAnnotation use replyable threads

Change-Id: Idaadecace168a0c19741a231b887578274902a86
2019-12-20 14:57:14 +00:00