Commit graph

1677 commits

Author SHA1 Message Date
Bartosz Dziewoński 8c6928aacf modifier: Handle empty nodes in appendSignature()
Bug: T292664
Change-Id: I0003528076e3981d639d337affcccbf394f59224
2021-10-11 22:17:46 +02:00
libraryupgrader b0c8621973 build: Updating ansi-regex to 5.0.1
* https://npmjs.com/advisories/1002401 (CVE-2021-3807)

Additional changes:
* eslint: Added `wikimedia/mediawiki` profile (T262222).
* composer.json: Updated phpcs command in composer test (T280592).
* composer.json: Added phpcs command to scripts (T280592).

Change-Id: I39276efa5a6991f6216992840c497ae9d3b5fd7d
2021-10-09 07:08:30 +00:00
Translation updater bot 0dd0fc0013 Localisation updates from https://translatewiki.net.
Change-Id: I7c1b1d49bca753a6a99c361cb42f1f0bc124403d
2021-10-08 09:20:45 +02:00
Ed Sanders 605e7322b8 eslint: Lint root folder with server rules
Change-Id: I372eef293983bff0c79ad8aa0da1c7e5d07b1e44
2021-10-07 17:37:52 +01:00
Ed Sanders 02642e48dd Fix linting on i18n key order
Change-Id: Id30b228f2aaa710f75086b6b64ffda5726d59a8e
2021-10-07 17:37:51 +01:00
jenkins-bot f8bd39adbf Merge "Add Special:TopicSubscriptions" 2021-10-07 14:53:59 +00:00
Translation updater bot 52b3ba2ef7 Localisation updates from https://translatewiki.net.
Change-Id: Ie1271d0521feb36a397089f9ecd123406b6a7b63
2021-10-07 09:02:46 +02:00
Bartosz Dziewoński a0dc12ab56 Add Special:TopicSubscriptions
Bug: T273342
Change-Id: If96a0df1efbf5cadfb6bf2bf8f7ad5c9c90ea142
2021-10-06 20:06:01 +00:00
Translation updater bot b0ce65736e Localisation updates from https://translatewiki.net.
Change-Id: Ic9c6f2aec7b1a75c160dc701a6b11cd65f2069f6
2021-10-06 09:28:17 +02:00
jenkins-bot c7d82f4ddc Merge "Remove uppercase of first character of auprefix" 2021-10-05 20:57:58 +00:00
jenkins-bot c4f94d0202 Merge ""Reply ... in one click" -> "Reply ... with one click"" 2021-10-05 19:22:43 +00:00
jenkins-bot 1a67ab6d74 Merge "Make reply links more robust so Google Translate won't break us" 2021-10-05 13:53:03 +00:00
Translation updater bot bbf98c00a4 Localisation updates from https://translatewiki.net.
Change-Id: I9a0584c3b7e17e6d7dc078cd57951824b34317da
2021-10-05 08:29:31 +02:00
David Lynch 4211494ed7 Make reply links more robust so Google Translate won't break us
Normal link: `<a>reply</a>`

Google Translate: `<a><font><font>reply</font></font></a>`

Using jQuery's `closest` method to make sure we go up if the event
target isn't the data-mw-comment element should avoid problems.

Bug: T245563

Change-Id: I19ffb9a5b91617b98b0f00e4d185c01bcde093b0
2021-10-05 01:07:36 -05:00
Ed Sanders 9b19b32fc0 Compress emptystate.svg with svgo
14k -> 9k

Change-Id: Iec26b332627d8084f511edfbb69505b045ab6939
2021-10-04 12:56:20 +01:00
Ed Sanders f140e725a9 "Reply ... in one click" -> "Reply ... with one click"
"in" suggests that the "one click" fully encapsulates the
process of replying, and would probably be better used with
a timeframe, e.g. "Reply in one minute".

Change-Id: Iff323c3bc88959f3a0e6ea5b2f0a4174da5e8e21
2021-10-04 12:52:47 +01:00
Translation updater bot cfc4f8b7a3 Localisation updates from https://translatewiki.net.
Change-Id: I112c8dbfa82b89348f9d89443bd460bb6519dbb7
2021-10-04 08:55:44 +02:00
Translation updater bot cdf089b20c Localisation updates from https://translatewiki.net.
Change-Id: Ice11be400a9d4893eb5fad9367bdda296047b7f4
2021-10-01 09:29:49 +02:00
Translation updater bot 0ddcdb8a5b Localisation updates from https://translatewiki.net.
Change-Id: I35c68af690b6662ce9b4b2815200ed0bd4bb72ca
2021-09-30 08:57:24 +02:00
Translation updater bot 2e18a49315 Localisation updates from https://translatewiki.net.
Change-Id: I2c05926cc8d035728ec2fb99ca2e06b72fa5fc32
2021-09-29 09:01:43 +02:00
jenkins-bot 268b704b48 Merge "Add a link to preferences within the Reply and New Discussion Tools" 2021-09-28 16:34:59 +00:00
jenkins-bot 162cc03e6a Merge "Clarify the references to talk pages in notification preferences (#2)" 2021-09-28 14:57:55 +00:00
Bartosz Dziewoński 4be0751517 Fix almost all errors codes being logged as http-0
Follow-up to b52699ad35.

Bug: T290514
Change-Id: If82f10c58872d990b9dfa7cbdc9b784454a5fa46
2021-09-28 13:14:29 +02:00
Bartosz Dziewoński 7126d0f656 Clarify the references to talk pages in notification preferences (#2)
Bug: T286954
Change-Id: I8f351bf277c7acfaff37fe36eefce6768c3a04c6
2021-09-28 11:53:56 +02:00
Translation updater bot 57f6b6ddd3 Localisation updates from https://translatewiki.net.
Change-Id: Ibaabb077e6a7bbeefbd078797d19353311de7df1
2021-09-28 08:18:41 +02:00
Bartosz Dziewoński ca8781a3a0 Add a link to preferences within the Reply and New Discussion Tools
Bug: T291002
Change-Id: Id99f77d3a181aedd23305b7afa61a0a3fb6dabb7
2021-09-27 21:52:07 +00:00
Bartosz Dziewoński c1f4668806 Change CommentParser and ImmutableRange to use offsets in codepoints instead of bytes
The PHP DOM extension measures lengths and offsets in Unicode codepoints.
Our PHP code used UTF-8 bytes, causing some offsets to be slightly off.
Now it mostly uses Unicode codepoints as well (we're forced to use bytes
in a few places, because preg_match returns offsets in bytes).

In practice, this had no visible effect to the user. It caused the
markers `<span data-mw-comment-end="..."></span>` to be placed at
the end of their container instead of the correct position when the
timestamp contained multibyte characters (e.g. "ź" in Polish); but
the correct position is usually at the end of the container anyway.

In the test cases, the only difference is placing these markers before
a trailing line break inside `<p>...</p>` tags rather than before it.

The patch also accidentally fixes another bug, where element nodes
with no children (mostly <img>) were incorrectly excluded when calling
cloneContents(), because they were treated as if they were text nodes.

Change-Id: Iccdccf1078598f4b62cab96225e9c85a4c0e93ee
2021-09-27 19:04:16 +00:00
jenkins-bot 408bbc62a3 Merge "Change the "Watch this page" label to distinguish it from topic subscriptions" 2021-09-27 17:26:14 +00:00
jenkins-bot 118b958f8b Merge "Use MediaWiki's new section edit summary if the user didn't modify it" 2021-09-27 17:11:32 +00:00
Translation updater bot f6c5a0f804 Localisation updates from https://translatewiki.net.
Change-Id: If332718d4ded6e55b5bbb9a01caedc1d3547727c
2021-09-27 08:34:44 +02:00
Alexander Vorwerk b73f4b1a70 Replace usage of deprecated PageProps::getInstance()
Bug: T289544
Change-Id: Ib4d86c298508b3dc56c44a4fa7314218f8a0d930
2021-09-26 00:48:51 +00:00
Translation updater bot e6c9d3f328 Localisation updates from https://translatewiki.net.
Change-Id: Ic0da565b5509ea688d16e24dfe446dc7c6e47a93
2021-09-24 08:26:09 +02:00
jenkins-bot abd6c2fedd Merge "Enhance Echo user talk edit and mention notifications" 2021-09-24 02:17:57 +00:00
Translation updater bot 1105554785 Localisation updates from https://translatewiki.net.
Change-Id: I4f2383fb709a1c965a2e315a53161fd47f1c94fa
2021-09-23 12:27:33 +02:00
Translation updater bot ac8ff605d9 Localisation updates from https://translatewiki.net.
Change-Id: Ib3ef82dcf166e03f306957c1e145817f93da1c04
2021-09-22 08:10:37 +02:00
jenkins-bot 15747aba3a Merge "CommentParser: Remove outdated legacy ID algorithm" 2021-09-21 16:50:37 +00:00
jenkins-bot d25975209f Merge "Deduplicate logic for subscribable headings" 2021-09-21 16:50:29 +00:00
jenkins-bot 02a214d928 Merge "Put all checks for enabling the empty state for talk pages in one place" 2021-09-21 15:43:11 +00:00
Bartosz Dziewoński 0bf4a6ca90 Use MediaWiki's new section edit summary if the user didn't modify it
Bug: T275178
Change-Id: I5966cb5a523343f02ca955c27aa45822c29aab3f
2021-09-21 16:27:35 +02:00
Bartosz Dziewoński b6c8de03ef Change the "Watch this page" label to distinguish it from topic subscriptions
Bug: T290712
Change-Id: I02b89466a4e980e3cb2859b1ba5a3cbf4b5ae0ed
2021-09-21 11:44:06 +02:00
Bartosz Dziewoński 4a824abd0d Apply page transformations only when viewing pages
Follow-up to e634701460. We didn't need
this previously, because we relied on the ArticleParserOptions hook
only being called when viewing pages.

Context from code reviews a year ago:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/641837/comment/15ee0218_e4ab602f/
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/641837/comment/b62d4327_5ebc2e02/

Bug: T291459
Bug: T291460
Change-Id: I64f0be170719d874f5460934462917f4f13af6c1
2021-09-21 10:19:42 +02:00
Translation updater bot 8f929ccc26 Localisation updates from https://translatewiki.net.
Change-Id: I0013781874f0c7253b48e5249e7fb573d3368ad3
2021-09-21 08:08:55 +02:00
jenkins-bot c50b1630d1 Merge "Add API to get the status of topic subscriptions on a page" 2021-09-21 04:43:03 +00:00
Bartosz Dziewoński ca17555a67 Put all checks for enabling the empty state for talk pages in one place
They were spread across several places, and some of them were checking
different things, causing us to show the view mode on some
action=edit&redlink=1 links but without showing our empty state.

Bug: T291085
Change-Id: Id1864e58c47dbd22abb41d48e31f81318d9f94f9
2021-09-20 23:15:00 +02:00
jenkins-bot 152a663fb6 Merge "Always apply DiscussionTools page transformations" 2021-09-20 17:30:43 +00:00
Bartosz Dziewoński 435b0c65c7 Enhance Echo user talk edit and mention notifications
If the user talk edit or mention coincides with exactly one new comment:
* Change the primary link to be a direct link to the comment
* Add a text snippet to notifications that don't already include one
  (user talk edits that are not new sections).

This is done for all such notifications, regardless of whether anyone
has topic subscriptions enabled.

Bug: T281590
Bug: T253082
Change-Id: I98fbca8e57845cd7c82ad533c393db953e4e5643
2021-09-20 15:05:42 +02:00
Fomafix c1371b7416 Remove uppercase of first character of auprefix
Since Id9afb2dd0212e4b871bb6a7a9d8762e1bcb81d6a included in core since
MediaWiki 1.38 the uppercase of the first character of the parameter
auprefix is not needed anymore.

Bug: T291339
Depends-On: Id9afb2dd0212e4b871bb6a7a9d8762e1bcb81d6a
Change-Id: Ic14ca9c9c61d2a50bdbaff50b56302a60ed17a96
2021-09-20 07:28:34 +00:00
Translation updater bot 70dd1e97ea Localisation updates from https://translatewiki.net.
Change-Id: I6590484d7d3824055646f389672140f40ffa4828
2021-09-20 08:18:49 +02:00
Bartosz Dziewoński 3dbc5749ea Adjust use of 'plainlinks' class to fix button styling in some cases
It was previously applied on the whole wrapper of the anon
warning, including the buttons. In some cases (on mobile, and
on some sites with weird customized site CSS), this causes the
buttons to lose some styling. Apply it only on the label.
Follow-up to 522b7932d7.

Bug: T270536
Bug: T291000
Change-Id: Ia4bc99fc219a80efbf46a7cc196ea29720a34de8
2021-09-18 03:16:43 +00:00
Translation updater bot 4c39068eb3 Localisation updates from https://translatewiki.net.
Change-Id: Ibd743268bc7dbeed1ae7d60f7e8311a99c198269
2021-09-17 08:45:16 +02:00