Page MenuHomePhabricator

Bundled notifications get processed singly
Closed, ResolvedPublicBUG REPORT

Description

User story

As someone who has received ≥2 new comment notifications, I want to be able to identify all of the new comments I am being notified about on the talk page to which they have been posted, so that I can get up to date on the conversation.

Behavior

  1. Subscribe to a busy section.
  2. Wait for Echo/Notifications to pile up.
  3. Be happy that it says "12 new replies in Section" in a bundle.
  4. Click the bundle link.

Actual

  1. You get taken to the most recent comment. Only the most recent comment gets highlighted in blue. Only the most recent comment gets marked as read in the bundle.

Desired

  1. ✅ The viewport is scrolled so the top-most unread comment is in focus. All of the bundled comments should be highlighted in blue. All of the bundled comments should get marked as read as a unit.

Open questions

  • 1. What happens when the new comments you are being notified about cannot fit within the viewport? Where should the viewport be scrolled? E.g. scroll to the least recent comment, the most recent comment, the comment that appears first on the page?

Decision: The viewport should be scrolled to the topmost unread comment

  • 2. What happens when the new comments are do not appear within a cogent sequence on the page?

Decision: All new comments for which you are being notified in the bundle should be highlighted

Event Timeline

What happens:
Only the most recent comment gets highlighted in blue.
Only the most recent comment gets marked as read in the bundle.

I can reproduce the first problem, but not the second – all of the bundled notifications get marked as read for me.

What happens:
You get taken to the most recent comment.

This behavior is incorrect, but you do not mention what should happen here. We should not take you to the most recent comment, and also not to the least recent comment, but rather to the top-most of the recent comments (the one that appears first on the page).

Also, what if the section is so long and the new comments are in so many different places, that not all of them fit on the screen? I guess we might just do nothing special, and hope that the user scrolls down to see them. Maybe we should have something to indicate that, but I don't have a good idea for how it would look like.

  • ADDED === User story to task description
  • ADDED the questions @matmarex raised in T286620#7234489 to the open questions

Change 710594 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Handle highlighting and scrolling to comments for bundled notifications

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

Change 710594 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Handle highlighting and scrolling to comments for bundled notifications

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

Change 715504 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/DiscussionTools@master] Fix finding topmost comment when there are 3+ highlighted

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

Spotted an issue today while testing/discussing on en.wp (T290006), this patch fixes it.

Change 715504 merged by jenkins-bot:

[mediawiki/extensions/DiscussionTools@master] Fix finding topmost comment when there are 3+ highlighted

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