Commit graph

20597 commits

Author SHA1 Message Date
David Lynch 481dd52067 Track when edit notices are shown
VisualEditorFeatureUse as feature: notices, action: show.

This doesn't distinguish between the automatic on-load show and manually
showing them from the toolbar.

Bug: T344465
Change-Id: I5a0d7e87592c286afe51e02ae8436f7d2ce71021
2023-08-24 14:03:42 -05:00
Bartosz Dziewoński cc2b4e27d8 Fix showing temp user popup after page reload
I apparently forgot to pass the parameter to fireHookOnPageReload()
that I introduced exactly for this purpose. As a result, the basic
post-edit popup appeared, but the temp user popup did not.

Also rearrange code so that fireHookOnPageReload() is still called if
we need to redirect to complete creation of the temp user.

Bug: T344879
Change-Id: I36c64f27d2b8866ca88642621a135e7e25a91ce1
2023-08-24 16:09:12 +00:00
jenkins-bot 0139b042be Merge "Fix remote page detection logic" 2023-08-24 15:14:05 +00:00
Translation updater bot 5709e4a7dd Localisation updates from https://translatewiki.net.
Change-Id: Ieadfffa622c640a700bc34c0ad363d4dc42fd4f5
2023-08-24 09:52:56 +02:00
jenkins-bot 1c93f24a40 Merge "Implement add a reference edit check" 2023-08-24 03:30:48 +00:00
jenkins-bot 21a15315e7 Merge "Improve 2017WTE preference labels" 2023-08-23 12:39:43 +00:00
Translation updater bot 721de78650 Localisation updates from https://translatewiki.net.
Change-Id: Ib6471d160c1d64920ce12b7027591150b0a7a067
2023-08-23 08:40:50 +02:00
Bartosz Dziewoński 764e223260 ApiVisualEditor: Check permissions of the temp user if we will create one
Bug: T342770
Change-Id: I9f616ae754e014ae0ab5e3d0d62f5e4211399317
2023-08-22 21:41:08 +00:00
Bartosz Dziewoński 59a665c424 Acquire a temporary user username before previewing
Abortable promises are definitely among my least favorite things.
It takes all of this bookkeeping to make .abort() work consistently
(so that it always aborts a request if one is in flight, and always
causes the final promise to be rejected even if we didn't start a
request yet or it has already finished). But, if you squint and ignore
every line with the word "abort", it's like a normal promise chain.

Depends-On: Iec8a15dadd595bed0f7e54f907fbb8e192b45cf3
Bug: T331397
Change-Id: I67309c79e6d211d69630fe89cbf5402f8fbd350c
2023-08-22 23:40:55 +02:00
Dringsim 90ccc475df
Fix remote page detection logic
Remote pages can be global user pages, etc., not restricted to files on Commons.

Change-Id: I89368c93e25ca970bf35ad742a1054473b6d6c48
2023-08-22 17:13:09 +08:00
Translation updater bot c0176c9a12 Localisation updates from https://translatewiki.net.
Change-Id: I30456a57ef86c76d40da9a30f945d6f2aa91171f
2023-08-22 09:02:13 +02:00
Bartosz Dziewoński c8a2f9b0ad Improve 2017WTE preference labels
* Remove full stop. No other preference label has a full stop.
* Mention "2017 wikitext editor" as the alternative name, similar to
  WikiEditor (I6d17359166f58811ba99893ce4a4500a87deb827).

Change-Id: I48f64f1507b263da61c8a5711afc8ac4981763ee
2023-08-21 18:14:46 +00:00
Ed Sanders 2b4dab6703 build: Update stylelint-config-wikimedia
Change-Id: I4e56a07c0cd478fb2ea1908c79f584ea3e4d788e
2023-08-21 16:06:40 +01:00
Translation updater bot 16a94d8d86 Localisation updates from https://translatewiki.net.
Change-Id: I1238209b43bc74b94880facea0d177d50f7407bd
2023-08-21 08:48:51 +02:00
jenkins-bot f7805033d0 Merge "Use namespaced MediaWiki\Language\RawMessage" 2023-08-20 01:07:42 +00:00
Umherirrender 12856f5988 Use namespaced MediaWiki\Language\RawMessage
Bug: T321681
Change-Id: I5d32b7c419afdf10585cfb68bd558de1eebc9a18
2023-08-20 02:07:00 +02:00
Umherirrender dfc3173f21 Use namespace MediaWiki\Request\DerivativeRequest
Bug: T321681
Change-Id: Ib2a1797808c9c973efee198f583b9282779f7a7e
2023-08-20 01:40:59 +02:00
gerritbot d5cc6fc32a Replace some moved Title class uses, now MediaWiki\Title\Title
Bug: T321681
Change-Id: I1bb6e39d33b2bdb00fbe70fec0bcca1d71ad3a17
2023-08-19 12:17:42 +00:00
jenkins-bot df6bba67c8 Merge "build: Update MediaWiki requirement to 1.41" 2023-08-19 09:21:24 +00:00
James D. Forrester 2ca0c7beaf build: Update MediaWiki requirement to 1.41
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: If8982b746fd74abefcbbdf803e9f3242555fa578
2023-08-19 14:15:01 +08:00
James D. Forrester 5be96e951d build: Update MediaWiki requirement to 1.41
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I9fd89a61b1459b7db601cf2c4db8be5495aa65c3
2023-08-19 14:14:55 +08:00
Translation updater bot 12dbb92c97 Localisation updates from https://translatewiki.net.
Change-Id: I04bfe97bee49586704ddccb863e62c2f9d999443
2023-08-18 09:09:33 +02:00
Daimona Eaytoy 3d63e08a02 Use getExistingTestPage consistently in DirectParsoidClientTest
testTransformHtml currently passes just because the previous test
(testGetPageHtml) calls getExistingTestPage for the same page, but it
fails when run on its own because the page doesn't exist. Make it use
getExistingTestPage consistently to fix that.

This is also needed by core change Ie2f1809d, after which all tables
will be reset between tests.

Change-Id: Id4cb4803fae0d62c695ff1d1051056062c54da82
2023-08-18 01:04:34 +00:00
Translation updater bot fffc3514da Localisation updates from https://translatewiki.net.
Change-Id: I37dac7cd2117d6f7f9227c1e4bc20fb2e5b74737
2023-08-17 12:11:02 +02:00
jenkins-bot 9873caee04 Merge "ApiVisualEditorEdit: Make tags param actually work" 2023-08-16 17:00:34 +00:00
jenkins-bot 9e42850609 Merge "Remove extra margins from visual diff in Minerva" 2023-08-16 16:22:27 +00:00
Ed Sanders 975dc2c237 Add editcheck-references-activated when UI is shown
Bug: T342462
Change-Id: If6303df1a3dde8d6bb288ed04f40f7d43c4b90ae
2023-08-16 17:19:28 +01:00
Ed Sanders 3ece481e71 Implement add a reference edit check
Change-Id: I4cebc5bbaa34300d1c5bb5fde8277269b14779c9
2023-08-16 17:19:28 +01:00
jenkins-bot b65e676d80 Merge "Merge SkinTemplateNavigation::Universal hook handlers" 2023-08-16 16:03:20 +00:00
jenkins-bot 8b6211c878 Merge "ApiParsoidTrait: Fix MediaWiki\Rest\HttpException handling" 2023-08-16 15:59:01 +00:00
jenkins-bot 10eab09881 Merge "ApiParsoidTrait/DirectParsoidClient: Simplify error handling" 2023-08-16 15:57:35 +00:00
jenkins-bot 79d0fcb585 Merge "Add a Process to the save workflow" 2023-08-16 15:32:54 +00:00
jenkins-bot fc7fd630d6 Merge "Edit check: Reduce scope of try block" 2023-08-16 15:32:52 +00:00
jenkins-bot a28977ee71 Merge "Edit check: Guard against completeHistory being empty" 2023-08-16 15:30:02 +00:00
Bartosz Dziewoński fcc6decd57 ApiParsoidTrait: Fix MediaWiki\Rest\HttpException handling
Don't use RawMessage, the API error formatter doesn't know what to do
with it. Instead call dieWithException(). These exceptions probably
shouldn't bubble up here, but we can worry about that later.

Bug: T344173
Change-Id: I3d1645a3580feeed6fe1431a7bfcdc584f681061
2023-08-16 15:11:28 +00:00
Bartosz Dziewoński ca64e7e407 ApiParsoidTrait/DirectParsoidClient: Simplify error handling
After catching the REST exception, just throw an API exception.
Remove the step inbetween where we built a response array.

Bonus:
* Remove tests that only tested this array building.
* Remove the unused 'code' from successful responses, and update
  documentation of return value shapes.
* Remove impossible check for `$ex instanceof LocalizedException`.
  After moving the code into one place, it's obvious that it can't
  happen, since LocalizedException doesn't inherit from HttpException.

Bug: T341613
Change-Id: I31370efeed9d5283b53eafca102b2f1efc811d27
2023-08-16 17:09:18 +02:00
David Lynch 228596cba0 Add a Process to the save workflow
A new hook `ve.preSaveProcess` is triggered to give other code the
chance to add steps to the process. The save dialog won't show until
the process completes. A step can be failed to return to normal
editing.

Change-Id: Id0740ff58ba9d9519c81174100ef1b8f8740870b
2023-08-16 15:59:04 +01:00
Ed Sanders 4c69113ed8 Edit check: Reduce scope of try block
Change-Id: Ife185999d3a0e084720a7aac4d360d65db08a131
2023-08-16 15:58:27 +01:00
Ed Sanders 3d92231cd1 Edit check: Guard against completeHistory being empty
When the document store has no entries (e.g. an empty page)
we don't initialise completeHistory with a retain transaction.

Bug: T333710
Change-Id: I5cc4ab3ea5f63a7eab804831df62d5c7ce2447e9
2023-08-16 15:57:54 +01:00
jenkins-bot 9070d1e98b Merge "Catch errors in addPlugin callbacks so VE load isn't broken" 2023-08-16 14:29:12 +00:00
Translation updater bot aee14ea44e Localisation updates from https://translatewiki.net.
Change-Id: I7a51052f5d3c2b04aa680ee73bd8dbd0b5c4ccee
2023-08-16 09:12:46 +02:00
Umherirrender 08b33b2a7d Use HookHandlers for BetaFeatures hook
Bug: T271034
Change-Id: I74ca4a6645c05795c83df5474314d3d1dc556eb0
2023-08-16 05:23:38 +00:00
jenkins-bot 9690fcfee6 Merge "ApiParsoidTrait: Remove unused 'x-cache' header handling" 2023-08-15 19:37:53 +00:00
David Lynch 745d13ae4b Catch errors in addPlugin callbacks so VE load isn't broken
Change-Id: I8a1eb058f10e356b3af5588862633b78f0b0ff92
2023-08-15 13:49:16 -05:00
Umherirrender 9b4c433cd8 Merge SkinTemplateNavigation::Universal hook handlers
- The code in the hook handler is more related to the hook and the
  structure of the $links array as to the special page.
- Loading another class to process the hook is not necessary.
- Allows better migration to new hook handlers (special page classes and
  hook handler should be separated).
- Replace SpecialCollabPad::getSubPage with
  SpecialPageFactory::resolveAlias.
- The local url to Special:CollabPad is now in the content language
  (only relevant for non-english wikis).

Change-Id: I82985a8ba129b4e336cee337af31452e804090b3
2023-08-15 20:39:10 +02:00
jenkins-bot 4f30b22c33 Merge "ArticleTarget: Remove misleading error message on 'badtoken' errors" 2023-08-15 09:27:19 +00:00
jenkins-bot 7cbc464353 Merge "ArticleTarget: Remove unused retrying support" 2023-08-15 09:26:40 +00:00
jenkins-bot 4470c6ae71 Merge "ArticleTarget: Remove duplicate error codes when logging" 2023-08-15 09:25:51 +00:00
Translation updater bot 1718ab479c Localisation updates from https://translatewiki.net.
Change-Id: I742e6f1cd81064184ac648c80e28641a23dcd1c1
2023-08-15 08:27:03 +02:00
Bartosz Dziewoński 9dd85ee26f Update messages when becoming logged-in/logged-out for IP masking
See T343848 for discussion about the phrasing.

Bug: T343848
Change-Id: I15628492fd2ff7ba93f91d3eeefa4b65ca313ca5
2023-08-14 23:37:04 +02:00