Page MenuHomePhabricator

Special:Investigate: Onboarding: Restart tour and help links
Closed, ResolvedPublic3 Estimated Story PointsAug 11 2020

Description

Acceptance criteria
To be added on all pages of Special:Investigate:

(the three links in the subtitle should be separated with a |)


Figure out where the help links will be shown. Also, do we want a link to be able to restart the guided tour? Should that be in preferences?

Event Timeline

Prtksxna moved this task from Design to Cards ready to be discussed on the Anti-Harassment board.
Prtksxna added a subscriber: Niharika.
ARamirez_WMF changed the subtype of this task from "Task" to "Deadline".

Change 617281 had a related patch set uploaded (by Dbarratt; owner: Dbarratt):
[mediawiki/extensions/CheckUser@master] Add help links and link to restart tour on SpecialInvestigate

https://gerrit.wikimedia.org/r/617281

Niharika triaged this task as Medium priority.Jul 29 2020, 11:19 PM

@Prtksxna Before we go ahead on this, I wanted to note how help links work in MediaWiki special pages (and apologies if I'm repeating things you're already aware of!).

SpecialPage has a method addhelpLink, which calls OutputPage::addHelpLink, which sets the help link as a page indicator. Page indicators are recognised by skins and the parse API.

The same applies to OutputPage::addSubtitle, which is often used by special pages use for adding links to relevant pages.

Having this predictable page structure helps different skins (including for mobile) find the different parts of the page, and display the page consistently (https://www.mediawiki.org/wiki/Manual:Skinning_Part_1).

I think it would be better to use this framework, rather than manually adding our own anchors in a custom place. This would mean placing our links in page indicators and/or the page subtitle. What do you think?

Thanks for explaining this @Tchanders!

I think it would be better to use this framework, rather than manually adding our own anchors in a custom place. This would mean placing our links in page indicators and/or the page subtitle. What do you think?

Yes that would be ideal. But, in not considering the help links sooner, I'm afraid I've used up the standard places. Am I correct in understanding that 'page indicators' is where we have the Log and New Investigation, and 'subtitle' is where we have the blue box?

Can we use the standard method but move it somewhere else? I'd understand if that question is senseless.

Am I correct in understanding that 'page indicators' is where we have the Log and New Investigation

That is correct. Having links to the log and to restart an investigation in the subtitle would be more in keeping with the existing framework.

and 'subtitle' is where we have the blue box?

This isn't actually the case - although we call it 'subtitle' in the code, we're actually just prepending the HTML to the body text.

Can we use the standard method but move it somewhere else?

(Sorry I missed this question before!) In theory we could pick up the indicators/subtitle in the JavaScript and move it somewhere else, but that would defeat the point of the skins having control, so I wouldn't advise it.

Prtksxna updated the task description. (Show Details)

I found that Special:Block has somewhat similar links at the bottom in case that helps: https://meta.wikimedia.org/wiki/Special:Block

image.png (400×2 px, 73 KB)

@Niharika Thanks for the example.

These links are added via FormSpecialPage::addPostText (which calls SpecialBlock::postText), which will add content to the end of the form. On the Special:Investigate results pages, that would be below the filters form, but above the results.

@Niharika Thanks for the example.

These links are added via FormSpecialPage::addPostText (which calls SpecialBlock::postText), which will add content to the end of the form. On the Special:Investigate results pages, that would be below the filters form, but above the results.

To @Niharika's point, HtmlForm::addPostText() just appends a string of HTML, there isn't anything special about it and it doesn't inform the skins of a special location to be handled. If this is how it is in core, I think it's fine to do something similar (append an HTML string to the end like I am doing in the work in progress patch) on our special page.

I don't see any technical issues with the work-in-progress patch I've provided, other than the additional QA work in order to ensure that the links look correct in skins we support. Though this is already being done for Special:Block as @Niharika has pointed out.

@dbarratt, @Prtksxna and I discussed this task in stand-up today, resulting in the current acceptance criteria.

@Niharika Are you asking us to change the acceptance criteria again?

I am sorry, I am not asking us to change the acceptance criteria. I found those links as an example of something similar being done elsewhere, so I pointed it out in case it helps with the technical work. I am okay with the acceptance criteria as decided by Prateek.

OK great - thanks for the clarification @Niharika. It's helpful to have that Special:Block example for the task @dbarratt raised (thanks for raising).

Also noting that we discussed doing the feedback link via WikimediaMessages, so that it's not tied to this version of CheckUser.

@Prtksxna Does this look good? Should the "New Investigation" and "Logs" buttons become links? Should there be more spacing to the left of the help icon?

Screenshot_2020-07-31 Investigate - MediaWiki.png (350×594 px, 10 KB)

Change 617830 had a related patch set uploaded (by Dbarratt; owner: Dbarratt):
[mediawiki/extensions/WikimediaMessages@master] Add 'Leave Feedback' link to Special:Investigate

https://gerrit.wikimedia.org/r/617830

Change 617832 had a related patch set uploaded (by Dbarratt; owner: Dbarratt):
[integration/config@master] Add CheckUser as a integration dependency of WikimediaMessages

https://gerrit.wikimedia.org/r/617832

@Prtksxna - We have a few questions about the "restart tour" link:

When should the link be visible? At the moment, after you complete or dismiss a tour, the restart link isn't visible until the next page reload.

What should clicking on the link do? At the moment, it takes you back to the original form, as if starting a new investigation.

There are currently two separate tours: one on the original form page, and one on the Compare tab. Should they be separate? If so, should clicking the link restart them both?

Change 618105 had a related patch set uploaded (by Dbarratt; owner: Dbarratt):
[mediawiki/extensions/CheckUser@master] Add CheckUserHookRunner to the service container

https://gerrit.wikimedia.org/r/618105

@Prtksxna Does this look good?

Yes, thanks for sharing the screenshot @dbarratt !

Should the "New Investigation" and "Logs" buttons become links?

No, I think they should continue as buttons.

Should there be more spacing to the left of the help icon?

Yes, at least as much as the padding inside the Log button. I can provide a specific value, but I am not sure which unit is used here.


When should the link be visible? At the moment, after you complete or dismiss a tour, the restart link isn't visible until the next page reload.

I think it can be always visible. The first time you wont notice it as much anyway since the tour will be on, and if you dismiss it by mistake you have the link there.

What should clicking on the link do? At the moment, it takes you back to the original form, as if starting a new investigation.

Like opening a new page?

There are currently two separate tours: one on the original form page, and one on the Compare tab. Should they be separate? If so, should clicking the link restart them both?

Yes, especially if we are taking them back to the original form. Is there a possibility that just the compare page is refreshed with the tour on?

Change 618105 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Add CheckUserHookRunner to the service container

https://gerrit.wikimedia.org/r/618105

@Prtksxna I added 4px of space (to the right of the buttons) and moved them down by 2px so they would better align with the help link. What do you think?

Screenshot_2020-08-03 Investigate - MediaWiki.png (281×398 px, 7 KB)

Change 617281 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Add help links and link to restart tour on SpecialInvestigate

https://gerrit.wikimedia.org/r/617281

@Prtksxna I added 4px of space (to the right of the buttons) and moved them down by 2px so they would better align with the help link. What do you think?

This looks good, I'll wait for it to come on test wiki to see it again. I remember when the buttons were added @Tchanders explained to me why they would align to the text differently on different browsers.

Change 617830 merged by jenkins-bot:
[mediawiki/extensions/WikimediaMessages@master] Add 'Leave Feedback' link to Special:Investigate

https://gerrit.wikimedia.org/r/617830

dom_walden added a subscriber: dom_walden.

Done.

  • Subtitle:
    1. Special:CheckUser - Links to the old check user tool in subtitle (first link)

Done.

  1. Restart tour - Restarts the guided tour from the beginning (reset everything) in the subtitle (second link)

On the front page, this restarts to the tour for both the front page and Compare tab.

On the Compare tab, this restarts the tour just for the Compare tab (front page unaffected).

During an investigation, clicking "Restart Tour" returns the user to the first page of the Compare tab (regardless of where they were when they clicked it).

Otherwise, it maintains the current targets, filters and duration.

  1. Leave feedback - https://meta.wikimedia.org/wiki/Talk:IP_Editing:_Privacy_Enhancement_and_Abuse_Mitigation/CheckUser_Improvements (third link)

Done. (Only appears if WikimediaMessages extension is installed.)

All the links open in the same tab, apart from help which opens in a different tab.

Screenshot (from Compare tab, front page looks the same apart from not having "New investigation"):

header_links.png (165×1 px, 18 KB)

Note I have only tested this on the Vector skin on desktop.

Test environments

Change 617832 abandoned by Jforrester:
[integration/config@master] Add CheckUser as a integration dependency of WikimediaMessages

Reason:
Assuming this isn't needed; please shout if I'm wrong.

https://gerrit.wikimedia.org/r/617832