Commit graph

2964 commits

Author SHA1 Message Date
Bartosz Dziewoński af68c835bb Update exception handling for new code conventions
Change code to match the documented consensus formed on T321683:
https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#Exception_handling

* Do not directly throw Exception, Error or MWException
* Document checked exceptions with @throws
* Do not document unchecked exceptions

For this extension, I think it makes sense to consider DOMException an
unchecked exception too (in addition to the usual LogicException and
RuntimeException).

Depends-On: Id07e301c3f20afa135e5469ee234a27354485652
Depends-On: I869af06896b9757af18488b916211c5a41a8c563
Depends-On: I42d9b7465d1406a22ef1b3f6d8de426c60c90e2c
Change-Id: Ic9d9efd031a87fa5a93143f714f0adb20f0dd956
2023-01-22 18:17:11 +00:00
jenkins-bot 87d67d4a1c Merge "Use localStorage for auto-save" 2023-01-21 09:58:30 +00:00
Ed Sanders 9d331d0c86 Use localStorage for auto-save
Bug: T218663
Depends-On: Idcf50a527e2386122d077c497477057657824646
Change-Id: I514e5340d8bce3dd10a1142e7cced49edee5c9db
2023-01-21 09:25:55 +00:00
jenkins-bot 7d231582fe Merge "Tweaks for new heading HTML structure" 2023-01-20 12:50:50 +00:00
Translation updater bot c181489732 Localisation updates from https://translatewiki.net.
Change-Id: I166b96c6098c562ddfaeef58c42a1384cc8cfbba
2023-01-20 08:41:27 +01:00
Bartosz Dziewoński 6d8f92a6b2 Tweaks for new heading HTML structure
Bug: T327328
Bug: T327469
Change-Id: I8c7593e98dc677b28925129dda592dbc24106220
2023-01-20 06:23:23 +01:00
Bartosz Dziewoński cfd76f5eb0 Add test for DiscussionTools TOC additions
We verify that they appear in the action=parse API output.

We should also have a test to verify that they appear in the Vector
2022 skin, but that might have to be done as a browser test.

Bug: T326677
Change-Id: I81d5ddecd3b244aeee8cba71498f4d65f8e53696
2023-01-19 21:59:50 +00:00
jenkins-bot b7405bb006 Merge "Update generating DiscussionTools TOC additions after parser changes" 2023-01-19 21:37:04 +00:00
Bartosz Dziewoński 228ad6f457 Update generating DiscussionTools TOC additions after parser changes
Depends-On: I8329864535f0b1dd5f9163868a08d6cb1ffcb78f
Depends-On: I1b267d23cf49d147c5379b914531303744481b68
Bug: T326677
Change-Id: Id59b946f4a3618a75dfaaef8a0043423b768b21c
2023-01-19 13:29:16 -05:00
Translation updater bot 327bdb8d13 Localisation updates from https://translatewiki.net.
Change-Id: Ieab8949cd6c895860e5c89b9b75c8d6ab393a25e
2023-01-19 11:31:17 +01:00
Translation updater bot 70afff650e Localisation updates from https://translatewiki.net.
Change-Id: I00d53ed19ee5d2cbde61b36c8be26a65310ead0a
2023-01-18 08:29:17 +01:00
jenkins-bot 3c675b577e Merge "composer: Update mediawiki-codesniffer to 40.0.1" 2023-01-17 15:06:37 +00:00
jenkins-bot 8facd83609 Merge "Improve handling for comment separators" 2023-01-17 11:48:43 +00:00
jenkins-bot 63c236edba Merge "Add another test case for {{tracked}} template" 2023-01-17 11:48:39 +00:00
jenkins-bot ba2f6ac2cf Merge "Flip the reply button icon on RTL" 2023-01-17 11:47:38 +00:00
Ed Sanders f595c9c08a composer: Update mediawiki-codesniffer to 40.0.1
Change-Id: If953d807a0146e6d3cb6113539d826f399b0a6c0
2023-01-17 11:45:27 +00:00
Translation updater bot fce46840a6 Localisation updates from https://translatewiki.net.
Change-Id: I84e1ea651137462cef2f56a8fe6556fd9f5f68fc
2023-01-17 08:07:18 +01:00
jenkins-bot 8b8dba6124 Merge "Test ServiceWiring.php" 2023-01-17 05:53:07 +00:00
Umherirrender ecac4c3bd1 LanguageData: Use special page alias with spaces
The alias stored in the language files is with underscores,
but the value is compared in CommentParser against text with spaces

Affected languages: bjn, hu, id, jv, kaa, tl, tpi, vi, war

Bug: T327021
Change-Id: I8626627d10a240973e631e24508937a9eee9fb14
2023-01-16 22:27:23 +01:00
Translation updater bot 25d555087f Localisation updates from https://translatewiki.net.
Change-Id: I254a2de91119fb8964e3df5d0f687ca7456e3816
2023-01-16 08:28:13 +01:00
daniel 47118f901a Reduce parsoid PC writes to randomized sample
We need to be careful about flooding the parser cache with parsoid
content. For this reason, we currently only write to PC for a certain
sample of edits. This logic is implemented in core in
ParsoidHandler::allowParserCacheWrite and controlled by the
TemporaryParsoidHandlerParserCacheWriteRatio setting.

DiscussionTools triggers parsoid PC writes when handling the
RevisionDataUpdates hook, so it should use the same sampling.

Change-Id: Ic33f57b10ae53f431a3c3484c4853e88bf80f47a
2023-01-13 20:52:05 +00:00
Dreamy Jazz 68ae9555f1 Test ServiceWiring.php
Test ServiceWiring.php using tests copied from CentralAuth. Because
phpunit does not support marking a file as covered, the ServiceWiring
file is ignored for code coverage as the tests fully cover the file.

Change-Id: I7da8d74fec84a5aa9c77bc0678ad8f55b550893a
2023-01-13 12:01:38 +00:00
Translation updater bot 02af2f559c Localisation updates from https://translatewiki.net.
Change-Id: I5b3d8965f14c90c7bfac7e5e64df0d8f9616a9a5
2023-01-13 08:54:55 +01:00
Translation updater bot a96f9607a2 Localisation updates from https://translatewiki.net.
Change-Id: Id86ae61b44b20543f43b930a9a788db3c4163e7d
2023-01-12 08:41:44 +01:00
jenkins-bot 63e6f270f3 Merge "Enable visual enhancements on all talk namespaces" 2023-01-12 00:25:07 +00:00
Ed Sanders 5c5073b5ba Enable visual enhancements on all talk namespaces
Bug: T325417
Change-Id: I099a7d03f059f08595dec43ff0205fd5ba765885
2023-01-11 18:35:51 +00:00
jenkins-bot 029d8d6d66 Merge "Track callers of parseRevisionParsoidHtml." 2023-01-11 18:23:50 +00:00
daniel b15aecc68c Track callers of parseRevisionParsoidHtml.
We are seeing a lot of parser cache writes coming from
parseRevisionParsoidHtml. We should find out what is causing them.

Change-Id: I25440e0d759e19cc9769404beb6911c64d37d3e3
2023-01-11 19:01:45 +01:00
Translation updater bot 8c620473fb Localisation updates from https://translatewiki.net.
Change-Id: I85bdc31125b173661a54d6b8cdfdc0d32ba4f488
2023-01-11 09:01:39 +01:00
jenkins-bot d81886c5ce Merge "Enable collapsible content in mobile talk page lede content" 2023-01-10 16:37:11 +00:00
Translation updater bot cfdeadfdb8 Localisation updates from https://translatewiki.net.
Change-Id: Iebb3397c20d01a1533c566a90176f799aa1fb30e
2023-01-10 08:24:31 +01:00
Bartosz Dziewoński 3a9997d6ea Improve handling for comment separators
* Detect comment separators at the end of comments too
* Consider TemplateStyles associated with ignored templates

This unexpectedly improves a lot of cases other than T313097 too,
mostly where <br> or {{outdent}} was used within a paragraph:
splitting comments that were previously jumbled together, or restoring
content that was previously ignored for apps / notifications.

Bug: T313097
Change-Id: I9b2ef6b760f2ffd97141ad7000f70919aeab7803
2023-01-10 01:59:52 +00:00
Bartosz Dziewoński 56dcaa833b Add another test case for {{tracked}} template
Bug: T313097
Change-Id: I3ac1bfe40d808eee32f9b713dc40f502a6e54f8a
2023-01-10 01:59:46 +00:00
Bartosz Dziewoński 2a38098785 Flip the reply button icon on RTL
Bug: T325664
Change-Id: Id254420db317848e4894c9c683a3b27a98931155
2023-01-10 00:38:17 +00:00
Translation updater bot 97160052b0 Localisation updates from https://translatewiki.net.
Change-Id: Ia17a9460858563a4e9a0968c1dbb765c5f08fae1
2023-01-09 09:26:05 +01:00
jenkins-bot d7fe1c7979 Merge "Delay API requests for preloading metadata until user interaction" 2023-01-06 21:46:34 +00:00
Translation updater bot d00504bf0e Localisation updates from https://translatewiki.net.
Change-Id: I7a05d9e5fd14b3b6b92f08be7efce24897ad4a52
2023-01-06 08:54:34 +01:00
Bartosz Dziewoński 360e3584c6 Delay API requests for preloading metadata until user interaction
Instead of doing them right after page load, only do them on
hover/touch/focus, when we can expect that the user is about to
click/tap/activate a reply link, but which lets us start the work a
fraction of a second earlier.

Bug: T325598
Change-Id: Ida4cb70d8e9ab423ad2dabca7258f92e9fca3157
2023-01-06 01:24:00 +00:00
jenkins-bot 6d52132754 Merge "Clean up ApiDiscussionToolsPageInfo hack" 2023-01-05 23:28:04 +00:00
Translation updater bot d326fa4671 Localisation updates from https://translatewiki.net.
Change-Id: Id7868796caad0b0440ed00abdf619446e64a17bb
2023-01-05 09:08:02 +01:00
Translation updater bot c7353aa27d Localisation updates from https://translatewiki.net.
Change-Id: I4dba5cc5da07059676143fbcef0f9e2cf5943551
2023-01-04 08:28:56 +01:00
Bartosz Dziewoński af7097f02f Enable collapsible content in mobile talk page lede content
Bug: T323639
Change-Id: I3cfc8e7337172b44156a7f3bed9ff134c0851475
2023-01-03 18:16:15 +00:00
Translation updater bot 2c9ec88c0f Localisation updates from https://translatewiki.net.
Change-Id: Iadf53f11e3a7f58448fdd14f3b4263b9a3752795
2023-01-03 08:20:34 +01:00
Translation updater bot 38bc50a710 Localisation updates from https://translatewiki.net.
Change-Id: Iab8a194dac195e19ea87de5594162575ac417400
2023-01-02 08:42:52 +01:00
Translation updater bot 96787594a7 Localisation updates from https://translatewiki.net.
Change-Id: I9f5e3236ed55aa2103fcc9e4d0ff58972de49ea1
2022-12-29 10:01:23 +01:00
Translation updater bot e92112ea27 Localisation updates from https://translatewiki.net.
Change-Id: I8df95dfd389d86cb4256d0c78e49f1b6d4afdcf6
2022-12-26 09:09:38 +01:00
David Lynch d3a44b1092 Language code for zh-yue wiki is just yue
Bug: T323537
Change-Id: Ia6563b15ac92afc79eb3507bdd69bc4bf3000e33
2022-12-22 14:04:49 -06:00
jenkins-bot 8070ce8a57 Merge "a/b test anonymous ID was being reset because of cookie prefixes" 2022-12-22 15:12:25 +00:00
Translation updater bot dc936b87d8 Localisation updates from https://translatewiki.net.
Change-Id: Ib6ed325af35c475f7ba5d03140995a6b42f88b08
2022-12-22 11:03:18 +01:00
Translation updater bot 15474764f9 Localisation updates from https://translatewiki.net.
Change-Id: I607cae84983e66fb75ab3840c6aafb76847bbff4
2022-12-21 09:15:01 +01:00