Page MenuHomePhabricator

Add Revision Details Pop-up (WWT)
Closed, ResolvedPublic5 Story Points

Description

As a WWT user, I want to be able to view revision and contributor details associated with a particular word, so that I can learn more about the contribution and contributor.

Acceptance Criteria:

  • When WWT is activated, disable all links in the content area.
  • When a WWT user clicks on a word, a pop-up should appear.
  • The pop-up should display the following information: username of contributor (with standard "talk" and "contribs" links), timestamp of contribution, and percentage of page written by the user
  • The written format of the data should be displayed as follows: "[username] (talk | contribs), added this on [timestamp]. They have written [percentage]% of the page."
  • The links in the pop-up should open in a separate tab (rather than redirecting within the same tab).
  • The pop-up disappears when user clicks on any other word or part of the page.

Notes for Testing/QA

  • This should be tested for Chrome and Firefox browsers (desktop).
  • We'll want to determine what happens in the following scenario: If a user clicks on a link in the pop-up (such as the user talk page, diff, etc), a new tab should open up with this information. If the user clicks on the secondary tab with the linked info, and then they return to the primary tab with WWT, we'll want to see if WWT remains open (or if it occasionally needs to be reloaded). Let's record this behavior and, if there are loading issues, let the PM know so we can determine if additional work to support this use case will need to be managed in a separate ticket.

Visual Examples:

  • Note #1: For the visual specifications, you may refer to the CSS provided in the Zeplin project link. You can click on a particular element of the page to see detailed CSS info. Note that we will not be adding the edit summary information in this ticket.
  • Note #2: This ticket does not include the edit summary. The work to incorporate the edit summary into the pop-up is included in a separate ticket: T228941

Mockup:

Event Timeline

ifried created this task.Jul 23 2019, 8:22 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 23 2019, 8:22 PM
ifried updated the task description. (Show Details)Jul 23 2019, 8:25 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)Jul 23 2019, 9:35 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)Jul 23 2019, 9:38 PM
ifried updated the task description. (Show Details)Jul 23 2019, 11:01 PM
MusikAnimal updated the task description. (Show Details)Jul 23 2019, 11:12 PM
MusikAnimal updated the task description. (Show Details)
ifried set the point value for this task to 5.Jul 23 2019, 11:20 PM
ifried moved this task from To be estimated/discussed to Estimated on the Community-Tech board.
ifried updated the task description. (Show Details)Jul 29 2019, 7:39 PM
ifried updated the task description. (Show Details)Aug 3 2019, 12:30 AM
ifried updated the task description. (Show Details)Aug 3 2019, 3:01 AM
ifried renamed this task from Add Revision Details Pop-up to Add Revision Details Pop-up (WWT).Aug 7 2019, 9:12 PM
ifried updated the task description. (Show Details)Aug 7 2019, 11:30 PM
ifried updated the task description. (Show Details)Aug 8 2019, 7:13 PM
ifried updated the task description. (Show Details)
dom_walden added a subscriber: dom_walden.

Acceptance Criteria:

  • When WWT is activated, disable all links in the content area.

Any link that gets highlighted by WWT is disabled.

Links that remain enabled include infoboxes, tables, category lists and sometimes bibliography, citations, references and external links. I think this is partly due to WhoColor API not supporting templates (see T232097).

Also links within the article which allow users to edit remain enabled.

  • When a WWT user clicks on a word, a pop-up should appear.
  • The pop-up should display the following information: username of contributor (with standard "talk" and "contribs" links), timestamp of contribution, and percentage of page written by the user
  • The written format of the data should be displayed as follows: "[username] (talk | contribs), added this on [timestamp]. They have written [percentage]% of the page."

"talk", "contribs", [timestamp] are all in the language of the wiki, or the user's chosen interface language.

Otherwise, in English.

Percentage is to the nearest 1 decimal place. This can very occasionally lead to a percentage of "0.0%" (see screenshot below). Not sure if this is a major issue.

I wrote a Selenium script which parsed the HTML of the revision detail popup for each token on 5 random pages each from enwiki, eswiki, dewiki, euwiki and trwiki.

Another script compared the contents of the popup with what is returned by WhoColor API. The username, revision and percentage in the popup matched the API (with the exception of tokens effected by bug T231959).

  • The links in the pop-up should open in a separate tab (rather than redirecting within the same tab).
  • The pop-up disappears when user clicks on any other word or part of the page.

Confirmed. Pressing Esc also closes it and removes any highlighting.

Notes for Testing/QA

  • This should be tested for Chrome and Firefox browsers (desktop).

Most testing for this bug was done on Firefox 60. I have tested previous bugs more on Chromium 73.

However, the previously mentioned Selenium script was run on Chromium 76 (although that is only likely to find very obvious bugs).

  • We'll want to determine what happens in the following scenario: If a user clicks on a link in the pop-up (such as the user talk page, diff, etc), a new tab should open up with this information. If the user clicks on the secondary tab with the linked info, and then they return to the primary tab with WWT, we'll want to see if WWT remains open (or if it occasionally needs to be reloaded). Let's record this behavior and, if there are loading issues, let the PM know so we can determine if additional work to support this use case will need to be managed in a separate ticket.

I am not sure what exactly we mean by "secondary tab". If it just means going to the new tab that was opened, that would not appear to have any effect on WWT in the old tab. You can go back and forward fine.

Visual Examples:

It looks ok to me and I saw no graphical problems, but I did not test this very throughly.

I tested on Vector, but only briefly looked at MonoBook. The style of the popup in MonoBook is different, more in line with MonoBook as a whole. See screenshot.

ifried closed this task as Resolved.Fri, Sep 6, 6:45 PM

Regarding the "secondary tab," yes, the purpose of the test was understood correctly. Thanks.

I have also tested this and it looks good. I'm marking it as Done.