Page MenuHomePhabricator

Gadget: Who is Active
Closed, ResolvedPublic

Description

Original Wish

Problem: Sometimes you look for any active user on a list of users (campaigns, WikiProjects, experts etc.) to make a request. Often you have to check many of them until you find one active. Sometimes no one on a given list has been active for years and only time is wasted.
Proposed solution: There is a script that allows to see, after entering the user's page, when the user made the last edit. Perhaps we could build a tool that would present such information next to the link to the user page, just like the gadget "Replies with links" does. The displayed information could be the date of the last edition, or the active / inactive icon, if the user also set in their .css the range to which someone is considered as active (X minutes, X hours, X days, etc.).
Who would benefit: Organizers, Wikimedians looking for active users on various lists

Context

This gadget was developed during the Spring Community Tech WMF Hackathon. The requirements below are meant to be abstracted information without being too invasive. We do not want to betray the intricate details of accuracy of the last time someone was active, we just want to provide useful information about their level of recent engagement on the platforms.

Requirements

As a user of this gadget, I am be able to:

  • Opt into the gadget from preferences under Gadgets
  • See a visual indicator next to a user name that will explain one of two:
  • - The user is edited recently (this mean they have edited in the past month)
  • - The user is edited this year
  • - The user edited over a year ago

Decisions

Feel free to challenge assumptions, but I figured this would reduce complexity and get us to build the user value

  • When a user has the gadget enabled the visual indicators of an active versus inactive will be available on all pages
  • The gadget runs in the full page, not only a section of a page
  • The information appears next to the username

Designs incoming!

Open Questions

  • Are there any privacy concerns to clear/.
  • what should the activity indicator look like? A date of last activity? A text indicator (active/inactive) or icon - in which case, how would we designate the definition of active vs. inactive?
  • should the activity indicator be always visible or should it be a popup?
  • would it be useful to have a popup somewhere (where?) on the page that would give an ordered list of users (all on the page? only those in a section?) sorted from most recently to least recently active?
  • If it is next to the username, this reduces the need for a pop-up, designs incoming (We definitely don't want to risk of crowding the page)

Event Timeline

@CCicalese_WMF mind linking to the patches and a short description of how it was deployed in Mediawiki? Can resolve if so! Thanks for your amazing work on this

Some notes from the CommTech Hackathon on the prototype implementation of this feature:

Design Decisions:

  • Gadget should operate on the entire page, not just a marked section of a page
    • An early prototype only worked on part of a page tagged with a pre-defined class, but that would mean editing the pages, so the responsibility for indicating activity would be on the editor of the page, not the viewer of the page
  • Gadget should bail early if there are no links to user pages on the page being rendered (for performance)
  • Gadget should ignore links to subpages of a user page

Implementation:

  • Use jQuery to find user page links on page
  • Use array of arrays of localized messages so translations could be contributed
  • Use usercontribs action API endpoint
  • Use text and OOUI icon to indicate activity

Open Questions:

  • Should it show global user activity rather than only activity on the current wiki?
    • If so, how?
  • Should there be any user customization?
    • Time periods for activity indicators?
    • Global vs. local activity?

Status:

  • Initial implementation is live as an experimental gadget on mediawiki.org

Links:

Lectrician1 claimed this task.
Lectrician1 subscribed.

You can enable this gadget on a wiki by adding this to your common.js:

mw.loader.load( '//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-whoisactive.js&action=raw&ctype=text/javascript' );

Or you can add that to your global.js on Meta-wiki at https://meta.wikimedia.org/wiki/User:<YOUR USERNAME>/global.js to enable it on all wikis.

@Lectrician1 is there documentation for this somewhere? If so, would you please link to it from [[mw:MediaWiki:Gadget-whoisactive]]?

(Perhaps @PeterBowman per the meta-wiki survey notes)