Commit graph

1205 commits

Author SHA1 Message Date
jenkins-bot 78260b97fe Merge "Ensure most of the widget doesn't move when blur-validating" 2021-03-01 20:39:06 +00:00
jenkins-bot 6650eb56cd Merge "Fix toolbar dialog placement" 2021-03-01 19:59:39 +00:00
jenkins-bot f1d5a75f84 Merge "Pass replyWidget to target" 2021-03-01 19:59:38 +00:00
Translation updater bot 2f635dc06c Localisation updates from https://translatewiki.net.
Change-Id: I0cf1d2a0b24bb924854a611b9dec9c91b03936d5
2021-03-01 08:51:26 +01:00
jenkins-bot 0eb37a87df Merge "Don't detect comments within quotes" 2021-02-28 22:56:20 +00:00
Bartosz Dziewoński 024a978ffd Don't detect comments within quotes
Bug: T275881
Change-Id: I8f7a4279837bd95ebf5b604ff350c0a3f29c2c05
2021-02-28 22:49:48 +00:00
Ed Sanders 665f68f838 Fix toolbar dialog placement
There are no available tools that use this, but it
can be tested using:

ve.init.target.surface.executeCommand('specialCharacter')

Change-Id: I853e6a3b9bd3caff018b6fe22cea9b1c6a428dff
2021-02-28 22:18:58 +00:00
Ed Sanders f5c3da2a86 Pass replyWidget to target
This allows the target to access $headerWrapper directly
instead of using flaky DOM traversal.

Change-Id: I81f6616ea8fa7cbfb58e576fd5b2739c6158a216
2021-02-28 22:07:51 +00:00
Ed Sanders c04a4c5c8f Ensure most of the widget doesn't move when blur-validating
This ensures click events are interrupted on other controls.

Bug: T275923
Change-Id: Ib73d17a965f1fb7e2bc4870bdbb568a9f6d071d3
2021-02-28 15:00:12 +00:00
jenkins-bot 8bb5eea999 Merge "Improve signature detection to handle formatting on the timestamp" 2021-02-27 22:54:50 +00:00
jenkins-bot c5874422df Merge "CommentUtils: Fix edge case bug in getCoveredSiblings()" 2021-02-27 22:54:46 +00:00
jenkins-bot 49938a88dc Merge "Improve merging multiple comments on one paragraph" 2021-02-27 22:54:43 +00:00
jenkins-bot 4fa3a5cb74 Merge "Broken test cases for comments with double signatures" 2021-02-27 22:54:41 +00:00
jenkins-bot 782884a6a1 Merge "Fix wikitext command registry inheritance" 2021-02-27 19:09:12 +00:00
Ed Sanders f62ce55671 Fix wikitext command registry inheritance
This fixes some missing commands in source mode, such as undo.

Change-Id: Ie470bd351e2fd67bcbb8cc839e70c3efcaaf1564
2021-02-27 18:24:36 +00:00
Daimona Eaytoy 67096cb431 Stop using deprecated Language methods
Change-Id: I7cf21365df355a4a62f9e353be61aaa03ed58b9d
2021-02-27 14:48:49 +00:00
Bartosz Dziewoński efe95494a8 Improve signature detection to handle formatting on the timestamp
Now it detect signatures generated by en.wp's {{Undated}} template,
and signatures of people who do weird stuff to the timestamps.

Bug: T275938
Change-Id: I27b07f6786ca5433a3c02a5fe68e4716d41401bb
2021-02-27 02:33:30 +01:00
Bartosz Dziewoński e767ee1741 CommentUtils: Fix edge case bug in getCoveredSiblings()
In some cases it would return the parent node, instead of the siblings
it should return.

It's a private method only called by getFullyCoveredSiblings(), and
that method had a bug that cancelled out this one, so everything
worked correctly. But I want to use it elsewhere now and ran into it.

Change-Id: Ic12f007d57a8502a1bea5f0af17b29e9d59093d6
2021-02-27 02:26:42 +01:00
Bartosz Dziewoński af082908a5 Improve merging multiple comments on one paragraph
The horrendous 11-line if() condition did not correctly handle
signatures wrapped in inline formatting markup, like <small>.

Instead, implement this logic in the code for skipping to the end
of a paragraph, which didn't exist yet when that condition was
added, but seems like a much better place to check this now.

Bug: T275934
Change-Id: I5cccff889b5e15b5f8fde0538bf4bccb22e762cf
2021-02-27 02:21:36 +01:00
Bartosz Dziewoński 9fafe72fc7 Broken test cases for comments with double signatures
Bug: T275934
Change-Id: I00edc63b723053e7ac7d26ce5fc1dde4b824380d
2021-02-27 00:12:42 +01:00
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