Page MenuHomePhabricator

Add Ability to Toggle on/off WhoWroteThat
Closed, ResolvedPublic3 Estimate 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:

Event Timeline

ifried created this task.Jun 27 2019, 7:06 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 27 2019, 7:06 PM
ifried updated the task description. (Show Details)Jul 31 2019, 4:00 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)Jul 31 2019, 4:04 PM
ifried updated the task description. (Show Details)Jul 31 2019, 4:40 PM
ifried updated the task description. (Show Details)Jul 31 2019, 6:35 PM
ifried updated the task description. (Show Details)
ifried updated the task description. (Show Details)Jul 31 2019, 9:03 PM
ifried set the point value for this task to 3.Aug 1 2019, 5:20 PM
Mooeypoo claimed this task.Aug 4 2019, 9:54 PM
Mooeypoo added a subscriber: Mooeypoo.

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.

Mooeypoo added a comment.EditedAug 5 2019, 5:22 AM

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.

ifried moved this task from Backlog to In progress on the Who-Wrote-That board.Sep 10 2019, 8:36 PM
ifried closed this task as Resolved.Sep 10 2019, 10:41 PM

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