Page MenuHomePhabricator

Centralize temporary IP masking user logic inside MediaWiki core
Closed, ResolvedPublicBUG REPORT

Description

We have some code in Vector skin for handling IP masked users
This isn't well maintained and has already broken (user page link does not show on desktop view and is styled incorrectly on tablet view as per screen) in the short term it's been there

Screen Shot 2023-02-02 at 4.49.37 PM.png (508×900 px, 63 KB)

I'd like to move the logic for the temporary user account into the shared Skin class. This will avoid us having to update every skin to handle the new UI and will allow skins to not worry about the IP masking change unless they want to.

After proposed change without any modifications to skins

SkinFull screenLower resolution
Vector 2022.
Screen Shot 2023-02-02 at 5.10.14 PM.png (387×1 px, 128 KB)
Screen Shot 2023-02-02 at 5.09.49 PM.png (507×924 px, 64 KB)
Vector
Screen Shot 2023-02-02 at 5.10.49 PM.png (142×1 px, 71 KB)
N/A
Timeless
Screen Shot 2023-02-02 at 5.11.50 PM.png (563×1 px, 171 KB)
Screen Shot 2023-02-02 at 5.12.08 PM.png (624×940 px, 88 KB)
Modern.
Screen Shot 2023-02-02 at 5.12.33 PM.png (436×1 px, 81 KB)
N/A
CologneBlue
Screen Shot 2023-02-02 at 5.13.11 PM.png (399×206 px, 29 KB)
N/A
Pivot
Screen Shot 2023-02-02 at 5.13.32 PM.png (591×1 px, 142 KB)
Monobook
Screen Shot 2023-02-02 at 5.14.08 PM.png (578×1 px, 206 KB)
.
Screen Shot 2023-02-02 at 5.14.24 PM.png (626×716 px, 74 KB)
Minerva.
Screen Shot 2023-02-02 at 5.15.00 PM.png (521×1 px, 78 KB)
Screen Shot 2023-02-02 at 5.15.29 PM.png (526×606 px, 35 KB)
[1]

[1] (Updating the icon in Minerva should be relatively trivial)

Event Timeline

Change 886189 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] Centralize temporary IP masking user logic inside MediaWiki core

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

Change 886190 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] Revert "Updates for core temp user autocreation feature"

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

Hey @tstarling I think this would minimize the migration work we need to do on the skins-side while preserving the UX changes you've already made for Vector. Let me know if anything doesn't make sense here and you want to chat further.

It doesn't really preserve the UX changes I did. I asked @Prtksxna if the precise styling of user links in accordance with the Figma mockup was an essential requirement, because it's hard to do that. In particular, I asked if they have to be grey and unlinked, because it's obviously much easier to make them be blue links with href="#". Prateek responded that it is indeed necessary, and so I wrote the skin patches to conform to that. Your patch removes the work I did on that requirement.

Change 886189 merged by jenkins-bot:

[mediawiki/core@master] Centralize temporary IP masking user logic inside MediaWiki core

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

Change 886190 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Revert "Updates for core temp user autocreation feature"

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

It doesn't really preserve the UX changes I did. I asked @Prtksxna if the precise styling of user links in accordance with the Figma mockup was an essential requirement, because it's hard to do that. In particular, I asked if they have to be grey and unlinked, because it's obviously much easier to make them be blue links with href="#". Prateek responded that it is indeed necessary, and so I wrote the skin patches to conform to that. Your patch removes the work I did on that requirement.

No UX changes were intended as part of this change. As I pointed out in the description the UX was already broken. I'll look into this tomorrow making sure to align more with https://www.figma.com/file/xECM2hD7vEemP91M9YAQBC/IP-Masking?node-id=0%3A1

There needs to be a login link, for example in the vector-2022 user menu. It's not enough to just show "create account".

Change 891858 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] Login link should be shown to temporary users by default

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

Change 891859 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/Vector@master] 2010: IP masked user icon should differ

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

Thanks for flagging that @tstarling - I've updated the logic in core: https://gerrit.wikimedia.org/r/891858

I also have a patch to restore the styling changes to match the mock appearance in legacy Vector:: https://gerrit.wikimedia.org/r/891859

There are also some product decisions we'll need to make and document which are implied by the mock (apologies if these are answered elsewhere - feel free to merge as duplicate). See T326911#8644788 for more information.

Change 891858 merged by jenkins-bot:

[mediawiki/core@master] Skins: Login link should be shown to temporary users by default

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

Change 891859 merged by jenkins-bot:

[mediawiki/skins/Vector@master] 2010: IP masked user icon should differ

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

Okay we'll handle the remaining UI issues with skins in the follow up task. Thanks! See T326911#8644788 for a summary.