Commit graph

592 commits

Author SHA1 Message Date
Jon Robson bc4c367bba Disable $wgVisualEditorUseSingleEditTab on mobile site
Bug: T348353
Depends-On: I92f7c2c5f4691bd511219432c53379ddd928eae2
Change-Id: I3108f884173526f95d86d975d7421b4af1cff447
2023-10-06 16:29:48 -05:00
jenkins-bot 86fb65ba90 Merge "Change icon for supported skins when both VE and source edit icons are present" 2023-10-04 23:20:19 +00:00
Jon Robson 47815e9d2b Change icon for supported skins when both VE and source edit icons are present
This introduces an extension attribute EditIconSkins which allows extensions
or skins to request the rendering of edit icons.

This will be used by Minerva in I3c9d59f49f1b939981a7b2b450448db6736d5958

Bug: T346944
Change-Id: I401805224c0f387ac85b52b50c1f298b83c03a91
2023-10-04 22:16:13 +00:00
Ed Sanders 70c116a17a Edit check: Simplify "experience" config to "maximumEditcount"
There's no product need for anything other than an upper limit
on edit count. If one arises in the future we can adjust accordingly,
but better to keep the JSON, and any UI implementation, simple
for now.

Change-Id: I892847ad78b19695f0f0f664002d3c566f7806de
2023-10-03 16:20:51 +01:00
jenkins-bot 8d40677037 Merge "Remove the BetaFeatures integration" 2023-09-21 15:29:34 +00:00
Bartosz Dziewoński dcfe952a3f ApiVisualEditor: Pass section to IntroMessageBuilder
Depends-On: I58b90d8e70d538d897d3130ead114d2522ecb703
Change-Id: I205d18b65224acef4f76fb5625bff3bbf002ece6
2023-09-19 20:14:15 +00:00
David Lynch 80f3ef9531 Edit check config: account-state and experience
Bug: T330112
Change-Id: If713a7edcb71a5ea8123da27a3b1bffc45992ad0
2023-09-11 15:56:42 -05:00
David Lynch 8c47e0ecb0 Update edit check decline reasons and record tags for them
Bug: T329593
Change-Id: Ib8f465c31a6c601545d55bd58a6c1fa78139757a
2023-09-08 15:49:09 +01:00
jenkins-bot d75d070992 Merge "Place reference before punctuation when configured" 2023-09-08 00:07:50 +00:00
Adam Wight 609e4d51da Share diff page initialization with non-text diffs
This solves a conflict with RevisionSlider, in which navigating
between diffs caused inconsistent rendering depending on whether the
user first entered the page through a diff with or without a
text-slot change.  After this change, the ResourceLoader modules are
always available.

Module initialization seems to be safe to run on non-text diff pages.

Bug: T344596
Change-Id: I936d45a132dee3a044a52e22c4751c0538a5bcdc
2023-09-07 09:25:05 +02:00
Bartosz Dziewoński c180c2f58e Remove the BetaFeatures integration
Bug: T344757
Change-Id: If08eab93d30341333feaa4459f85fbc791435e91
2023-09-06 19:03:30 +02:00
Reedy aad68834c4 Switch MW core hooks to HookHandlers
Bug: T271034
Change-Id: I2c84d457c286878b8d903ead13120608b205a326
2023-09-04 19:10:41 +02:00
Ed Sanders a798721e23 Place reference before punctuation when configured
Bug: T344962
Change-Id: Ib4ae46d423e69c0bb45a2b1fa1c23fa7e84a8077
2023-09-01 13:44:45 +01:00
Ed Sanders a59335fac6 Rename config.references to config.addReference
Change-Id: I5e4b70d8bff1e9b26ca78f9f6f8c9ac8d5f7297b
2023-09-01 13:41:52 +01:00
David Lynch cd43f126d1 Edit check configuration system
This creates a message called `editcheck-config.json` which will be
loaded and sent to the `modules/editcheck/config.json` packageFile.

Bug: T330112
Change-Id: Idc58ddf1045fcc0491701a739f3778c8cf4dd955
2023-09-01 13:41:52 +01:00
jenkins-bot 2f3b31eeb2 Merge "Add editcheck-references-activated when UI is shown" 2023-09-01 01:57:51 +00:00
Arlo Breault e054c3da90 Use metrics from SiteConfig to restore the Parsoid prefix
According to Ie85f2306e8b0f123b9fdd737faffdd85117015b1

Bug: T339365
Change-Id: I99c15876424a454309116fa1269d0a1a456e0d46
2023-08-30 20:28:23 -04:00
jenkins-bot 40a52535f2 Merge "Stop injecting ServiceOptions in VisualEditorParsoidClientFactory" 2023-08-30 15:38:59 +00:00
jenkins-bot 7f1cc82c79 Merge "Remove unused VisualEditorParsoidClientFactory options" 2023-08-30 15:15:40 +00:00
Arlo Breault 2c1989c338 Stop injecting ServiceOptions in VisualEditorParsoidClientFactory
Change-Id: I7a3c5ef6435a38ef136e830b343dc19166659ef0
2023-08-30 17:05:17 +02:00
Arlo Breault de2935928c Remove unused VisualEditorParsoidClientFactory options
Looks like these were introduced in b029fd8 and could have gone out in
f2bb8cf.

Bug: T341614
Change-Id: I4f77a7fabb1016864cafb15848c0199028a7b6bb
2023-08-30 14:58:55 +00:00
jenkins-bot 57a0940895 Merge "ApiVisualEditor: Check permissions of the temp user if we will create one" 2023-08-30 13:32:31 +00:00
jenkins-bot 4e9baea69a Merge "Acquire a temporary user username before previewing" 2023-08-30 13:20:46 +00:00
jenkins-bot 0139b042be Merge "Fix remote page detection logic" 2023-08-24 15:14:05 +00: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
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
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
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 9873caee04 Merge "ApiVisualEditorEdit: Make tags param actually work" 2023-08-16 17:00:34 +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
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
Umherirrender 08b33b2a7d Use HookHandlers for BetaFeatures hook
Bug: T271034
Change-Id: I74ca4a6645c05795c83df5474314d3d1dc556eb0
2023-08-16 05:23:38 +00: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
Bartosz Dziewoński 01b3137afa ApiParsoidTrait: Remove unused 'x-cache' header handling
After we removed other clients, the $response array can only be
generated by DirectParsoidClient::fakeRESTbaseHTMLResponse(),
which never includes a fake 'x-cache' header in the response.

Bug: T341613
Change-Id: I90bcb1e26e4164f8f4a34da3abcb01ac0769e21a
2023-08-14 16:54:53 +02:00
jenkins-bot 2fb87f11e0 Merge "Add option to unify display of VE enable preference" 2023-08-07 15:33:40 +00:00
jenkins-bot 5d079c2012 Merge "Fix conditions for 'visualeditor-autodisable' that depended on WMF config" 2023-08-07 15:31:52 +00:00
Dringsim cce52fae65 Use different tooltips for ca-edit and ca-ve-edit links
Bug: T337653
Bug: T341424
Change-Id: I3aa79fec71ca2c40a0ece3ca73dd934cf6c9d5a8
2023-08-02 16:36:54 +00:00
Martin Urbanec 35320775e3 ApiVisualEditorEdit: Make tags param actually work
Why:
ApiVisualEditorEdit passes most of its params down to
action=edit. However, $params contains parsed version
of the params. Using it with tags results in the param
validator logic on ApiEdit's end receiving a PHP array,
which it does not expect (neither it should; it is impossible
to pass one via an actual API call).

This feature will be used in DiscussionTools,
which itself reuses ApiVisualEditorEdit.

What:
Use WebRequest::getText() to get the unparsed
value for 'tags', which makes the parameter
forwarding actually work.

Bug: T343339
Change-Id: I0ac60ca8473fe28461b2da60f9911baac4994388
2023-08-02 17:52:11 +02:00
Derick Alangi 4418b61894 Remove DualParsoidClient::class and related code from VE (p.2)
I've verified that no other extension uses this code apart from VE
and locally tested that with this patch, VE still works and nothing
explodes.

There parent patch takes care of making sure the mode is no longer
injected and we now have just etags with no hacked in modes because
we now use direct mode always.

Bug: T341612
Change-Id: Ib1756bf60104467a3a34be9bbb06d8f63537e550
2023-07-25 09:01:44 +00:00