Page MenuHomePhabricator

"Show IP" button is off-centered in the "Printable version" of the page
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Make a test edit using a temporary account
  • Log into an account that can view temporary account IPs (which uses Vector)
  • Load Special:RecentChanges (or any page that has the "Printable version" link shown in the page tools)
  • Click on the link for the printable version

What happens?:
The printable version shows the "Show IP" button off-centred to the rest of the content

What should have happened instead?:
The text shown should have remained in the same position it usually resides.

Software version (skip for WMF-hosted wikis like Wikipedia):
Latest CheckUser and core code

Other information (browser name/version, screenshots, etc.):

Page namePagePrinted version
Special:RecentChanges
image.png (117×1 px, 33 KB)
image.png (141×727 px, 12 KB)
Special:ActiveUsers
image.png (181×1 px, 64 KB)
image.png (147×948 px, 46 KB)
Special:History (got by running javascript:print())
image.png (80×1 px, 28 KB)
image.png (96×1 px, 30 KB)

It is possible to trigger the print preview to appear by running javascript:print() (which is what the "Printable version" link does).

Event Timeline

Change #1064132 had a related patch set uploaded (by Amdrel; author: Amdrel):

[mediawiki/extensions/CheckUser@master] Center "Show IP" button in the printable version of pages

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

We could also just not display the "Show IP" button at all in the printable verison of the page. I don't think it provides any value to a printable view. cc @KColeman-WMF @Niharika

We could also just not display the "Show IP" button at all in the printable verison of the page. I don't think it provides any value to a printable view.

@kostajh - if we don't display "Show IP" button on the printable version, would the printable version still display the IP address if a user had clicked "Show IP" button first? I think it's fine to not display the button on print version, however we would want to show the IP address if it had been revealed.

We could also just not display the "Show IP" button at all in the printable verison of the page. I don't think it provides any value to a printable view.

@kostajh - if we don't display "Show IP" button on the printable version, would the printable version still display the IP address if a user had clicked "Show IP" button first? I think it's fine to not display the button on print version, however we would want to show the IP address if it had been revealed.

Based on my local testing, the IP is displayed:

image.png (67×759 px, 27 KB)

I updated the patch to hide the button. Here's what it looks like on the three pages we've been testing.

Special:RecentChanges

Screenshot 2024-08-21 at 10.23.49 AM.png (588×1 px, 183 KB)

Special:ActiveUsers

Screenshot 2024-08-21 at 10.24.03 AM.png (282×870 px, 118 KB)

Special:History

Screenshot 2024-08-21 at 10.24.34 AM.png (846×1 px, 390 KB)

Thanks for the update! It looks fine with the 'Show IP' button hidden, we just need to add spacing between the temp username and links so ~2024-23(talk) becomes ~2024-23 (talk) on printable view.

Thank you for the feedback! The patch has been updated to add a space when the button is hidden.

Screenshot 2024-08-28 at 3.11.53 PM.png (252×890 px, 102 KB)

Change #1064132 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Hide "Show IP" button in the printable version of pages

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

While testing this ticket I have noticed the following issue(s) with spacing between the Temporary Account and other text/characters on Recent Changes Printable Version:

@KColeman-WMF are you OK with the spacing between the ~2024-7 and ;Admin

image.png (102×415 px, 10 KB)
image.png (72×644 px, 19 KB)

Same spacing issue occurs between the IP Address and ;Admin:

image.png (96×420 px, 11 KB)


On Special:History
Same issues with spacing occurs between IP Address and (talk
And also between Temporary Account and (talk

image.png (423×608 px, 74 KB)

Sorry folks and @KColeman-WMF...
Please disregard my earlier comments about this being a spacing issue, I think the issue with spacing is only happening when I test in my localhost...
I was finally able to get Patch Demo working so I reran my testing and noticed the spacing was correct when using Patch Demo.

I am pushing this ticket to done.

image.png (232×1 px, 37 KB)

image.png (593×662 px, 56 KB)

image.png (745×1 px, 53 KB)