Commit graph

2888 commits

Author SHA1 Message Date
Francois Pignon de107bb6a8 Optimize some jQuery selectors
Bug: T324523
Change-Id: I57a86f3f29cd33e93db31338420af15fdb3113b9
2022-12-05 23:56:09 +00:00
daniel 683edf3947 Track parsoid render reason.
Call ParserOptions::setRenderReason to allow us to track why we render
and in particular, why we write to the parser cache.

Change-Id: If42f802f4cf2da39b06cbb8a30c4dc7d9a663001
2022-12-05 20:54:55 +01:00
jenkins-bot 984f804f17 Merge "Don't collapse the lede section when it has comments" 2022-12-05 19:04:37 +00:00
jenkins-bot 8a6bc91f46 Merge "Consider MediaWiki:Talkpageheader message when adding "Learn more" button" 2022-12-05 19:04:35 +00:00
Translation updater bot fa974c5af4 Localisation updates from https://translatewiki.net.
Change-Id: I02409ec6cd31c3abadcd1f8387b30b3ae4d11e2f
2022-12-05 08:33:22 +01:00
jenkins-bot e27e5ac55e Merge "Clear pageDataCache whenever re-initializing" 2022-12-02 11:58:45 +00:00
jenkins-bot 8111d66fbb Merge "CommentController: Fix 'discussiontoolscompare' polling not stopping" 2022-12-02 11:58:43 +00:00
Bartosz Dziewoński a2a06d0316 Reverse default sorting on Special:TopicSubscriptions
Bug: T324245
Change-Id: I87c43bda9a40fdf66c3f4f2d8bc66e211107a557
2022-12-01 22:18:18 +01:00
Bartosz Dziewoński 7dc35aa3ad CommentController: Fix 'discussiontoolscompare' polling not stopping
The .always() callback can be called after .teardown(), and would
previously restart the polling.

Bug: T313096
Change-Id: I6e4c0f7d47e13bd4a259282a508afcdf0c1bd949
2022-12-01 21:12:37 +00:00
Bartosz Dziewoński 37fda5e181 Clear pageDataCache whenever re-initializing
Bug: T323661
Change-Id: Ia080f4a8e79551bd16a1ce96f6851a76159d8da7
2022-12-01 21:49:08 +01:00
David Lynch 51ed8a21f6 Avoid error building threaditemshtml if there's an empty final section
If the final content on a page is a heading, there would be an error as
we tried to access nextSibling on a non-existent node.

Also tidies up the case where there's an empty section that's not the
final section. It would have `othercontent` set to an empty string,
which was pointless -- the empty `replies` field is sufficient.

Bug: T321317
Change-Id: Ia58e97214e715c1f6b02c2e045d13f2df7393b80
2022-12-01 11:44:28 -06:00
jenkins-bot 64e5c91970 Merge "Hide buttons for print media" 2022-12-01 15:14:33 +00:00
jenkins-bot db1aa31eed Merge "Remove dd overflow hack" 2022-12-01 15:04:09 +00:00
Translation updater bot c6547e253b Localisation updates from https://translatewiki.net.
Change-Id: I7aaa2dd3afd76c7b9c832de2693cc213f79fad96
2022-12-01 08:15:24 +01:00
Bartosz Dziewoński b4475801fd Don't collapse the lede section when it has comments
Bug: T324139
Change-Id: I14e1dae0fef4177f5a6a223bc9b663e99c9f741c
2022-11-30 20:25:22 +01:00
Ed Sanders 7ab0c69f39 Remove support for data-mw-comment
Can be merged once I85ee8e6ed6 has been deployed long enough
for all the caches to have been purged.

Change-Id: Ic9773c2e45a4aa796cb6bca52e58d7db1016a977
2022-11-30 18:31:02 +00:00
jenkins-bot 337d0938f3 Merge "Remove some redundant PHPDoc comments" 2022-11-30 16:47:12 +00:00
Translation updater bot 38218039fa Localisation updates from https://translatewiki.net.
Change-Id: I57761a97b969bbc484eb7155ce314bb9bbcee264
2022-11-30 08:52:51 +01:00
jenkins-bot 61b63139b9 Merge "Follow-up be012ced: tests: Provide some basic direct tests for CommentUtils::getTitleFromUrl" 2022-11-29 22:21:05 +00:00
James D. Forrester 7017acaf1d Follow-up be012ced: tests: Provide some basic direct tests for CommentUtils::getTitleFromUrl
Change-Id: Idb44d7890b05e0d9d90fdabe46f295b80996f60c
2022-11-29 15:43:18 -05:00
jenkins-bot 5a524d0fa3 Merge "Track events for the new comment notice" 2022-11-29 19:40:32 +00:00
jenkins-bot a1c1816359 Merge "Ignore negative page scroll values on iOS" 2022-11-29 18:51:55 +00:00
Bartosz Dziewoński e72f58ca78 Remove some redundant PHPDoc comments
Inspired by this Wikitech-l discussion:
https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/NWXPNHRNLEVXHSWX33H473OAWQP6CDOA/

To keep this simple for now, I am only removing redundant PHPDoc
comments on constructors, and only when all the documentation for
parameters completely duplicates type hints.

More could be done, but that can happen later when we have better
tooling. Redundant comments on constructors that take a dozen services
are by far the most annoying for me and I want them gone now.

Change-Id: I86cbf7d6e48035cfa06f780c8fb1b02e68709a0c
2022-11-29 18:47:18 +00:00
Bartosz Dziewoński 74fbe19838 Consider MediaWiki:Talkpageheader message when adding "Learn more" button
We also need to move the code to the other hook to avoid adding it twice now.

Bug: T324046
Change-Id: I186d15f6e6537b47b019c9707d7ae8ef080f4ae2
2022-11-29 18:46:40 +00:00
jenkins-bot ce00d1820e Merge "Only match article path until first '?' when parsing links" 2022-11-29 18:17:56 +00:00
Bartosz Dziewoński be012ced04 Only match article path until first '?' when parsing links
Bug: T324028
Change-Id: I7aca1a8f20695b9ecd3f63f2d0a3f5684616655e
2022-11-29 17:16:03 +00:00
Ed Sanders 79537c9892 Ignore negative page scroll values on iOS
Bug: T323400
Change-Id: Id37f3da183a08f936c6b6d11ed7307bb9d8bd28b
2022-11-29 14:29:50 +00:00
Translation updater bot 76199b7439 Localisation updates from https://translatewiki.net.
Change-Id: I4afa09032ee63ff07a8194ac09c934fd7f5cb304
2022-11-29 08:58:32 +01:00
Bartosz Dziewoński ea2e519b05 Hide buttons for print media
Change-Id: I6f4e5ee66de3a8d62727ae226f3b17a95a0ae2df
2022-11-29 00:36:49 +01:00
jenkins-bot ea54a8facc Merge "Use 'BeforePageDisplay' instead of 'OutputPageBeforeHTML' for once-per-page things" 2022-11-28 15:23:52 +00:00
Translation updater bot 6057b50a4c Localisation updates from https://translatewiki.net.
Change-Id: I3d939e52361786920e81fe01a4ca0a4c5214ba93
2022-11-28 08:49:23 +01:00
Bartosz Dziewoński 8452f94cf9 Use 'BeforePageDisplay' instead of 'OutputPageBeforeHTML' for once-per-page things
Also fix a CSS selector to handle content added in multiple
'OutputPageBeforeHTML' hook calls.

Bug: T323376
Bug: T323833
Change-Id: I480d9bf544d61f0cb7bfd04cadfbf053e7e1b70e
2022-11-25 16:12:16 +00:00
Translation updater bot 5132761aae Localisation updates from https://translatewiki.net.
Change-Id: Ib4150d5da92b6873b05601ff10b0989bf122f63e
2022-11-25 08:25:40 +01:00
jenkins-bot 36af2d1002 Merge "Allow replying to some comments with accidental complex transclusions" 2022-11-24 14:00:45 +00:00
jenkins-bot 6e00c904cf Merge "Add test cases for T313093" 2022-11-24 14:00:42 +00:00
jenkins-bot eb9631164d Merge "Place replies outside transclusions, disallow replying to transcluded comments" 2022-11-24 14:00:40 +00:00
jenkins-bot b155d12e8e Merge "Add test case for T313100" 2022-11-24 14:00:37 +00:00
jenkins-bot e1a1023f3e Merge "highlighter: Fix double-escaping of popup notifications" 2022-11-24 13:48:45 +00:00
Translation updater bot 68d17126fb Localisation updates from https://translatewiki.net.
Change-Id: Ia628f80859c557edc8a130bd53bd65c8b7d3a3e9
2022-11-24 08:17:09 +01:00
Bartosz Dziewoński 46a9a13116 Remove dd overflow hack
No longer needed after I73d654d1f9127e22365d94909681c1c5f5f39597.

Change-Id: I2a16b725fca512ccbb72f493fd7db28836341e24
2022-11-23 11:28:14 +00:00
Bartosz Dziewoński 7dd4855979 Fix Phan failure due to core changes in Action
Caused by I8188172aeb7ec775eeb2060a1e163112e9e5ed66.

Change-Id: Ieafc280c76b20e4efbe23cf3e2b193a4a6490b50
2022-11-23 11:27:54 +00:00
Translation updater bot d1e995430f Localisation updates from https://translatewiki.net.
Change-Id: I5967d648c3af40d44379186f9e6e3c2dfdb15539
2022-11-23 08:32:09 +01:00
jenkins-bot fc446b31b9 Merge "Dedupe ApiDiscussionToolsTrait::parseRevision and HookUtils::parseRevisionParsoidHtml" 2022-11-22 08:53:23 +00:00
jenkins-bot 7d06b61347 Merge "ApiDiscussionToolsTrait: PageInfo & Compare don't need HTML for editing" 2022-11-22 08:51:57 +00:00
Translation updater bot 6f4438fac3 Localisation updates from https://translatewiki.net.
Change-Id: If3944f4ff8d224464598f403adcc92f3f5622fe8
2022-11-22 08:33:34 +01:00
Bartosz Dziewoński 3042148bfe Dedupe ApiDiscussionToolsTrait::parseRevision and HookUtils::parseRevisionParsoidHtml
After recent changes (I101c1e84739a2ac1f562f2f7bdc4b8f53d9f3b23 and
Ifbde590ccb6bf3203a2f664cb0d8a73b8d507b78) these methods became
basically the same.

Change-Id: Iedc201e798a5a34713296b20b97ae6cc8b991b66
2022-11-21 21:01:19 +00:00
Derick Alangi 672ca86016 ApiDiscussionToolsTrait: PageInfo & Compare don't need HTML for editing
ApiDiscussionToolsPageInfo and ApiDiscussionToolsCompare in direct parsoid
or VRS modes tries to fetch HTML using VisualEditor thus stashing the
HTML gotten which we don't want, we only need it for viewing in these cases.

This seems like something that was/is already happening in RESTBase. So for
APIs in DiscussionTools that need the HTML for viewing, just get it from
parser cache and not stash it.

Bug: T323357
Change-Id: I101c1e84739a2ac1f562f2f7bdc4b8f53d9f3b23
2022-11-21 16:29:13 +01:00
Bartosz Dziewoński 9601fde487 HookUtils::parseRevisionParsoidHtml doesn't need HTML for editing
Bug: T323357
Change-Id: Ifbde590ccb6bf3203a2f664cb0d8a73b8d507b78
2022-11-21 13:37:16 +01:00
Translation updater bot 1eba2b1286 Localisation updates from https://translatewiki.net.
Change-Id: I343ee7936e82899d57d73521a16ea8f865f48b6c
2022-11-21 08:15:51 +01:00
Bartosz Dziewoński e0be640c35 Don't add lede button if mobile DiscussionTools not enabled
Bug: T323341
Change-Id: I60d93a3e72918d303a45b2a75f4fa549aea8d917
2022-11-18 15:55:54 +01:00