Page MenuHomePhabricator

Move over existing IP Information from popup to the contributions page
Closed, ResolvedPublic5 Estimated Story PointsDec 15 2020

Description

Goal

This task is to make the design changes we want to make to IP Info before we conduct our next round of user testing on the feature. AHT's goal for the next quarter is changing, so we want to take this time to leave IP Info in a good shape to test it before it's ready to ship.
This task is to move over the existing IP Information in the popup to the accordion on Special:Contribs, when the target is an IP address with at least one contribution.

Current state
  • IP Information is shown next to IP addresses in a popup that's accessible with the (info icon).
image.png (596×1 px, 783 KB)
image.png (478×1 px, 575 KB)
image.png (380×1 px, 429 KB)
Tentative mockup

accordion.png (312×1 px, 9 KB)

  • Move only information that already exists in the popup
  • Information is shown in an accordion on Special:Contributions page for an IP address
  • Above the contribs search form
  • Default state: Closed
  • Do not preserve state (open/closed) across different IP contribs pages
  • Can we get abuse filter information?
  • Can we know if the IP was blocked as part of a range block?

Event Timeline

Niharika triaged this task as Medium priority.Nov 19 2020, 11:55 PM
Niharika created this task.
Niharika updated the task description. (Show Details)
Niharika added a subscriber: Prtksxna.

@Prtksxna Let's use this task to add the new mockups and design requirements.

Niharika renamed this task from Design changes for IP Info to Display IP Information on contributions page.Dec 1 2020, 7:39 PM
Niharika renamed this task from Display IP Information on contributions page to Move over existing IP Information from popup to the contributions page.Dec 2 2020, 5:42 PM
Niharika updated the task description. (Show Details)
ARamirez_WMF set the point value for this task to 5.Dec 2 2020, 5:53 PM
ARamirez_WMF changed the subtype of this task from "Task" to "Deadline".

@Prtksxna Should the info panel show in no-JS environments? The Special:Contributions filter form does - always expanded. However, the info popup requires JS.

@STran I'll note that we do want to keep the popup next to IPs but use them to show different info - so maybe don't pull all the code for showing the popup itself.

@Prtksxna Another question - for this task, while the popup and the panel are showing the same information, can the design be the same for both? That would allow us to reuse some code and save us some time, until the two diverge. We can update both to use the design from this task description if preferred.

@Tchanders If we want to modify the popup design in the future, is it still worth updating it to use this design?

Where are we pulling these IPs from? Just to make sure I understood correctly, we want a box w/IP info to show up on pages like https://thegoodplace.wmcloud.org/wiki/Special:Contributions/Dom_walden right? If so, can't contributions come from different IPs? And if so how would we be able to determine which ones we want to show?

Change 644959 had a related patch set uploaded (by STran; owner: STran):
[mediawiki/extensions/IPInfo@master] [WIP] Add a box with IP info to the Special:Contributions page

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

Where are we pulling these IPs from? Just to make sure I understood correctly, we want a box w/IP info to show up on pages like https://thegoodplace.wmcloud.org/wiki/Special:Contributions/Dom_walden right? If so, can't contributions come from different IPs? And if so how would we be able to determine which ones we want to show?

For now, it's only intended for Special:Contributions pages for an IP address, not a user account (have updated the task description to make this clear).

Since IPInfo's API accepts a log ID or revision ID rather than an IP address, we can just pass the first revision ID from the list of contributions. (If there are no contributions, we don't need to show the information - task description updated to reflect this too.) The revision ID is present as a the data-mw-revid attribute on each <li>.

As discussed with @Prtksxna and @STran, for this task we'll display the IP info using the existing IpInfoWidget, which will handle loading state, failures, etc.

We'll make the design look more like the mockup in a separate task.

As discussed with @Prtksxna and @STran, for this task we'll display the IP info using the existing IpInfoWidget, which will handle loading state, failures, etc.

We'll make the design look more like the mockup in a separate task.

Got it. I made T269404: Update design for IP Information box on Special:Contribs for it.

@Tchanders If we want to modify the popup design in the future, is it still worth updating it to use this design?

@Tchanders in case you missed this earlier^

Thanks! I've commented some more details on that task.

@Tchanders If we want to modify the popup design in the future, is it still worth updating it to use this design?

@Tchanders in case you missed this earlier^

Thanks, I did miss this. At the moment, to avoid duplication, both the popup and the infobox are showing the IpInfoWidget, which means they look the same, so redesigning either one causes the other to be redesigned. This is good because it reduces code duplication, and ensures consistent design throughout the IPInfo feature. But of course we don't actually want them to display exactly the same information. So next up we want to give the IpInfoWidget separate popup and infobox modes, so that they can display different information, but the styling for each piece of information will look the same - that's how we'll solve T269404.

@Prtksxna Another question - for this task, while the popup and the panel are showing the same information, can the design be the same for both? That would allow us to reuse some code and save us some time, until the two diverge. We can update both to use the design from this task description if preferred.

Yep, the design for both is the same (I know we already discussed this, posting here for documentation). Here is the component that I am using in the designs.

Thanks! I've commented some more details on that task.

@Tchanders If we want to modify the popup design in the future, is it still worth updating it to use this design?

@Tchanders in case you missed this earlier^

Thanks, I did miss this. At the moment, to avoid duplication, both the popup and the infobox are showing the IpInfoWidget, which means they look the same, so redesigning either one causes the other to be redesigned. This is good because it reduces code duplication, and ensures consistent design throughout the IPInfo feature. But of course we don't actually want them to display exactly the same information. So next up we want to give the IpInfoWidget separate popup and infobox modes, so that they can display different information, but the styling for each piece of information will look the same - that's how we'll solve T269404.

Thanks for the explanation! Makes sense.

Change 644959 merged by jenkins-bot:
[mediawiki/extensions/IPInfo@master] Add a box with IP info to the Special:Contributions page

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

@dom_walden The patch shows the panel at the top of the following pages (there must be a target and it must be a single IP address):

  • Special:Contributions/<IP>
  • Special:Contributions?target=<IP>

...as long as the following are true:

  • The IP has contributions
  • The user has the 'ipinfo' right
  • The user has set their preference to see IP information

For now the data is just displayed the same as in the popup, with the same errors occurring ion the same circumstances. It always appears open and doesn't collapse yet.

We'll update the design in T269404, and we'll add the collapsible functionality in T269622.

Change 647005 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/extensions/IPInfo@master] Don't show infobox on Special:Contributions for IP ranges

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

Change 647005 merged by jenkins-bot:
[mediawiki/extensions/IPInfo@master] Don't show infobox on Special:Contributions for IP ranges

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

IP Info is now on the Special:Contributions page.

It appears above the Search form and, if IP is blocked, the block message. E.g.:

blocked_user_contrib.png (449×1 px, 71 KB)

Error messages are shown the same way as the popup, e.g.

usercontrib_error.png (249×1 px, 21 KB)

It uses the same Javascript widget as the popup, so the way it lays out the data should be the same.

I did briefly test that the correct data was displayed. However, just like the popup it relies on the API, so as long as the API is correct the data should be correct.

It only shows for IPs (not ranges) with at least 1 visible revision.

Test environment: local vagrant MediaWiki 1.36.0-alpha (64d3b5b), IP Info 0.0.0 (6cc134f).
Test browser: Firefox 78