Jack_who_built_the_house added a comment.
I definitely need a better doc here, haha. You see, there are two stages at which an element may be excluded in CD: 1. The stage at which we collect valid //signatures// to form comments around them. 2. The stage at which we collect valid //comment parts// around signatures from stage 1, going back in the DOM. An element may be excluded at stage 1 (= a comment won't be formed around it) but still be considered a comment part at stage 2, and vice versa. 1. To list classes that should be excluded from stage 1, the noSignatureClasses <https://github.com/jwbth/convenient-discussions/blob/4da0d3ce19eb0a303f3e5a4c6d3636595bbc403f/config/default.js#L523> config property is used, accompanied by `noSignatureTemplates` directly below it. (The first is for the rendered web page, the second is for wikitext.) 2. To describe conditions that should halt stage 2, the rejectNode <https://github.com/jwbth/convenient-discussions/blob/main/config/default.js#L748> function is used. You have several options here: 1. (Recommended.) Just add `cd-moveMark` class to your "moved to/from" templates. This allows CD to correctly classify this element as a "moved to/from" template AND consider it part of comment BUT exclude it visually. E.g. if I click "Edit subject" on this screenshot, I'd still be able to edit the subject as part of the first comment: F81731777: image.png <https://phabricator.wikimedia.org/F81731777> 2. Alternatively or additionally, add `mw-notalk` class to your "move to/from" templates. This is a recommended way in DiscussionTools <https://www.mediawiki.org/wiki/Help:DiscussionTools/Magic_words_and_markup> to remove the "Reply" button from "moved to/from" templates. CD also supports it. 3. Alternatively or additionally, add any class //already// used by your "moved to/from" templates (e.g. `notice` or `metadata`) to the `noSignatureClasses` config property. In this case, for //all// elements with this class, no comments will be formed around them. In fact, you can do all 3! E.g. in enwiki, `noSignatureClasses` has <https://en.wikipedia.org/wiki/User:Jack_who_built_the_house/convenientDiscussions.js#L-433> this: noSignatureClasses: [ 'unresolved', 'resolved', 'ambox', // {{GA nominee|timestamp}} 'tmbox', 'NavFrame', ], I hope this helps. TASK DETAIL https://phabricator.wikimedia.org/T409653 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
_______________________________________________ pywikibot-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
