Commit graph

609 commits

Author SHA1 Message Date
Bartosz Dziewoński 0460cd834b ApiParsoidTrait: Fix converting MessageValue to Message
Despite outwardly behaving just like a Message, in fact MessageValue
stores its parameters in an incompatible way.

Bug: T352012
Change-Id: I16c64cdc8c2795536579c52a0aa21832900d96b6
2023-12-18 22:18:38 +01:00
gerritbot eae3c3c1c5 Update UserOptionsLookup's FQN
User-options related classes are being moved to the MediaWiki\User\Options namespace in MediaWiki Core; reflect that change here.

Bug: T352284
Depends-On: I9822eb1553870b876d0b8a927e4e86c27d83bd52
Change-Id: Ifb380012959b5b2853586cd25b0d003b53dc38eb
2023-11-29 12:41:16 +00:00
Ed Sanders 876a947a7b Move EditCheck files to ./editcheck and structure as a sub-extension
Change-Id: I4085223a93b37e601b3627fc2d6db7978cac820e
2023-11-28 15:56:43 +00:00
jenkins-bot 20fd2497cd Merge "VisualEditorEdit diffs should only compare the main slot" 2023-11-21 13:59:41 +00:00
jenkins-bot ba5c9995d0 Merge "Recognize DEFAULTSORT again" 2023-11-16 17:50:50 +00:00
David Lynch b71a34cce5 VisualEditorEdit diffs should only compare the main slot
We diff only on provided wikitext. This was causing inaccurate diffs on
pages with slotted content (e.g. File: pages on commons), which would
claim the edit would delete all the slot contents other than the
wikitext in main.

Also, remove the very old backwards compatibility params that were being
passed to getResultData in this method.

Bug: T351235
Change-Id: I135082162b96503e8d896aa4014abc9f4b936580
2023-11-16 09:18:06 -06:00
Bartosz Dziewoński d23e912884 Use expression builder instead of addQuotes()
Bug: T350992
Change-Id: Ide2edebf979a21628aa5832d6ac8774fc55310f6
2023-11-11 00:29:25 +01:00
Nardog 9b9f2c50b0 Recognize DEFAULTSORT again
Since Parsoid now treats DEFAULTSORT like any other template, we have to
scan mw:Transclusion spans.

Bug: T337398
Change-Id: Icba92fc14c1c56ec4711ba49407e8be368d57842
2023-11-09 21:26:20 +00:00
jenkins-bot 97f704f9fe Merge "ApiVisualEditor: Remove unnecessary checks" 2023-11-03 17:37:42 +00:00
Bartosz Dziewoński d80a8a6abc ApiVisualEditor: Remove unnecessary checks
According to EventLogging 'editattemptstep' data the error hasn't
happened in the last 90 days.

It probably can't happen since we switched from RESTBase to direct
Parsoid access, but keep the checks as assertions just in case.

Change-Id: I0bad1e4364c2f1b154383bc1a984c4ccc83e1700
2023-11-03 17:05:08 +01:00
Ed Sanders e238544d6e Document generated messages
Change-Id: I4467f0563a5c09ae063e13c372ebbde4f6e1d112
2023-11-03 15:39:00 +00:00
jenkins-bot 6e34b3b730 Merge "Use options-messages to delay message parsing on Special:Preferences" 2023-10-13 23:37:16 +00:00
Umherirrender 4cc8926974 Use options-messages to delay message parsing on Special:Preferences
This also removes double escaping from the messages as 'options'
for type = select gets escaped by the html form

Change-Id: I31cc19cbe1f6e61849f3ff806e53a14082e06849
2023-10-13 22:12:02 +02:00
jenkins-bot a664de74f2 Merge "Change icon for supported skins for section edit links, too" 2023-10-13 15:29:12 +00:00
jenkins-bot 0e370a84cd Merge "Remove 'VisualEditorTransitionDefault' and AutodisableVisualEditorPref.php" 2023-10-13 15:27:59 +00:00
Bartosz Dziewoński 137914de28 Change icon for supported skins for section edit links, too
Bug: T346944
Change-Id: I4653671ccb2bba2da3940897371d7dfac4bbd0f2
2023-10-09 20:13:24 +02:00
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 497e8df608 Remove 'VisualEditorTransitionDefault' and AutodisableVisualEditorPref.php
Bug: T344759
Change-Id: Ib268fd493070a646a49799dc5fb8a4774e25ec3e
2023-09-06 19:03:31 +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