Page MenuHomePhabricator

[Bug] Orange talk alert does not disappear in new Vector after clicking "Mark all as read"
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

Steps to reproduce

  1. In an incognito window, go to your user's talk page on beta (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/User_talk:Nray_beta)
  2. Click the "New section" tab.
  3. Write "Hello" for the "Subject/headline" field. Write Hello [[User:Nray_beta]] ~~~~ for the body making sure to replace Nray_beta with your user's username.
  4. Click Publish changes
  5. Go to https://en.wikipedia.beta.wmflabs.org and login with your user.
  6. You should see the orange alert saying "You have a new Talk page message".
  7. Click the bell icon to open the alerts popover.
  8. Click the "Mark all as read" button

Expected results

  • After clicking the "Mark all as read" button, the orange talk alert should disappear

Actual results

  • After clicking the "Mark all as read" button, the orange talk alert remains in place

talk-alert.gif (780×1 px, 438 KB)

Environments observed

  • Browser version: Chrome Version 91.0.4472.77
  • OS version: Big Sur
  • Device model: MacBook Pro
  • Device language: En

Check any additional observations

Developer notes

Echo expects an element with an id of pt-talk-alert. In new Vector (this isn't a problem in legacy Vector), an id of ca-talk-alert gets assigned instead:

id.png (168×654 px, 39 KB)

To fix this, we can explicitly set an id of pt-talk-alert in Echo:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Echo/+/700717

QA Results - Beta

ACStatusDetails
1T285442#7249897

QA Results - Prod

ACStatusDetails
1T285442#7249909

Event Timeline

Change 700717 had a related patch set uploaded (by Nray; author: Nray):

[mediawiki/extensions/Echo@master] Explicitly set 'pt-talk-alert' id for talk alert

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

ovasileva triaged this task as Medium priority.Jun 24 2021, 9:17 AM

@Jdlrobson This bug will only surface on new Vector when $wgVectorConsolidateUserLinks = [ 'logged_in' => true ] . Given that $wgVectorConsolidateUserLinks is not enabled in production yet, I don't think it's currently affecting users

Edit: More specifically, it will affect anything that uses the data-notifications portlet (which new Vector uses when the wgVectorConsolidateUserLinks flag is enabled). It looks like there is at least one other skin (Mirage) that uses this [1] so it might be affecting that skin as well

[1] https://gerrit.wikimedia.org/g/mediawiki/skins/Mirage/+/e816f43f9f8ec872ed61e2e06b353688b08a7be8/resources/templates/Header.mustache#16

We estimated this a small based on the simplest option of changing the id to pt-talk-alert in Echo. If we want to instead change the default id for this in core, then we should reestimate this ticket as that work would likely be larger than a small.

bwang removed bwang as the assignee of this task.Jul 13 2021, 4:24 PM
bwang moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2020-21) board.
bwang subscribed.

Change 704351 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/extensions/Echo@master] Hardcode talk alert id to be pt-talk-alert

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

Change 700717 abandoned by Nray:

[mediawiki/extensions/Echo@master] Explicitly set 'pt-talk-alert' id for talk alert

Reason:

see I3b46a494682b3b5055f525c0c1219a1710655ce5

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

Change 704351 merged by jenkins-bot:

[mediawiki/extensions/Echo@master] Hardcode talk alert id to be pt-talk-alert

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

Edtadros subscribed.

Test Result - Beta

Status: ❌ Fail
Environment: beta
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

In an incognito window, go to your user's talk page on beta (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/User_talk:Nray_beta)
Click the "New section" tab.
Write "Hello" for the "Subject/headline" field. Write Hello [[User:Nray_beta]] ~~~~ for the body making sure to replace Nray_beta with your user's username.
Click Publish changes
Go to https://en.wikipedia.beta.wmflabs.org and login with your user.
You should see the orange alert saying "You have a new Talk page message".
Click the bell icon to open the alerts popover.
Click the "Mark all as read" button

❌ AC1: Orange Alert should disappear.

Screen Recording 2021-07-29 at 12.35.43 PM.mov.gif (920×870 px, 744 KB)

Orange alert does not disappear unless I refresh the page.

Thanks @Edtadros !

Something interesting is going on here as it seems to work for me:

record.gif (1×1 px, 1 MB)

Also working for me. @Edtadros could you try again? This time could you open your developer console and see if an errors show there?

@nray / @Jdlrobson I must've had some gremlins in my machine. It works fine now. I can't reproduce the issue. I'll update the results and pass it.

Test Result - Beta

Status: ✅ Pass
Environment: beta
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

In an incognito window, go to your user's talk page on beta (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/User_talk:Nray_beta)
Click the "New section" tab.
Write "Hello" for the "Subject/headline" field. Write Hello [[User:Nray_beta]] ~~~~ for the body making sure to replace Nray_beta with your user's username.
Click Publish changes
Go to https://en.wikipedia.beta.wmflabs.org and login with your user.
You should see the orange alert saying "You have a new Talk page message".
Click the bell icon to open the alerts popover.
Click the "Mark all as read" button

✅ AC1: Orange Alert should disappear.
The issue seen in T285442#7247201 was not reproducible

Screen Recording 2021-07-30 at 5.09.37 PM.mov.gif (1×814 px, 556 KB)

Screen Recording 2021-07-30 at 5.04.34 PM.mov.gif (1×814 px, 866 KB)

Test Result - Beta

Status: ✅ Pass
Environment: beta
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

In an incognito window, go to your user's talk page on beta (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/User_talk:Nray_beta)
Click the "New section" tab.
Write "Hello" for the "Subject/headline" field. Write Hello [[User:Nray_beta]] ~~~~ for the body making sure to replace Nray_beta with your user's username.
Click Publish changes
Go to https://en.wikipedia.beta.wmflabs.org and login with your user.
You should see the orange alert saying "You have a new Talk page message".
Click the bell icon to open the alerts popover.
Click the "Mark all as read" button

✅ AC1: Orange Alert should disappear.

Screen Recording 2021-07-30 at 5.23.16 PM.mov.gif (1×814 px, 903 KB)