Page MenuHomePhabricator

IPInfo icon not shown in mw-contributions-blocked-notice
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • Navigate to the contribution page of a blocked IP address (example)

What happens?:

image.png (387×216 px, 16 KB)

No icon shown at there, and there's a strange 22px padding-right for .mw-anonuserlink:not(.ext-ipinfo-anonuserlink-loaded.

What should have happened instead?:
There should have something shown.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:
1.39.0-wmf.13 (b243436)

Event Timeline

The inline popup is designed for Special:RecentChange and Special:Watchlist. There is already an infobox on Special:Contributions. So I think it is better to show nothing here, both icon and padding?

The inline popup is designed for Special:RecentChange and Special:Watchlist. There is already an infobox on Special:Contributions. So I think it is better to show nothing here, both icon and padding?

I agree.

The problem comes from this rule: https://gerrit.wikimedia.org/g/mediawiki/extensions/IPInfo/+/2465295172911165ee7eb2d68f7e8c31b3d7dffd/modules/ext.ipInfo.styles/init.less#6 . This file is loaded in the ext.ipInfo.styles module. The rule is intended for pages with the popup, and shouldn't be applied on Special:Contributions.

IPInfo defines two modules - ext.ipinfo.styles which only contains styles and is loaded in JS and no-JS contexts, and ext.ipInfo which contains everything else, and is only loaded when JS is available. We limit the number of modules because of performance reasons.

ext.ipInfo.styles is loaded on all pages where the popup and infobox appear, but contains one CSS rule intended for the popups and one CSS rule intended for the infobox. ext.ipInfo uses a dispatcher script to loads certain files on popup pages and other files on infobox pages. ext.ipInfo.styles could do the same can't do this because JS is not available. Instead, we could use a CSS selector to ensure that the rules are applied on the correct pages.

To see how ext.ipInfo works, see:

Tchanders set the point value for this task to 2.Jun 6 2022, 5:18 PM

I'm quite in favor of not showing the IPInfo icon here considering the values are shown below in the infobox, according to their access level and the popup won't show more than the infobox.

Screen Shot 2022-06-08 at 3.33.14 PM.png (2,098×1,080 px, 249 KB)

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

[mediawiki/extensions/IPInfo@master] Separates noJS rules for popup and infobox

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

Change 804005 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Remove icon space on Special:Contributions

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

dom_walden subscribed.

How Special:Contributions looks when the IP is blocked:
{F35248573}

I tested this in Vector 2022, Vector 2010, Minerva, MonoBook and Timeless and in RTL.

In case of regression, I also retested how the IPInfo icon appears on Special:Log, Revision History, RecentChanges and Watchlist.

Test environment: https://en.wikipedia.beta.wmflabs.org