This task involves the work of extending the work we did in T274216, to create a way of explicitly tagging talk page comments.
Requirements
Meta
- Anytime a "qualifying edit" is saved to a talk page assign a hidden discussiontools-added-comment revision tag.
- The hidden discussiontools-added-comment revision tag should be applied to all "qualifying edits" regardless of the editing interface someone used to save said edit.
Qualifying edit
Any edit that adds a talk page comment, according to our talk page parser, using the same algorithm as for generating notifications. It's somewhat complicated (and still changing as we make improvements to the notifications), but hopefully intuitively obvious? Latest version of the code for reference: EventDispatcher.php.
To better support the use cases, there will be minor differences compared to the notifications:
- Notifications are only generated for comments signed by the same user who makes the edit; the tag will also be applied if e.g. someone (or a bot) signs an unsigned comment.
- Notifications are only generated for comments in sections that you can subscribe to; the tag will be applied even in those cases, e.g. for comments in the 0th section of the page (before the first heading, or on a page with no headings) or comments under a section other than level 2 (e.g. === ... === as opposed to the normal == ... ==).
Use cases
Explicitly tagging edits as comments will enable us to answer questions like the below which will help us all better understand how Discussion Tools are impacting the way people use talk pages.
- "Of all the comments people posted in a specified period, what percentage of comments did people use the Reply Tool to publish?"
- "How does the Reply Tool impact the average number of comments Junior and Senior Contributors" post on a talk page each month?"
- "On average, how long does a discussion last (first to last timestamp)."
- "On average, how many comments does a particular section have?"
- This could relate to T274215.
- "On average, how much time elapses between a conversation starting and another person commenting?"
- This could relate to T274215.
Open questions
- How should "Qualifying edits" be defined? @MNeisler needs to know this so she can know definitely what edits are and are not included in this definition
- Being discussed in T284200#7152688.
- To start, we're going to define "qualifying edits" using the same logic we used to identify new comments in the context of topic subscriptions. More in T262107#7222207.
-
Is it possible to apply tags to historical edits?- Tagging historical edits is out of scope for this initial implementation. Reason: we are going to first verify the tagging logic is precise enough to be valuable before extending it to historical edits.
- What performance implications need to be considered?
- Regarding the possible performance implications, we estimate there to be significantly fewer edits tagged as comments than there are edits tagged, as say, a mobile edits. [i] As such, we do not anticipate the Performance Team being concerned about this task. Although we've asked them to verify this assumption in T262107#7152858.
-
How can the software tag/categorize edits as comments and new sections in real-time (read: as they happen)?- This will be worked out as part the implementation of the ===Requirements above.
-
How might this tagging happen in a way that doesn't slow down the save process?- This will be worked out as part the implementation of the ===Requirements above.
-
How/where do these tags get stored (e.g. Special tags)?- This will be worked out as part the implementation of the ===Requirements above.
Testing instructions
At ar.wiki, en.wiki, he.wiki, bn.wiki, and ru.wiki do the following:
- Visit Special:Tags
- Locate the discussiontools-added-comment row
- Within the discussiontools-added-commentrow, find the Tagged changes colun
- Click the tagged changes link, this will open Special:RecentChanges
- (note: there are a few known issues with hidden tags on Special:RecentChanges, we're working on them in another task: T281741)
- Pick a set of 5 random diffs
- Verify each diff contains a new comment
- Ideally it's intuitive to you whether a diff contains a new comment or not. Tho, if you have questions, please post the link to the ambiguous diff in the ticket.
Done
- All "Open questions" are answered
- Logic being used to determine a "Qualifying edit" is documented in the ===Requirements section
- "Qualifying edits" are being assigned a hidden change tag called discussiontools-added-comment