* 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
* 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
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
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
This is a regression from when we added a wikitext parameter to
preparePreview. Calling getValue in visual mode converts the whole
DM to HTML, which is fairly expensive, especially as there are
no previews in visual mode.
Change-Id: Ieed61b0d7741e7204a942a7181923da0502981cd
We can update the local filtered list before then, but then we would
have to do two updates for each keystroke, one to do an instant local
filter and another to back-fill the list when the remote results
become available. Currently CompletionAction is not set up for this,
and this might be confusing behaviour.
Bug: T256974
Change-Id: I6194cdcd6459be17fb142e644d73c9ec4036ba08
Separate out conversion to DOM nodes, and update
now that postReply doesn't need to return a promise.
Change-Id: Iab6192ba252244009d2374c9423d14279e8d1c4f
This is helpful when you ping the wrong person and need to correct your input.
Logically depends on I4c34e9368692b0ee4e7ca0f18ba2940406c62a9a
Change-Id: Iea89bdb5d93fe64902b692f04dd3a2e84e5517c3
* Run the 'wikipage.content' hook before our initialization.
This way collapsible elements and other changes to the page layout
are processed before we measure where the new reply is and try to
highlight and scroll it into view. (T252903)
* Remove the code dealing with 'mw-parser-output' and 'dt-init-done'.
This was needed to avoid initializing twice on the same element,
which can't happen now. (T254807)
This is much closer to the original approach Ed proposed in
I05a3c766668999f05cfe06473652429025595196 before I changed it:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/550693/7..8
Bug: T252903
Bug: T254807
Change-Id: Ibc3fcbd3c92c8eceda19b68cee9e69f6e92456f5
The automatic event from core didn't catch this, because it's not an action
method called "open".
Bug: T255638
Change-Id: Ifa456e850a8edb374df098e21b46bb872416ae55
Parsoid doesn't understand syntax expanded during pre-save transform,
e.g. [[User:Foo|]] or ~~~~, and it gets nowikied when switching back.
Change-Id: I791426d9d6c0a1399b1e95039b11e43a3e5bf79f
Current code breaks in other languages which don't use whitespace as a
word separator. The word-separator message is (for reasons) not reliably
set to something other than " " on wikis for those languages, so we
can't use it as a trigger for just not caring.
Bug: T255153
Change-Id: I1ff929811af59fd7a7bf7e8dfc1cd121a2c4db4e
This was removed upstream due to a regression.
We don't need it right now, but may need it in the future to
support editing, so replace with a TODO.
Change-Id: Ia73657080241319df309f3b6566ac0ac36a5909d
* Track editor mode switching between visual and source (plain)
* Track interactions with checkboxes
* Fix the tracking of firstChange when switching with content
Bug: T254291
Change-Id: I0e243e393b02952684f34dbbe1697633c0b2561a
Any template that outputs wikitext spanning more than one line
will break. As we can't enforce that in VE, we should just disable
all templates for now. The can still be inserted in source mode,
and will be eventually supported when we have multi-line syntax.
Bug: T253667
Change-Id: I72a7e4c09f83bcfc2a9cc7ab33a3d5303ced851d