Clearing the widget removes all the surfaces, meaning there are
no doc-state variables to cleanup. Switch the order of these
two calls.
Change-Id: I6c095a171096cd700ce4cd31b08fa3b982ab2401
* Document all methods
* Rename comment to threadItem
* Use this.threadItem instead of passing in identical
threadItem in various methods.
* Don't pass threadItem to ReplyWidget as we already
pass the whole CommentController.
Change-Id: If9aad0bcf9f0e4ebf3342b75631ddac8b57f7d87
* We don't need it anywhere in JS, since we're not sending that HTML
to Parsoid.
* We only need it on the nodes directly containing our reply lines in
PHP, not all over the place.
Change-Id: I0a04388225f32654dda2f599442cd27a303b5d0a
When we encounter a node that doesn't represent comment contents, e.g.:
* a [reply] link we inserted (T297034#7641334)
* an {{outdent}} template (see changed test case)
…we should ignore it together with its descendants (like in
Parser#nextInterestingLeafNode), instead of processing descendants
and possibly detecting comment contents in them.
Follow-up to 8de940b587,
72b9c2c6f5.
Bug: T297034
Change-Id: Ib2fa40c5fa389572b0e88ef558728fa06e3621b0
In PHP, use DOMCompat::getClassList(), provided by Parsoid.
In JS, use `.classList`, available in all supported browsers.
This may fix some bugs where we were incorrectly checking for exactly
one class. The change in isOurGeneratedNode() is needed for
Ib2fa40c5fa389572b0e88ef558728fa06e3621b0.
Change-Id: Ia28d31678fd3d617b69280c4b7857755300fa515
Wikis like jawiki will then be able to customize the message to include
honorifics as they think appropriate.
Bug: T268588
Change-Id: I213fb9fd0a9ed6592ce3548a5b2c3b11a55c1abc
The following values for configuration variables are supported:
$wgDiscussionToolsReplyIndentation = 'invisible'; (default)
$wgDiscussionToolsReplyIndentation = 'bullet';
Bug: T259864
Change-Id: Icefad79630adc6ed35687498614e6a03ede1451b
Reimplement getFullyCoveredSiblings() using compareRanges(), which
checks basically the same thing, but works better and I like it more.
Bug: T297034
Change-Id: I33dc1d088bdee984064315290e378bfbfa830b10
Previously: 569db3603c (2020-06).
Unfortunately we've found cases where the previous implementation
doesn't work correctly, resulting in comments being added to the wrong
pages or page corruption.
Bug: T289873
Bug: T298051
Change-Id: Id867b3005ebc46906d6df852a525fcaec9e6b19b
For logged out users we store their test state and an anonymous
identifier in local storage. So long as the test is enabled, we include
these in any logging that occurs.
This is done entirely client-side, to avoid any cache issues caused by
state depending on cookies from PHP for logged out users.
Bug: T291307
Change-Id: Ib39e2f2146cdfdac9df5690ee3de75718f0f2731
To better support adding more links to the buttons group:
* Only disable the 'reply' link when the reply tool is open,
not all links in the button group. If future links need
to be disabled (e.g. 'edit') they can be done on a per-case
basis.
* Add a 'separator' class for adding more links.
* Don't hide 'reply' link when in use. This feature was added
very early on (I03a98495) and a long time before we started
greying-out all reply links when the tool was open (I3bb5ad8e7).
It would also lead to a strange display if there were
other links in the button group. Instead change the link to
black to indicate it is in use.
Change-Id: I23cc8d305d1d1c323cb69081749443f6e19de6a4
Set `overflow: hidden;` on the heading element to establish a new
block formatting context, which will contain floating elements.
Most skins already do this, but not Timeless.
https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Block_formatting_context
Bug: T298069
Change-Id: Ic7afd82095b7440cf8b61b3f3fd0085e755a773e
This matches the PHP implementation and was only used in
one place (when fetching authors in new topic tool).
Change-Id: I9d9e774616112e8dc6ab4919846e3abecc24553d