Commit graph

1150 commits

Author SHA1 Message Date
James D. Forrester fe8526caf2 CommentFormatter: Switch from deprecated addJsConfigVars to new setJsConfigVar
Bug: T372193
Change-Id: Ib3ec31ac78aee59325b3b1be3bb66f5c4a73715a
2024-08-10 13:51:50 +02:00
Amir E. Aharoni 15f3f80378 Consistent spelling of "subpage"
"Subpage" is usually written as one word
in core and in other extensions.

Change-Id: Ie10a500790c321e866c02264d55449e42b0110bb
2024-08-06 03:44:51 -04:00
Umherirrender 2a932e598c Use expression builder instead of raw sql
Change-Id: I0cb5fa07d63bc93089a4956097eee7a41dbc99e7
2024-07-21 23:25:41 +02:00
Bartosz Dziewoński a38ebc00d8 Restore "empty state" on existing but empty talk pages
The previous approach no longer works due to changes in MediaWiki.
We must now pass the data between the hook which has access to request
state needed to determine if we should show this, and the hook that is
capable of showing it in the right place.

Bug: T362496
Change-Id: I290422c4249d288badd7c7d25e5e7e435dfd1800
2024-07-09 19:31:55 +00:00
jenkins-bot 961d36f13e Merge "BetaPreferenceHooks: Reuse $this->config" 2024-07-03 16:08:26 +00:00
Fomafix c675410755 BetaPreferenceHooks: Reuse $this->config
Change-Id: I782da96af4786ce812665a1e08bd89cacc52747e
2024-07-03 15:14:47 +00:00
Fomafix b06b96b915 Inject services into DiscussionToolsHooks
Change-Id: If15fd7cca27832ed8ff6738c90556be701be269f
2024-07-03 15:00:54 +00:00
Fomafix 3c76c7918b Inject service ContentLanguage into ThreadItemStore
Change-Id: Ie9b7d462c8ddf4abb749ee07537ccec1949b8fba
2024-07-03 10:16:27 +00:00
Fomafix f6c3c98bc3 Use service 'GadgetsRepo' instead of deprecated GadgetRepo::singleton()
Change-Id: I226b259e361d3d27ec89975353fdf6396ba60ccb
2024-06-30 09:03:11 +00:00
Ed Sanders 08d540f6b5 Disable beta feature automatically when all sub-features are available
Change-Id: I87886c894f652db339d3f07630366b3b4ff74e9e
2024-06-26 12:03:58 +01:00
jenkins-bot 7281eec5b2 Merge "Improve unwrapFragment() for multi-paragraph comments" 2024-06-22 09:48:56 +00:00
jenkins-bot da90f4b049 Merge "Remove A/B test code" 2024-06-21 21:35:20 +00:00
Ed Sanders 66ddcf5b64 Remove A/B test code
It's unlikely we'll do another feature A/B test any time soon.

Bug: T322492
Bug: T341491
Depends-On: Ia3712e2930fcd971bce44f568430602ce3949f23
Change-Id: I1ef4191f9466b7420a2fead571615ed6d49f873e
2024-06-21 21:08:15 +00:00
Bartosz Dziewoński 674353691b Improve unwrapFragment() for multi-paragraph comments
I've been reading some discussions in Special:DiscussionToolsDebug
and saw a good number of comments where the first paragraph has
a bullet point (`*`), and the following paragraphs are indented (`:`).

Change-Id: I1afadc49565e843c97286a3744941ffb4062ddec
2024-06-21 22:37:09 +02:00
jenkins-bot c11460a527 Merge "Fix parsing usernames with +" 2024-06-21 15:19:33 +00:00
jenkins-bot fb4d4d77a5 Merge "Trim whitespace from truncated heading titles in IDs" 2024-06-20 02:20:23 +00:00
Bartosz Dziewoński 20ff1a519f Fix parsing usernames with +
urldecode() should be used for decoding URL query parameters,
rawurldecode() should be used for decoding URL paths.

Bug: T367977
Change-Id: I7a7b14da85fb89f612c701d2746803d830017842
2024-06-19 17:14:10 +02:00
jenkins-bot d8da88055a Merge "Remove WMF-specific "discussiontools-autotopicsub" settings" 2024-06-16 09:32:41 +00:00
jenkins-bot 7c9450489d Merge "Use ConditionalUserOptions for "echo-subscriptions-email-dt-subscription"" 2024-06-16 09:32:34 +00:00
Bartosz Dziewoński 0f601b690a Remove WMF-specific "discussiontools-autotopicsub" settings
WMF config change should be deployed first: Ica7dba4f17eb3e57a1a2415cc970c54a67eac696

The default value for this preference was already '1', and this code
was a no-op unless it was overridden to '0' like it was in WMF config.

Bug: T357221
Change-Id: I6b09bbea9bfb7a8f8ed17114dc59e657c5b66e91
2024-06-15 13:05:07 +00:00
Bartosz Dziewoński 488e35d82e Use ConditionalUserOptions for "echo-subscriptions-email-dt-subscription"
WMF config change should be deployed first: Iaff2d5ffee78d6200e1fa971c5c62137a400005d

Bug: T357221
Change-Id: I2744d52c5ff8c89166c19ab0ff2b4a27bfbf7cd7
2024-06-15 13:04:58 +00:00
jenkins-bot a3adda8ed7 Merge "Remove jquery.makeCollapsible workarounds for mobile" 2024-06-10 19:29:49 +00:00
Umherirrender 3dc5e88842 Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: I492ddae3c3e9f81d551ea8b348b7148893f4f590
2024-06-09 00:02:35 +02:00
Bartosz Dziewoński 2c9264e412 Remove jquery.makeCollapsible workarounds for mobile
The module is now loaded normally by the Minerva skin (T111565).

Bug: T323639
Change-Id: I9121410c20fffd651c81c26b84b861ec9300881f
2024-06-04 00:56:58 +02:00
Umherirrender 8145e7ae74 Add caller when running query builder
Change-Id: Icc9f640ff8a67d582448e4f05a4456a54218b72d
2024-05-31 00:25:03 +02:00
Ed Sanders 6237d6068b Follow-up I80377881: Add missing Echo namespace
Change-Id: I3f94d8d91d78eba1eb16ac34b027cd2e9d66649d
2024-05-28 18:28:38 +01:00
Ed Sanders a86897f890 Comment thanking
Bug: T249893
Change-Id: I64f7abc26bfc3e7b226340934a637a555edf754f
2024-05-28 17:47:09 +02:00
Ed Sanders d1bffdee70 Use namespaced notification classes from Echo
Change-Id: I80377881e6aabf3014394c024fca6af50166aa1a
2024-05-28 15:48:56 +01:00
Ed Sanders ea5639b20b ESLint: Enforce prefer-const
Change-Id: I5985d1b532988bb3b71ff1aa24eae57ac2e1b9c5
2024-05-24 16:50:13 +01:00
Amir Sarabadani 320da37512 Fix static cache access
Currently, DT is making more than 30 exact queries back to back in every
request. It is clear the caching is completely broken.

It is because when the properties don't exist (majority of the cases),
it returns an empty array making the caching noop.

Tested in mwdebug1002 and it fixes the issue.

Bug: T364693
Change-Id: I182ae121999df1a04cfb7399bc49891587a37074
2024-05-12 18:23:41 +02:00
wfan 2b41719f96 Migrate MediaWiki.discussiontools.addReplyLinks to statslib
Bug: T359463
Change-Id: I93f7872818a27e5a5aac6ed4c44302bdc78b0613
2024-05-05 13:59:04 +00:00
Ed Sanders 501046f38c Trim whitespace from truncated heading titles in IDs
Bug: T356196
Change-Id: Iddcda0cee624fda7f78a05e0a3d70eaee2635da9
2024-05-01 14:20:12 +01:00
jenkins-bot dcb8d7175b Merge "ApiDiscussionToolsCompare: Show nice error for deleted revisions" 2024-04-30 20:03:06 +00:00
jenkins-bot af74638d08 Merge "ApiDiscussionToolsCompare: Deduplicate 'from'/'to' param handling" 2024-04-30 20:02:59 +00:00
jenkins-bot 8b9a813b11 Merge "Clean up handling of <span class="mw-headline">" 2024-04-30 16:48:56 +00:00
jenkins-bot 9f7de3e917 Merge "Remove the "offset" from getHeadlineNodeAndOffset()" 2024-04-30 16:48:54 +00:00
Bartosz Dziewoński b8a28d6cfc ApiDiscussionToolsCompare: Show nice error for deleted revisions
Bug: T362814
Change-Id: Iecc3e3737fcc82a79e699fe0bc00f373ecabf0c2
2024-04-26 03:54:31 +02:00
Bartosz Dziewoński f3e96a72fa ApiDiscussionToolsCompare: Deduplicate 'from'/'to' param handling
Change-Id: I0351228f50e9ea5a599d11b37f684b8e66553a83
2024-04-26 03:54:05 +02:00
Bartosz Dziewoński 67bad433dc Fix signature check not to look at the content of previous section
It needs to only look at the end of the added comments, and ignore
whatever is going on at the beginning, since the only thing it really
cares about is a functioning "Reply" button at the end.

Bug: T363285
Change-Id: Ia337be754deda741617d1343972f3e0a21c41b05
2024-04-25 23:15:18 +02:00
Bartosz Dziewoński 3cffe1190e Clean up handling of <span class="mw-headline">
The PHP code should never see a `<span class="mw-headline">` node
since MediaWiki change If04d72f427ec3c3730e757cbb3ade8840c09f7d3,
but we have to support it for our old integration tests (T363031).

Improve code comments to explain this and move the handling to
one place, so that it can be deleted more easily in the future.

Follow-up to 08f61b2609.

Change-Id: I5ab9d3373a6911c1456c30d844b66576b278a1b5
2024-04-20 00:16:45 +00:00
Bartosz Dziewoński 7445294b3b Remove the "offset" from getHeadlineNodeAndOffset()
Since c6cd20f682 the offset is always 0.

Change-Id: I9c1c8230f897d8bb287ca47056f5fa9fb187d060
2024-04-20 00:34:32 +02:00
jenkins-bot 56b21c9032 Merge "Remove workaround for T357812" 2024-04-17 15:22:35 +00:00
jenkins-bot 03a3c4b42c Merge "Remove DTSUBSCRIBELINK cached HTML compat" 2024-04-17 15:22:33 +00:00
Bartosz Dziewoński cf792094bb TopicSubscriptionsPager: Fix exception when no subscriptions
Bug: T362507
Change-Id: I569fb2ae017edc9d8e49910faff85e8c9301077d
2024-04-15 21:03:55 +02:00
Bartosz Dziewoński 52ae0f3152 Special:TopicSubscriptions: Use permalinks when available
When permalink data is available, display a permalink using
the current page title, instead of a plain link to the section
at the time of subscription.

Consolidate and clean up some existing permalink code.

Bug: T306373
Change-Id: Ie2f63cbfdbfa703530205201dfcfb0e5ad053b35
2024-04-04 13:44:06 +00:00
Dringsim afff10a932
Replace deprecated ChangeTags method calls with ChangeTagsStore
Bug: T360664
Change-Id: I14b676e74b277dfea62109fcca6881fea3763997
2024-04-01 09:00:39 +08:00
jenkins-bot f3df3dfa0a Merge "Setup grunt-tyops and fix" 2024-03-28 13:35:23 +00:00
Ed Sanders a70f411ee1 Setup grunt-tyops and fix
Change-Id: I372c3cc5bedaf800716bff68cadb2846a399a42a
2024-03-27 14:01:18 +00:00
Bartosz Dziewoński c44313a867 Fix autosubscribe on new pages with $wgDiscussionToolsAutoTopicSubEditor = 'discussiontoolsapi'
Broken by the introduction of 'nocontent' parameter in
6bf6105d2a.

Bug: T359751
Change-Id: I60d9a6f51e897ecdc68525151990212ecc171548
2024-03-27 00:51:14 +01:00
Bartosz Dziewoński e2309342ce Remove DTSUBSCRIBELINK cached HTML compat
Follow-up to Ie3348671c486de5bbd9f286772a8d145e3609bd5.

Change-Id: Ia4cd4f5d26e95b3557cae6f80f49fa5da138890f
2024-03-26 23:39:53 +01:00