Page MenuHomePhabricator

WWT: Enable WWT for Older Versions of Page [medium]
Closed, ResolvedPublic

Description

As a WWT user, I want to use the tool for older versions of a page, so that I may quickly retrieve authorship data on old pages without scanning through History, diffs, or other pages.

Acceptance Criteria:

  • Allow WWT in older versions of page, including "diff" pages and any other older versions
  • WWT functionality should only apply to the article section (not diff information at the top of the page)
  • If WWT is enabled and the content area is still not visible, the page should automatically scroll to the beginning of the article section
  • The information bar should maintain the same basic behavior (e.g. properly load or display API error when WWT is toggled on; display name of contributor when user hovers over text; ability to close via "x" mark, etc)

Event Timeline

ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
ifried renamed this task from WWT: Enable WWT for Older Versions of Page to WWT: Enable WWT for Older Versions of Page [medium].Sep 12 2019, 5:38 PM
ifried moved this task from Needs Discussion to Up Next (May 6-17) on the Community-Tech board.
Samwilson subscribed.

I think the only remaining thing to do here is to scroll down to the content when activating WWT on a diff page.

PR: https://github.com/wikimedia/WhoWroteThat/pull/57

This might be wrong, but I've made it scroll down when the content is in the bottom part of the screen, as well as when it's completely off-screen. This is because I found a couple of diff views where it was just a few pixels within the viewport, and it didn't scroll, but you also couldn't see the content. We can changte this to some other threshold, or just do it when the content is out of sight.

For all other places where we want to show WWT, I think we're already handling them, mainly because one of the checks we do is whether there is article content to replace with WikiWho's HTML.

The last part of this (I think) is to handle the direction parameter to index.php, so we can send the correct revision ID to WikiWho (e.g. index.php?oldid=842970549&direction=prev shouldn't use 842970549 but rather 796373209).

dom_walden subscribed.

Acceptance Criteria:

  • Allow WWT in older versions of page, including "diff" pages and any other older versions

I checked in the browser network traffic that the correct revision ID was being passed in the WhoColor API call.

Including when using direction=prev as mentioned by Sam in T232059#5536942.

Applies to the diff view of an article but also to viewing an older version without the diff.

E.g. https://en.wikipedia.org/w/index.php?title=Elk_Creek_(Kansas)&diff=790932298&oldid=790930509 vs. https://en.wikipedia.org/w/index.php?title=Elk_Creek_(Kansas)&oldid=790930509.

  • WWT functionality should only apply to the article section (not diff information at the top of the page)

For example, the links in the diff section still work with WWT on.

  • If WWT is enabled and the content area is still not visible, the page should automatically scroll to the beginning of the article section

Tested on Chromium 73, Firefox 60, Edge 18 and Safari 12.

  • The information bar should maintain the same basic behavior (e.g. properly load or display API error when WWT is toggled on; display name of contributor when user hovers over text; ability to close via "x" mark, etc)

There appears to be a bug in Safari where the infobar remains at the top of the page, rather than following the browser's viewport. Applies to viewing the article normally, not just older version.

Otherwise, no problems seen.

ifried moved this task from Product sign-off to Done on the Community-Tech (Kanban-Q2-2019-20) board.

Thanks for the thorough QA analysis, Dom!

WWT is officially supported on Chrome and Firefox, so we can leave the Safari behavior as is.

I'm marking this work as Done.