Commit graph

3276 commits

Author SHA1 Message Date
Translation updater bot 8a85b7f598 Localisation updates from https://translatewiki.net.
Change-Id: I6ba51157040e34350f247f9ee8153a3afe978ef0
2020-07-23 08:27:45 +02:00
Ed Sanders 0dbda50781 Make getNativeRange a method of ThreadItem
Change-Id: Icdf9e4560ca6116f35fecf034a4e059dc7ed893e
2020-07-22 21:56:48 +01:00
Bartosz Dziewoński 3d69704b05 Tweak wording of the visual mode signature hint
Bug: T255738
Change-Id: I30166da358a9eb57bb834b2161505f9ab9c24eea
2020-07-22 20:15:44 +02:00
jenkins-bot 765a1d27bc Merge "Improve detecting template-generated multi-line comments" 2020-07-22 15:04:00 +00:00
Translation updater bot 259c493f69 Localisation updates from https://translatewiki.net.
Change-Id: Icf9e658ce76bf27cde9e994ddd42a4bd43bb9250
2020-07-22 08:26:20 +02:00
jenkins-bot 889de1bcdf Merge "Improve detecting typed signatures" 2020-07-22 01:43:40 +00:00
jenkins-bot 7eff952cb2 Merge "Signature handling in visual mode" 2020-07-22 01:42:47 +00:00
jenkins-bot 3db53080e8 Merge "Don't allow switching when unsupported content used" 2020-07-21 23:14:08 +00:00
Bartosz Dziewoński 80e52e1155 Improve detecting typed signatures
* Remove the existing approach for detecting signatures that only
  worked in source mode; remove autoSignWikitext()

* Use the same approach for auto-signing in source mode as we have
  already used in visual

* In both modes, detect whether the user has already typed a signature
  at the end of their comment in the modifier, and if so, don't add a
  signature

* Add test cases for the detection

Bug: T255738
Change-Id: I791d3035cb1ffc33ce3966d4617a25d08700c35b
2020-07-22 00:00:53 +02:00
jenkins-bot e010dc560c Merge "VisualEditorFeatureUse: trackdebug logging consistent with EditAttemptStep" 2020-07-21 21:51:34 +00:00
jenkins-bot 79195b9fb7 Merge "Refactor CommentParser" 2020-07-21 21:40:29 +00:00
Bartosz Dziewoński 569db3603c Improve detecting template-generated multi-line comments
Bug: T252058
Change-Id: Ic010b8aeff9b177031184f02f92fcdea5280dc36
2020-07-21 22:26:45 +01:00
Translation updater bot 1e97d6d2b5 Localisation updates from https://translatewiki.net.
Change-Id: I878094d5a93bf78953f272edd5da287f7060c603
2020-07-21 09:11:12 +02:00
Ed Sanders a2431fe006 Refactor CommentParser
* Pass rootNode to the constructor
* Rename getters to match CommentItem/HeadingItem/ThreadItem
  value classes.
* Always build the thread tree so CommentItem's always have
  and ID and replies/parent.

Change-Id: I508be9534de59016ff806e3d84edcbb1c76cb0c6
2020-07-20 23:38:10 +01:00
David Lynch 72680471ef VisualEditorFeatureUse: trackdebug logging consistent with EditAttemptStep
The defaults weren't being included in the log output.

Change-Id: I455370cdb40e300efa6f41902b434affd32dc405
2020-07-20 17:26:53 -05:00
jenkins-bot e89f58eddf Merge "Customise abandon edit dialog copy" 2020-07-20 18:29:12 +00:00
jenkins-bot 6dcbaca9c1 Merge "Disable blockquote command" 2020-07-20 17:13:34 +00:00
jenkins-bot 271124d5cb Merge "Create a PingNode so user pings are single focusable nodes" 2020-07-20 17:13:32 +00:00
jenkins-bot 187e3706b6 Merge "Move #getTranscludedFrom from parser to ThreadItem" 2020-07-20 17:13:31 +00:00
jenkins-bot de2d54eab0 Merge "Move #getAuthors from parser to ThreadItem" 2020-07-20 17:13:30 +00:00
jenkins-bot f845febf34 Merge "Documentation fixes" 2020-07-20 16:51:29 +00:00
Ed Sanders a4636d39fc Move #getTranscludedFrom from parser to ThreadItem
Also requires moving getTitleFromUrl to CommentUtils

Change-Id: I9cb83a3fdd456eba66899433b866ce7a7f00eeb5
2020-07-20 15:56:48 +01:00
Ed Sanders 7ae5bbf384 Move #getAuthors from parser to ThreadItem
Change-Id: I16e513000e5366b3044b17a99da07d8d0f47a61f
2020-07-20 15:13:59 +01:00
Ed Sanders b32f991913 Documentation fixes
Change-Id: I2c7ccecbf8a50bd4d658b0f17f4a21fe90a3c399
2020-07-20 13:34:08 +01:00
Translation updater bot d90a2de6af Localisation updates from https://translatewiki.net.
Change-Id: I466afdd294493e1908ac784c68923e94c6cd2920
2020-07-20 09:00:57 +02:00
libraryupgrader 528f40151f build: Updating grunt to 1.2.1
Change-Id: If40a827eee0af7de74c2a52f845ceb1ead2b4931
2020-07-18 05:12:33 +00:00
Ed Sanders e4c11035a7 Disable blockquote command
Bug: T258194
Change-Id: I600abe0767f53c51e6f78f11a8087a6e29d4877f
2020-07-17 23:25:15 +01:00
Ed Sanders e6f7a9e679 Create a PingNode so user pings are single focusable nodes
Bug: T252083
Change-Id: I168e036d201b924e7fc9bda2f2f58e48ad2dbac0
2020-07-17 23:17:41 +01:00
Ed Sanders 854c8e4b28 Customise abandon edit dialog copy
Bug: T257069
Change-Id: I2770b53f826b5af689051cc681a75f9608e85de9
2020-07-17 23:04:44 +01:00
jenkins-bot e2573f7787 Merge "Increase padding around warning icon" 2020-07-17 15:51:53 +00:00
Translation updater bot bc5e9b312e Localisation updates from https://translatewiki.net.
Change-Id: Iadc2d38e28d3d1266547c0a0dee1cc6540cf9e1f
2020-07-16 08:21:02 +02:00
Bartosz Dziewoński ee69365b82 Signature handling in visual mode
Load 'ext.visualEditor.mwsignature' (which implements VE's existing
handling for signatures), then subclass and override a bunch of things
in order to:

* Replace the context menu with a note that you don't need to type the
  signature when commenting using the reply widget

* Override the sequence/command to insert signature so that it selects
  it afterwards and thus displays the context menu

* Treat signatures as signature nodes when switching from wikitext,
  instead of the normal pre-save transform turning them into regular
  links and text

Bug: T255738
Change-Id: Icb542451c2307ab51e56bd627804096c7b5552c8
2020-07-16 01:32:19 +02:00
Ed Sanders 092cfd6075 Parser: Replace findTimestamps with findTimestamp
Instead of doing a separate tree walk and finding all timestamps
separately, make it part of the getComments tree walk, and find
timestamps one at a time.

Change-Id: I47f466eaf228504faa189fd99e07493bc7f022cd
2020-07-15 21:34:22 +02:00
Ed Sanders 981d3326aa Add ime-position-inside ULS class to reply widgets
Bug: T255191
Depends-On: Ibcf7a4f076ceb86b91e81310bcb2fa64abc551dd
Change-Id: I0729933551cf5b73ca99718d54635caefdd0ee94
2020-07-15 18:27:02 +01:00
Bartosz Dziewoński 308c2747b0 CommentParser.php: Use tree walking instead of XPath
This is similar to what the JS version does.

The TreeWalker and NodeFilter classes are adapted from
https://github.com/Krinkle/dom-TreeWalker-polyfill
(MIT license).

This makes #getComments twice as fast on en-big-oldparser.html

Change-Id: I2441f33e6e7bad753ac830d277e6a2e81ee8c93d
2020-07-15 16:40:50 +00:00
Bartosz Dziewoński 08b467bf9f tests: Fix wrong $rootNode in some tests using CommentParser::getComments()
Rather than the <body> node, we were passing <body>'s first child.
Current implementation of CommentParser::getComments() doesn't fail
the tests in spite of this because the XPath query incorrectly returns
results relative to the document's real root node, but these tests
would start failing after I2441f33e6e7bad753ac830d277e6a2e81ee8c93d.

Follow-up to 3e6ab2c4d2.

Change-Id: Ic26e0a1ee4443987e215c5f26ef1f084ccd0b40b
2020-07-15 16:40:30 +00:00
jenkins-bot 01ce5afaa9 Merge "Fix highlighter styles: match sig/timestamps border sizes" 2020-07-15 15:29:33 +00:00
Translation updater bot 3a79aa25d6 Localisation updates from https://translatewiki.net.
Change-Id: Ie552f73317452df823d10b69152034777dcb63fd
2020-07-15 09:03:56 +02:00
Ed Sanders 3ef4c30e63 Fix highlighter styles: match sig/timestamps border sizes
Change-Id: Ie7b9809ca21c72a88487f208b9a9c41f65d4fe11
2020-07-14 23:17:29 +01:00
Ed Sanders 00042d8499 Remove DiscussionToolsEnableVisual config
Defaults to true and has no need to be disabled anymore.

Change-Id: I3cf9b5accea0fd1f175c75057641657742d8fa1b
2020-07-13 15:51:47 +01:00
Nikerabbit 4cf9e06974 Revert "Localisation updates from https://translatewiki.net."
This reverts commit e6e5193a32.

Reason for revert: Broken export

Change-Id: Ic7e2bf9db21ea60d47a180d6120c753146b8b0a2
2020-07-13 11:42:08 +00:00
Translation updater bot e6e5193a32 Localisation updates from https://translatewiki.net.
Change-Id: I7ed83b0b65bf712a264245b6af65267c715e874c
2020-07-13 08:42:02 +02:00
Translation updater bot 5bb9d0194a Localisation updates from https://translatewiki.net.
Change-Id: I688801d1d05713d7ac00dc0e48cfc1bae8603cb8
2020-07-10 08:25:36 +02:00
Ed Sanders 58aa412fa3 Don't allow switching when unsupported content used
Bug: T256150
Change-Id: I9b57996f069a1c0c05ef396cfe0ed81495a1d9ec
2020-07-09 13:05:09 +01:00
libraryupgrader 5d7aa9eea5 build: Updating lodash to 4.17.19
* https://npmjs.com/advisories/1523
* CVE-2019-10744

Change-Id: Ie3486b0814772427800c7b38b79ca7d8da59a0a5
2020-07-09 07:11:48 +00:00
Translation updater bot 66b0cc392b Localisation updates from https://translatewiki.net.
Change-Id: I94c72dc720b7842b89374704c27c9ba90a1624d6
2020-07-06 09:51:15 +02:00
jenkins-bot 0bd5371737 Merge "Add getHeading method to CommentItem" 2020-07-03 03:23:16 +00:00
jenkins-bot e1a85a4edd Merge "CommentParser.php: Fix URL parsing" 2020-07-03 03:23:15 +00:00
jenkins-bot 0be56305fe Merge "Move wikitext modifiers to modifier.js" 2020-07-03 03:23:14 +00:00
jenkins-bot 0f184c42b5 Merge "Move createCommentContainer to modifier" 2020-07-03 03:23:12 +00:00