Page MenuHomePhabricator

Make notification counts update without page reload
Closed, ResolvedPublic

Description

Extension:Echo provides a notification system for MediaWiki. This system includes a set of icons in the header that are updated with a count of notifications on page load. There is a long-standing request for the notifications count to update without requiring a page reload, similar to how Special:RecentChanges provides live updates.

This project will involve:

  • updating the notifications count via a polling mechanism. There is some existing code (Echo/+/126201, Echo/+/239766) and discussion that can be used as a reference point.
  • (optional) Writing the code and user preference to temporarily display the notification text using the mw.notify() library
  • (optional) Providing a visual cue that the count has updated

Skills required Knowledge of JavaScript. PHP knowledge will be helpful

Mentors Kosta Harlan (@kostajh), Roan Kattouw (@Catrope)

Microtasks

Related Objects

StatusSubtypeAssignedTask
ResolvedNone
InvalidNone
InvalidWikinaut
OpenNone
OpenFeatureNone
Resolved demon
DuplicateNone
DeclinedQuiddity
ResolvedNone
ResolvedGalorefitz
DeclinedNone
OpenFeatureNone
Resolvedkostajh
OpenNone
StalledNone
OpenNone
ResolvedShivanshbindal9
ResolvedShivanshbindal9
OpenNone
ResolvedShivanshbindal9
ResolvedShivanshbindal9
ResolvedShivanshbindal9
OpenNone

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Catrope updated the task description. (Show Details)

Hi @kostajh @Catrope, I am a sophomore at Indian Institute of Technology, Roorkee, India. I have a good experience in Javascript, React, Python, Django(python), PHP, Yii2(PHP framework). I have been contributing to various projects of WikiMedia for some time such as WikiEduDashboard and MediaWiki Action API and have got some PR's merged. I recently came across the project idea and will like to contribute to this project either in GSoC 19 or apart from GSoC 19 would be fine too. I have already started working on the microtasks and will soon add patches for review once I get the developer's account.

Hello @kostajh @Catrope, I have certain doubts regarding the project

  1. Along with making live updates on https://www.mediawiki.org/wiki/Special:Notifications similar to that in Special:RecentChanges do we need to make the counter of notifications change itself using polling mechanism as mentioned in the discussion?
    notice_bar.png (49×741 px, 7 KB)
  2. The user should be notified of any notification on any page not just only on the notification page (Writing the code and user preference to temporarily display the notification text using the mw.notify() library)

I'll be highly grateful if you could please help me with it.
Thank you

Along with making live updates on https://www.mediawiki.org/wiki/Special:Notifications similar to that in Special:RecentChanges do we need to make the counter of notifications change itself using polling mechanism as mentioned in the discussion?

@Shivanshbindal9 the primary goal for this project is to update the notification counter in the header, along with a visual indicator that there are new notifications. Making Special:Notifications update via polling is an optional follow-up item.

The user should be notified of any notification on any page not just only on the notification page (Writing the code and user preference to temporarily display the notification text using the mw.notify() library)

Yes, the idea is to have this happen on any page. But this is an optional task and the details could be decided out later.

I have already started working on the microtasks and will soon add patches for review once I get the developer's account.

That's great! Looking forward to seeing the patches. :)

JTannerWMF subscribed.

We are moving this to External because it is for the Google Summer of Code program.

Hi @kostajh, should I work on some microtasks, as some new microtasks have been added, or should I start with the proposal, as you advised me to?
I would be really grateful if you could help.
Thank you

Hi @kostajh @Catrope , I am almost done with my proposal (https://phabricator.wikimedia.org/T220324). I don't want to seem to interrupt but I'll be grateful if you could review it and suggest changes so that I can refine my proposal.
Thank you

Change 512943 had a related patch set uploaded (by Shivanshbindal9; owner: shivanshbindal9):
[mediawiki/extensions/Echo@master] This is a sample module for notification count update without page reload.

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

Change 512943 abandoned by Shivanshbindal9:
Make notification count update without page reload

Reason:
The new implementation using MVC is addressed in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Echo/ /516285/

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

Change 516285 had a related patch set uploaded (by Shivanshbindal9; owner: shivanshbindal9):
[mediawiki/extensions/Echo@master] Make Notification count update without page reload

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

Change 516285 merged by jenkins-bot:
[mediawiki/extensions/Echo@master] Make Notification count update without page reload

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

Change 530639 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[operations/mediawiki-config@master] Echo: Enable poll for updates feature on testwiki

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

Change 530640 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[operations/mediawiki-config@master] Echo: Enable poll for updates feature on enwiki beta

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

Change 530640 merged by jenkins-bot:
[operations/mediawiki-config@master] Echo: Enable poll for updates feature on enwiki beta

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

Is there anything remaining in this task from GSoC'19? If not, then please consider marking it as resolved! If yes, and would need another GSoC or volunteer help then consider creating a new task with the leftover items. Thanks!

Change 530639 abandoned by Kosta Harlan:
Echo: Enable poll for updates feature on testwiki

Reason:
Not needed at the moment.

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

Change 530639 restored by Kosta Harlan:
Echo: Enable poll for updates feature on testwiki

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

Change 530639 abandoned by Kosta Harlan:

[operations/mediawiki-config@master] Echo: Enable poll for updates feature on testwiki and mediawikiwiki

Reason:

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