Page MenuHomePhabricator

IP auto-reveal: Allow managing IP auto-reveal from sidebar tools menu
Closed, ResolvedPublic

Description

Background

IP auto-reveal mode can be switched on or off from the tools menu in the sidebar.

Behaviour

From T374869: Design an auto-reveal mode for temporary account IPs:

  • User clicks link in tools menu to enable and dialog displays
  • Session duration can be set to 30 minutes or 1 hour
  • User can disable the feature [...] by clicking the link in tools menu.

auto-reveal-final-flow-17Mar.png (3×8 px, 2 MB)

Skin support

From T385823: IP Auto-reveal: finalise remaining product specs:

  • Which features should be available in which skins?
    • Basic on/off functionality in all skins
    • Ability to manage expiry time / see expiry warning in Vector
    • Stretch goal: ideally manage expiry time/see expiry would also be in Vector legacy, Timeless and Minerva

Technical notes

Permissions

As specified in T385823, any user who has the IP reveal right (unless it was manually assigned) should be able to use IP auto-reveal mode. That means we will need a separate right for IP auto-reveal. The right will be assigned to specific groups in T386492: IP auto-reveal: Assign the IP auto-reveal right to user groups.

Acceptance criteria

  • A user with IP reveal rights enabled (which may involve checking a preference), who also has the checkuser-temporary-account-auto-reveal right sees an IP auto-reveal link in their sidebar menu
  • Clicking on the link launches a dialog as specified
  • On choosing a duration, IP auto-reveal mode is switched on. Any page with Show IP buttons reveals the IPs automatically.
  • Clicking the link again launches a panel as specified
  • Choosing to extend the duration causes the expiry time to be updated
  • Choosing to switch the mode off causes the mode to be disabled. Any new Show IP buttons will not be revealed automatically.

Note that, on switching IP auto-reveal mode off, the IPs that have already been revealed will stay revealed for duration configured in $wgCheckUserTemporaryAccountMaxAge.

Related Objects

Event Timeline

Change #1119550 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/CheckUser@master] WIP Introduce IP auto-reveal mode, with basic on/off toggle

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

Change #1119550 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Introduce IP auto-reveal mode, with basic on/off toggle

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

Change #1124116 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/CheckUser@master] WIP Make separate module for temporary accounts IP reveal

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

Change #1124847 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/CheckUser@master] IP auto-reveal: Store the expiry time as the value

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

Change #1124858 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/CheckUser@master] WIP IP auto-reveal: Add dialogs when the mode is switched on and off

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

Change #1124847 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] IP auto-reveal: Store the expiry time as the value

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

Note that, following a discussion between myself, @KColeman-WMF and Design-System-Team, it was decided that the "Cancel" button would be removed from the dialog that appears for switching the mode off:

image.png (293×568 px, 45 KB)

Instead there will just be "+10m" and "Turn off".

Change #1124116 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Make separate module for temporary accounts IP reveal

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

Note that, following a discussion between myself, @KColeman-WMF and Design-System-Team, it was decided that the "Cancel" button would be removed from the dialog that appears for switching the mode off:

image.png (293×568 px, 45 KB)

Instead there will just be "+10m" and "Turn off".

Some more discussions about this dialog are happening elsewhere. Mentioning here for visibility:

  • It was decided that we should change "+10m" to "+10min", in line with https://en.wikipedia.org/wiki/International_System_of_Units
  • We're discussing the styling of "+10min". In the designs, it id progressive, but the Codex component doesn't allow two progressive actions. The question is should we change the design, or should Codex allow this?

@Tchanders wrote:
Some more discussions about this dialog are happening elsewhere. Mentioning here for visibility:

  • It was decided that we should change "+10m" to "+10min", in line with https://en.wikipedia.org/wiki/International_System_of_Units
  • We're discussing the styling of "+10min". In the designs, it id progressive, but the Codex component doesn't allow two progressive actions. The question is should we change the design, or should Codex allow this?

After discussion with Design System Team, we decided to change the dialog design as follows:

  • Move the +10min and Turn off buttons closer to the timer
  • Increase timer text font-size to font-size-medium (16/22)
  • Move explanatory copy into footer

image.png (730×1 px, 135 KB)

Change #1128915 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/CheckUser@master] IP auto-reveal: Translate select options using MW core durations

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

Closer screenshot of the latest design for the dialog for switching auto-reveal mode off:

image.png (184×335 px, 24 KB)

Note that:

  • Time will also include hours
  • The checkbox won't be implemented in this task , as it depends on the reminder UI being implemented

Change #1124858 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] IP auto-reveal: Add dialogs when the mode is switched on and off

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

Change #1128915 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] IP auto-reveal: Translate select options using MW core durations

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

Testing steps

Scope:

  • This task implements (1) and (4.2) from F58861905. Design differences are noted in the comments above on this task.
  • T386498 implements the notifications that show up in (1) and (4.2) when the mode is changed. They can be tested with this task.

Prerequisites:

  • Temp accounts are enabled
  • CheckUser is installed
  • A temp account has made some edits to a page recently enough for their IP to be stored in CheckUser
  • Admins can reveal IPs

Setup:

  • Assign the IP auto-reveal right to admins: $wgGroupPermissions['sysop']['checkuser-temporary-account-auto-reveal'] = true;
  • Log in as an admin

Testing steps for enabling:

  • Visit a history page for an article that was recently edited by temp accounts. There should be a link in the sidebar: "IP Auto-reveal"
  • Click on this link. The dialog to enable auto-reveal should appear, as specified in F58861905 (1)
  • Enable auto-reveal mode using this dialog.
    • Any "Show IP" buttons on the page should be replaced with IP addresses.
    • A notification should be displayed in the top right.
  • The "IP Auto-reveal" sidebar link should be present on all pages
  • Any "Show IP" buttons should be replaced with IPs on all pages

Testing steps for disabling:

  • Click on the "IP Auto-reveal" link. The dialog to disable auto-reveal should appear, as specified in F58861905 (4.2)
  • Extend the expiry time by clicking on "+10min". Open the dialog again. The expiry should be 10 minutes later.
  • Turn auto-reveal mode off, using the dialog.
    • The IPs should be replaced with buttons again, on all pages
    • A notification should be displayed in the top right.

Hello @KColeman-WMF:
I have a question for you...
During my testing of this ticket I have noticed that the IP auto-reveal link was not showing in Mobile view nor on the MinervaNeue skin...
The design mockups in the ticket description are showing as a Desktop view...
Is this feature only for Desktop view?

Hello @KColeman-WMF:
I have a question for you...
During my testing of this ticket I have noticed that the IP auto-reveal link was not showing in Mobile view nor on the MinervaNeue skin...
The design mockups in the ticket description are showing as a Desktop view...
Is this feature only for Desktop view?

I spoke to @KColeman-WMF and we do want this on mobile.

The problem was the lack of an icon - it shows in the menu if an icon is specified.

Change #1143175 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/CheckUser@master] Specify icon to use in IP auto-reveal tool link in Minerva

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

@Djackson-ctr Once the above patch is merged, the IP auto-reveal link should be visible in the tool links menu on mobile:

image.png (595×1 px, 58 KB)

Note that the icon will later be changed to:

image.png (318×640 px, 35 KB)

This will be done in T393643: IP auto-reveal: Use the UserTemporaryLocation icon in the tool menu on mobile.

Change #1143175 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Specify icon to use in IP auto-reveal tool link in Minerva

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

QA is completed, I have verified the new code has been implemented and is functioning as expected Per the Acceptance Criteria (Testing was performed with a single wiki and also multiple wikis via wikifarm/Desktop View/Mobile View/various skins/Temporary Accounts that were not expired/expired Temporary Accounts). Great job @Tchanders, and thank you.