Commit graph

1185 commits

Author SHA1 Message Date
Ed Sanders 01ac28540a Support the enable2017Wikitext option
Bug: T257391
Change-Id: If2511609035c26063203512f4b860bd0060e08af
2021-02-26 19:13:54 +00:00
Translation updater bot d26d8de182 Localisation updates from https://translatewiki.net.
Change-Id: I183e1b5ff2e6b0c8c0d1febe7332550062c6b192
2021-02-26 08:56:01 +01:00
Ed Sanders 8a322a28a6 Return transcludedFrom data for headings as well as comments
We may need this for topic subscriptions, and it seems
generally useful to include in the API response anyway.

Change-Id: If9522dc0c79a9a9ffb3a80f83fb17bf3c9399d6d
2021-02-25 23:07:42 +01:00
jenkins-bot 13d50c7e55 Merge "CommentFormatter: Fix inserting placeholder heading marker" 2021-02-24 20:50:51 +00:00
Bartosz Dziewoński 5b26e9664b CommentFormatter: Fix inserting placeholder heading marker
This code expected $container->firstChild to be a
<div class="mw-parser-output">, but that element is not present
when we're running on HTML to be saved in parser cache.

We ended up inserting the marker inside whatever node was the
first on the page, and if it was a <style> element, both our
marker and the styles would be lost when serializing, like in
6c7a0ca9a2.

When we're running on final HTML, the marker will now be outside
of <div class="mw-parser-output">, but that seems to be fine. Only
early versions of I4e60fdbc098c1a74757d6e60fec6bcf8e5db37c1 had
problems with that (see comments on patchset 41), but it works now.

The added test case also covers the fix for T274709.

Bug: T275440
Change-Id: I38d45dd8686919be51e1d307ded12b0afe185eb5
2021-02-24 20:32:48 +01:00
jenkins-bot c4759bdcb1 Merge "CommentParser: Replace getThreadStartTimestamp with getThreadStartComment" 2021-02-24 16:46:56 +00:00
Bartosz Dziewoński 444e5deb62 Make sure the Visual/Source mode selector loses focus after switching
Bug: T274423
Change-Id: Icfa4d435e4cb0ecab123c5fbdb68f23ecde99b5f
2021-02-24 12:32:14 +00:00
Bartosz Dziewoński 35738b1f9b CommentParser: Replace getThreadStartTimestamp with getThreadStartComment
Change-Id: Ia8d878594306b5ce4039ca06d6dcec753e5dea28
2021-02-24 12:26:58 +00:00
Translation updater bot 4d824ec369 Localisation updates from https://translatewiki.net.
Change-Id: I574649f7566a4ae9abcb7abf7d4b976d418e0acb
2021-02-24 08:51:20 +01:00
jenkins-bot 768e400fe5 Merge "Add stripTrailingSeparator to getBodyText as well as getBodyHTML" 2021-02-24 00:49:37 +00:00
jenkins-bot 153824c97d Merge "Sort message keys (and enforce sorting)" 2021-02-24 00:23:24 +00:00
jenkins-bot 3fa4669412 Merge "Remove useless escaping from en/qqq.json" 2021-02-24 00:23:22 +00:00
Ed Sanders 794332c1a1 Add stripTrailingSeparator to getBodyText as well as getBodyHTML
Change-Id: I33163bb291b4ee5bb6a1d602e518796057983d55
2021-02-23 23:09:17 +00:00
David Lynch 6ec1f39147 Change generation of logging session ID
Same pattern as is now used in VisualEditor. Generate an initial session
ID when the file loads, so if any VisualEditorFeatureUse events trigger
before the init there'll be a session ID for them to use.

Bug: T275051
Change-Id: I4f25e9e1e195c11129044868eb67fcc2f4494ffd
2021-02-23 15:37:22 -06:00
Ed Sanders da72fb15c2 Only show reply links when body class in present
Bug: T273072
Bug: T274311
Change-Id: Ibe08c0eba0b80a5143845dcd1792d616ad8ffc61
2021-02-23 19:36:21 +00:00
Ed Sanders 6c023da581 Sort message keys (and enforce sorting)
Change-Id: I72236c23323dc3292bf8a060c4270685c6decb9a
2021-02-23 16:33:11 +00:00
Ed Sanders 0856617636 Remove useless escaping from en/qqq.json
Change-Id: Ic3879f53e375113efa16062b4729663f0bbdd05d
2021-02-23 14:58:37 +00:00
Translation updater bot 2cfa72df99 Localisation updates from https://translatewiki.net.
Change-Id: Ie951aa5e8dbce650cbfd5081573b6db18fb18a64
2021-02-23 08:48:06 +01:00
Ed Sanders fa484e0c4a Don't allow CommentItem author to be null
Change-Id: Idb12bfa62e42bff521e872ab358b5ba9a8d24089
2021-02-22 20:55:35 +00:00
Ed Sanders bb8d2b691e Define sub-features in arrays and use where possible
* HookUtils:FEATURES lists all features
* CommentFormatter::USE_WITH_FEATURES are all features
  which require the comment formatter

Change-Id: Idbbe8bdd910b9c7b23c7fee76af7bb7ee13c2759
2021-02-22 20:55:35 +00:00
Translation updater bot c7753b464c Localisation updates from https://translatewiki.net.
Change-Id: I0cae3753e3a1b01c5c1903775c6597561b916646
2021-02-22 08:51:43 +01:00
Translation updater bot 59a3eda011 Localisation updates from https://translatewiki.net.
Change-Id: I1d60e6ba86b241fc7a4ff690345be7014dfc1fca
2021-02-19 08:31:46 +01:00
jenkins-bot f6cb81ce21 Merge "Show wikitext warnings for sequences not in reply tools" 2021-02-19 00:27:12 +00:00
Ed Sanders 6afb92d940 Show wikitext warnings for sequences not in reply tools
Bug: T274923
Change-Id: I56adc6524398805d3d6d582572e7524af8ba86a7
2021-02-18 22:52:35 +00:00
Ed Sanders 33c6181e79 Rename indent replacement methods
Change-Id: I8cb1b58dad068be7cfa62cab9e932463a23c6b12
2021-02-17 23:42:57 +00:00
jenkins-bot c417d3279a Merge "Make new topic autosave specific to page title" 2021-02-17 23:26:36 +00:00
jenkins-bot 872867c422 Merge "Fix highlight when new topic is posted without a title" 2021-02-17 23:26:34 +00:00
Bartosz Dziewoński 717955a513 Make new topic autosave specific to page title
Bug: T274949
Change-Id: I7e1bbcd6c606c7443f55fe3b1780021b07b28c5e
2021-02-17 20:09:13 +00:00
Bartosz Dziewoński b7917f5fa4 Fix highlight when new topic is posted without a title
Bug: T272666
Change-Id: I9bf87d6e6e004001fa387e94623751eea694a14f
2021-02-17 21:08:54 +01:00
Bartosz Dziewoński 9ae59e6ddb Disable VE indentation commands to allow tabbing out of the widget
Bug: T172694
Change-Id: I458271a82a2aba475007d94901bd14f405bccb24
2021-02-17 19:30:23 +00:00
Translation updater bot a2be5d32cc Localisation updates from https://translatewiki.net.
Change-Id: Ia999e551b315b3c03d473dc754246b0f1f4c734e
2021-02-17 08:42:29 +01:00
Translation updater bot 57f90ef72e Localisation updates from https://translatewiki.net.
Change-Id: I6be4cdc1b213e158c1435633b8df2e0039fc3a3d
2021-02-16 08:29:54 +01:00
Translation updater bot 3fe36e7f04 Localisation updates from https://translatewiki.net.
Change-Id: Iddca426c39bfc80bd282934e511280548adafbf9
2021-02-15 10:04:55 +01:00
jenkins-bot a0d97212cd Merge "Improve API parameter documentation" 2021-02-13 22:15:16 +00:00
jenkins-bot 5a9a4dc525 Merge "computeId() can't return null" 2021-02-13 22:14:02 +00:00
Bartosz Dziewoński 6659bb3f00 CommentFormatter: Fix problems with editsection and quotes
Bug: T274709
Change-Id: I918fdd97064186381b65ab1567d02abf6f944b8f
2021-02-13 20:01:58 +01:00
Bartosz Dziewoński 03f22c538e Improve API parameter documentation
These messages are used on Special:ApiSandbox.

Change-Id: I07809d3f9402d30c5d2d364e0634bd020f86f64f
2021-02-13 00:08:31 +01:00
Bartosz Dziewoński 1998c983f1 computeId() can't return null
It used to return null for headings, but now it doesn't. Simplify some
code checking for that.

Change-Id: I28131c4aee89b901879b4c49953d6b15ed91b5e7
2021-02-13 00:08:15 +01:00
Translation updater bot 0ac7cc7f33 Localisation updates from https://translatewiki.net.
Change-Id: I0e36e25db72a2099bf1e0263df88b3e2ae504b7d
2021-02-12 08:51:26 +01:00
Translation updater bot 859d68f56b Localisation updates from https://translatewiki.net.
Change-Id: I7e01a7ce5736080facac70c89babba0d15f1b87c
2021-02-11 08:38:32 +01:00
jenkins-bot f393fa5f03 Merge "Remove a TODO note about wrappers" 2021-02-11 00:09:50 +00:00
jenkins-bot d5b2389ffa Merge "Fix replying outside wrappers for partially indented comments" 2021-02-11 00:09:48 +00:00
Ed Sanders 361fd4c4a4 Add body class to enable reply links
Going forward this will allow us to remove the parser
cache split, and toggle features just using CSS.

The CSS will be modified in a later commit to give the
anon caches time to clear.

Bug: T273072
Change-Id: I83c84b8bc63e1881e07b49acd8499b811adfccd4
2021-02-10 15:40:34 +00:00
jenkins-bot 80b6896b8a Merge "Show relevant user in local suggestions on user talk pages" 2021-02-10 15:08:51 +00:00
Translation updater bot a78f328b33 Localisation updates from https://translatewiki.net.
Change-Id: Ib569e247b68a6a2f517044fe0ea1772a67573859
2021-02-10 08:38:21 +01:00
Ed Sanders b581883e7c Show relevant user in local suggestions on user talk pages
Bug: T273324
Change-Id: I60e550efbea3d9e250dcaf13080407094a23aad3
2021-02-09 21:51:28 +00:00
jenkins-bot 89dd44bb35 Merge "More test cases for comment wrappers (multiple siblings)" 2021-02-09 18:07:14 +00:00
Thiemo Kreuz 1e0d2d93b3 Add missing out-of-index guard to CommentUtils
I found this error in our logstash. I was not able to find an
existing Phabricator ticket.

Note how line #348 extracts the last element from the
$siblings array. It uses the function end() there, which
returns false in case the array is empty. $siblings[0] can't
do this but yields an error.

An alternative is to use reset(), which can return false as
well. But that's not really better. Especially not better
readable, I would argue.

Change-Id: Ic90cd2392ede15078ba0d5b4d67b8dc5d05f9bf7
2021-02-09 12:27:41 +01:00
Translation updater bot 7a93aeca7a Localisation updates from https://translatewiki.net.
Change-Id: I3dea088ec6c16b9590c1ac78c1a14bb52432a87e
2021-02-09 08:39:57 +01:00
Bartosz Dziewoński 3a1b8e09ea Remove a TODO note about wrappers
Yes, this is still needed, removing it causes failures in tests
(and the old outputs look better).

Change-Id: I5bcedb0295a1f0ac4f6e51eaa9a9e072d8236f3c
2021-02-08 22:23:54 +01:00