Page MenuHomePhabricator

Add Ability to Toggle on/off WhoWroteThat
Closed, ResolvedPublic3 Estimated Story Points

Description

Background: As a user, I want to be able to toggle on/off WhoWroteThat from the "Tools" sidebar, so that I can easily access (or exit) the tool's view.

Requirement:
• Add a link/button to toggle WhoWroteThat view on/off on the sidebar, under "Tools"
• The text of the link should read as follows: "Who Wrote That?"
• The "Who Wrote That" link should be the last in the order of tools (i.e. do not change the current order)
• If a user toggles on WWT, the WWT mode should display on an article page
• If the user toggles off WWT, the WWT mode should no longer display on an article page
• This should only appear in "Tools" when the user is viewing an article page in Read view.

Visual Example:

whowrotethatintroscreen.png (662×1 px, 383 KB)

Event Timeline

ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)
ifried set the point value for this task to 3.Aug 1 2019, 5:20 PM
Mooeypoo subscribed.

I have a PR for this here: https://github.com/wikimedia/WhoWroteThat/pull/16

Please note, it depends on the i18n pull request (https://github.com/wikimedia/WhoWroteThat/pull/15) please do not merge #16 before #15.

This PR fixes the following:

  • Add a link/button to toggle WhoWroteThat view on/off on the sidebar, under "Tools
  • The text of the link should read as follows: "Who Wrote That?"
  • The "Who Wrote That" link should be the last in the order of tools (i.e. do not change the current order)
  • If a user toggles on WWT, the WWT mode should display on an article page
  • If the user toggles off WWT, the WWT mode should no longer display on an article page
  • This should only appear in "Tools" when the user is viewing an article page in Read view.

Requirement:
• Add a link/button to toggle WhoWroteThat view on/off on the sidebar, under "Tools"

Toggling is being discussed here T231116.

• The text of the link should read as follows: "Who Wrote That?"
• The "Who Wrote That" link should be the last in the order of tools (i.e. do not change the current order)

Except on https://tr.wikipedia.org/wiki/, where it is second last. Appears to be due to some sitewide JS (https://tr.wikipedia.org/wiki/MediaWiki:Common.js) that runs for all users visiting that site, that dynamically adds a link to here.

@Mooeypoo Anything we can do about this? @ifried Do we mind?

• If a user toggles on WWT, the WWT mode should display on an article page
• If the user toggles off WWT, the WWT mode should no longer display on an article page

See above. It can be dismissed by clicking the "x" button on the infobar.

The article's text is no longer highlighted and most of the HTML of the article returns to normal.

There are some things which aren't returned to normal (e.g. links to Commons images become links to the local version of the file T231424). Some appear to be due to bugs in the API. I will raise these separately.

There is also the bug Moriel found during the demo (T231417).

• This should only appear in "Tools" when the user is viewing an article page in Read view.

Since this commit we no longer load it on Special pages (to deal with potential performance/hanging problems).

Otherwise, I can only see it on articles.

• The "Who Wrote That" link should be the last in the order of tools (i.e. do not change the current order)

Except on https://tr.wikipedia.org/wiki/, where it is second last...

...Do we mind?

I don't believe so at the moment.

I think it's okay if it's second to last in TR wiki. I'm marking this work as Done.