Page MenuHomePhabricator

When opening a diff, highlight newly added comments
Open, Needs TriagePublicFeature

Assigned To
None
Authored By
matej_suchanek
May 1 2021, 9:32 AM
Referenced Files
F34620835: image.png
Aug 26 2021, 4:44 PM
F34620837: image.png
Aug 26 2021, 4:44 PM
Tokens
"Yellow Medal" token, awarded by Esanders."Love" token, awarded by SD0001.

Description

Basically, when there were many changes on a page you watch since you last visited it, you can show the diff of all these changes (using history or watchlist).
However, the diff often shows additions and removals mixed and much context is hidden (cf. T231698) because that's how diffs work. There are also novel VisualEditor-VisualDiffs, but they aren't optimal either.

So I propose that when you open a diff of a discussion (a page that would make use of the tools), the new comments (identified by the signature and timestamp where the comment timestamp is strictly greater than the timestamp of the base revision) are somehow highlighted on the page. (Motivation: These are the comments I am more likely to respond to.)

Event Timeline

matej_suchanek changed the subtype of this task from "Task" to "Feature Request".May 1 2021, 10:17 AM

Change 614907 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] POC: Show new comments on diff page

https://gerrit.wikimedia.org/r/614907

Test wiki created on Patch Demo by ESanders (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/465a55a295/w/

We built something similar when creating infrastructure for the topic subscriptions feature, so this should be mostly design work:

https://patchdemo.wmflabs.org/wikis/465a55a295/w/index.php?title=Talk%3AMain_Page&type=revision&diff=21&oldid=20

Change 714059 had a related patch set uploaded (by Matěj Suchánek; author: Matěj Suchánek):

[mediawiki/extensions/DiscussionTools@master] POC: When opening a diff, highlight newly added comments

https://gerrit.wikimedia.org/r/714059

Created an alternative to @Esanders' patch. Dirty, but worked for me locally.

Test wiki created on Patch Demo by Matma Rex using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/056a9f9530/w/

Demo page: https://patchdemo.wmflabs.org/wikis/056a9f9530/w/index.php?title=Project%3AVillage_pump_%28technical%29&type=revision&diff=246&oldid=231#Sortable_tables_on_Mobile

image.png (2×3 px, 489 KB)
image.png (2×3 px, 804 KB)

It looks cool, I think we could ship it ;) But there are probably a few questions to consider about the highlighting:

  • Should the highlights disappear and when? (e.g. when opening the reply tool)
  • Should there be some navigation between them? (e.g. when the diff includes comments in many sections all over the page, same problem as T286620#7234489 but more pronounced)
  • Should they be distinguished visually from the notification highlights?
  • Should this be a part of one of the "features" we currently have, or enabled for everyone, or disableable?

Definitely not enabled for everyone without an opt-out. This is a nice feature, but it can get very annoying; forcing people to use it can get quite a few new enemies for DiscussionTools.

Definitely not enabled for everyone without an opt-out. This is a nice feature, but it can get very annoying; forcing people to use it can get quite a few new enemies for DiscussionTools.

What about this feature do you think people would find annoying?

Change 758479 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/DiscussionTools@master] Add commentdiff API

https://gerrit.wikimedia.org/r/758479

Change 758479 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Add discussiontoolscompare API

https://gerrit.wikimedia.org/r/758479

Change 614907 abandoned by Esanders:

[mediawiki/extensions/DiscussionTools@master] POC: Show new comments on diff page

Reason:

Moved to API

https://gerrit.wikimedia.org/r/614907

Test wiki on Patch demo by Matma Rex using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/056a9f9530/w/