Page MenuHomePhabricator

IP Info: Add links to global contribs and xtools
Closed, ResolvedPublic2 Estimated Story Points

Description

AC:

Screen Shot 2022-06-21 at 10.27.58 AM.png (334Γ—674 px, 28 KB)

Notes:
We should do this via WikimediaMessages, like we do with the feedback link. The infobox widget fires a hook here which is handled by WikimediaMessages here. (The file in WikimediaMessages is named feedback.js, but we could rename it to something more general.)

Event Timeline

Tchanders set the point value for this task to 2.
Tchanders updated the task description. (Show Details)

For global contributions, you may wish to use https://xtools.wmflabs.org/globalcontribs since it supports IP ranges. But for single IPs, some may prefer GUC. On that note, ideally we'd expose these links with an interface message so that the community can change them as desired.

Change 807619 had a related patch set uploaded (by AGueyte; author: AGueyte):

[mediawiki/extensions/WikimediaMessages@master] WIP: Add contrib links to Infobox

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

Change 807619 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] IPInfo: Add contrib links to Special:Contributions Infobox

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

@AGueyte If we are setting the XTools URL in the translations file, the URL will depend on the user's interface language. But shouldn't it depend on the current wiki? For example, if you are looking up an IP on frwiki the link to xtools should always be https://xtools.wmflabs.org/ec/fr.wikipedia.org/$ip.

@AGueyte If we are setting the XTools URL in the translations file, the URL will depend on the user's interface language. But shouldn't it depend on the current wiki? For example, if you are looking up an IP on frwiki the link to xtools should always be https://xtools.wmflabs.org/ec/fr.wikipedia.org/$ip.

Hi, @dom_walden that's good feedback, pinging @Prtksxna and @MusikAnimal for their input.

@AGueyte I guess Xtools should be XTools here.

Thanks for this, created https://phabricator.wikimedia.org/T312141
Will update the patch in a minute.

Hi, @dom_walden that's good feedback, pinging @Prtksxna and @MusikAnimal for their input.

I think Dom is right. Since we're using GUC for global, it'd make sense to have the wiki you're on to be the one you see in XTools.

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

[mediawiki/extensions/WikimediaMessages@master] IPInfo: Use parameters for links to external tools from Special:Contributions

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

@dom_walden @Prtksxna Thanks - the latest patch should build the XTools URL with the correct wiki. (Using i18n messages for the tools is a bit of a hack, to allow users to customize which tools they use, since messages are configurable.)

If I may, I see ipinfo-xtools-url on rEWME extension-WikimediaMessages is being hardcoded to use https://xtools.wmflabs.org/ec/en.wikipedia.org/$1, however this returns results only for contributions done at en.wikipedia.org, so other users from e.g. meta.wikimedia.org or es.wikibooks.org won't get any. While this message can be customised locally, doing so for hundreds of wikis does not seem practical. I think this would be fixed changing the message to https://xtools.wmflabs.org/ec/{{SERVERNAME}}/$1. Thanks.

Change 812367 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] IPInfo: Use parameters for links to external tools from Special:Contributions

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

As it looks on enwiki beta:

gc_xtools.png (232Γ—266 px, 13 KB)

The URL for "Global contributions is https://xtools.wmflabs.org/globalcontribs/<ip> (the URL suggested in T311031#8021060).

The URL for "XTools" is:

  • on enwiki beta https://xtools.wmflabs.org/ec/en.wikipedia.beta.wmflabs.org/<ip>
  • on arwiki beta https://xtools.wmflabs.org/ec/ar.wikipedia.beta.wmflabs.org/<ip>

So I assume that on enwiki production (for example) it will be https://xtools.wmflabs.org/ec/en.wikipedia.org/<ip>.

Test environment: https://en.wikipedia.beta.wmflabs.org and https://ar.wikipedia.beta.wmflabs.org IP Info 0.0.0 (0dac164) 09:21, 19 July 2022. WikimediaMessages – (d8c3815) 10:08, 19 July 2022.