Page MenuHomePhabricator

Implement topic subscription notification bundling
Closed, ResolvedPublic

Description

This task is about deciding on and implementing the logic for how topic subscription notifications will get "bundled" /"grouped" within Echo's notice drawer/tray. [i]

Thank you to @Pelagic for raising this issue.

Stories

In progress...
As someone who is subscribed to a discussion in which many new comments are being posted within a "short" time period:

  1. I want to be able to see notifications for those comments en masse, so they do not overwhelm other notifications and cause me to miss notifications about other activity.
  2. I want the notifications for these comments to be grouped in such a way that I feel confident taking an action (e.g. marking them as read, visiting the discussion to which these comments have been posted) on that bundle.
  3. I want to be able to triage those notifications (e.g. mark them as read) en masse, so that I don't need to spend unnecessary time and effort taking the same action, with the same impact, multiple times.

Requirements

Requirements will be populated once the Open questions below have been answered.

Open questions

  • 1. What are the criteria for when notifications are bundled together? In other words, what does the bundle string look like?
    • They are bundled by the topic in which the comments were posted.
  • 2. What text is shown for bundled notifications? This is usually different from a normal notification, e.g. "3 people thanked you for your edit on XYZ" instead of "Ed thanked you for your edit on XYZ", and usually focuses on what the bundled notifications have in common
    • "N new replies in <thread name>"
  • 3. What text is shown for the individual notifications in a bundle? This usually focuses on what is different, e.g. "Ed thanked you", "Jess thanked you"
    • "<username>: Text of reply"
  • 4. When the user clicks the bundle, where should they go? Clicking the "Expand" link expands the bundle, but clicking elsewhere usually takes you somewhere. Typically this is to the thing that the notifications have in common. For example, clicking a single notification that says "Ed posted on your user talk page" would take you to Ed's post, but clicking a bundle that says "3 people posted on your user talk page" would just take you to your user talk page, but not to a specific post/section
    • It takes you to the latest reply. We will be revisiting this approach in T286620.

Thank you to @Catrope for sharing the above questions with the Editing-team and helping us to understand, more broadly, how notifcation grouping/bundling works in Echo.

Testing instructions

Minimal test case

  1. Visit: https://en.wikipedia.beta.wmflabs.org/wiki/Special:Preferences#mw-prefsection-betafeatures
  2. Enables the Discussion tools beta feature, if it is not already
  3. Visit a talk page: https://en.wikipedia.beta.wmflabs.org/wiki/Talk:Cats
  4. Click the [ subscribe ] affordance on a section of your choosing
  5. In a private window, visit: https://en.wikipedia.beta.wmflabs.org/wiki/Special:Preferences#mw-prefsection-betafeatures
  6. Post a new comment using an editing interface of your choosing to the section you subscribed to in "Step 4."
  7. Switch back to the browser window you used to execute Steps 1 through 4
  8. Verify the blue "badge" appears on the notice icon, alerting you that you have a new notification about the comment that was posted in "Step 6."

Special cases

  • Generate various notifications of various types (e.g. topic subscription & mention notifications) and from various topics
  • Ensure sure that only topic subscription notifications from the same thread are bundled
  • Ensure that the links in bundled notifications are correct

Done

  • All Open questions have been answered
  • The Requirements have been implemented

i. Echo's notice drawer/tray
image.png (612×1 px, 72 KB)
source: File:Screenshot_of_Echo_notification_extension

Event Timeline

ppelberg updated the task description. (Show Details)
ppelberg updated the task description. (Show Details)

This has been implemented in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DiscussionTools/+/663894 (it should have been tagged with this task).

We might still want to change the details though. Here's how the current implementation answers the questions:

  1. What are the criteria for when notifications are bundled together? In other words, what does the bundle string look like?

They are bundled by the topic in which the comments were posted.

(Also, reply notifications are never bundled together with notifications of other types, e.g. mentions.)

  1. What text is shown for bundled notifications? This is usually different from a normal notification, e.g. "3 people thanked you for your edit on XYZ" instead of "Ed thanked you for your edit on XYZ", and usually focuses on what the bundled notifications have in common
  2. What text is shown for the individual notifications in a bundle? This usually focuses on what is different, e.g. "Ed thanked you", "Jess thanked you"
  • "N new replies in <thread name>"
  • "<username>: Text of reply"

image.png (693×1 px, 51 KB)

  1. When the user clicks the bundle, where should they go? Clicking the "Expand" link expands the bundle, but clicking elsewhere usually takes you somewhere. Typically this is to the thing that the notifications have in common. For example, clicking a single notification that says "Ed posted on your user talk page" would take you to Ed's post, but clicking a bundle that says "3 people posted on your user talk page" would just take you to your user talk page, but not to a specific post/section

It takes you to the latest reply.

Ryasmeen subscribed.

Moving it to this column after talking with @ppelberg.

Action

  • Engineering to add ===Testing instructions to the task description

Action

  • Engineering to add ===Testing instructions to the task description

This is done. I've also added the **Minimal test case** per the conversation @Ryasmeen and I had offline.