Page MenuHomePhabricator

Add generic personal toolbar links for IP users to MediaWiki core
Closed, ResolvedPublic

Assigned To
Authored By
MZMcBride
Sep 16 2015, 4:50 AM
Referenced Files
F4175409: Screen Shot 2016-06-17 at 20.29.43.png
Jun 17 2016, 6:40 PM
F3061720: Screen Shot 2015-12-09 at 19.13.40.png
Dec 9 2015, 7:19 PM
F3061739: Screen Shot 2015-12-09 at 19.19.18.png
Dec 9 2015, 7:19 PM
F3061719: Screen Shot 2015-12-09 at 19.13.22.png
Dec 9 2015, 7:19 PM
F2620762: Screen Shot 2015-09-20 at 03.45.11.png
Sep 20 2015, 3:11 AM
F2620757: Screen Shot 2015-09-20 at 03.41.00.png
Sep 20 2015, 3:11 AM
F2620751: Screen Shot 2015-09-20 at 03.35.05.png
Sep 20 2015, 3:11 AM
F2620734: Screen Shot 2015-09-20 at 03.35.05.png
Sep 20 2015, 2:36 AM
Tokens
"Like" token, awarded by Florian."Like" token, awarded by tarlocesilion."Yellow Medal" token, awarded by Kharkiv07."Like" token, awarded by Trizek-WMF.

Description

The English Wikipedia now has generic items in the personal toolbar for Special:MyContributions and Special:MyTalk for IP users via MediaWiki:Common.js:

Screen Shot 2015-09-20 at 03.35.05.png (384×1 px, 43 KB)

This implementation is rough as there's a flash in the page rendering when the underlying links from MediaWiki core (Special:UserLogin?type=signup and Special:UserLogin) get appended to. If we want these links for logged-out users, we need to do this server-side.

We can probably re-use $wgShowIPInHeader for this functionality.

I'm still not totally sold on the virtue of having these links for logged-out users. I'm personally still mulling it over. But if it's to be done, it should be implemented without that awful flash. It's super-annoying and it's currently hitting the majority of visitors.

I thought we'd also removed the little person icon from the personal tools bar, but this change seems to re-add it. We should investigate that as well.

Event Timeline

MZMcBride raised the priority of this task from to Needs Triage.
MZMcBride updated the task description. (Show Details)
Krinkle renamed this task from Re-consider implementation of personal tools toolbar links for IP users to Add generic personal toolbar links for IP users to MediaWiki core.Sep 20 2015, 2:36 AM
Krinkle updated the task description. (Show Details)
@MZMcBride wrote:

We can probably re-use $wgShowIPInHeader for this functionality.

MediaWiki already supports links for anonymous users (user page, talk page; though not contributions), but these are disabled for Wikimedia wikis (with $wgShowIPInHeader=false) as it is incompatible with cache requirements (the content can't vary from one IP user to the other).

However a generic version of these links, such as currently done by the en.wikipedia.org site script, would work just fine.

For the record, Dutch Wikipedia (nl.wikipedia.org) has had this script for many years. Last week, English Wikipedia copied the script and design as-is from there. So there's certainly an increased interest in these.

Screen Shot 2015-09-20 at 03.41.00.png (180×1 px, 41 KB)

Screen Shot 2015-09-20 at 03.35.05.png (180×1 px, 38 KB)

Screen Shot 2015-09-20 at 03.45.11.png (180×806 px, 21 KB)

A few factors to consider:

  • Position. MediaWiki inserts these links to the left of "Create account" instead of in-between "Create account" and "Log in". Consistently starting with the user segment (like for logged-in users) seems preferable and produces the logical structure: "Not logged in .. Create account - Log in".
  • Include "Contributions". MediaWiki does not insert "Contributions" for anons, only "(User)" and "Talk".
  • Label "Talk". The current core label of "Talk for this IP address" definitely needs re-wording. (not presently exposed on Wikimedia wikis)

Presumably we include ".. for this IP address" because we want to tell users that the page is not permanently associated with them, their session, or their browser (not unless logged-in) but rather with their IP. And that if they move elsewhere (or get a new IP) they see a different talk page.

"Talk" is wiki-jargon (to mean discussion page) kind of works when used standalone, but when phrased like "Talk for this address" its ambiguous and confusing. The notion of logged-out users being identified by their IP also shouldn't be assumed in such highly visible labels. Most people will have heard about "IP", but I don't think one can expect users to know about the internal characteristics about how (public) IPs are assigned. We may as well call it plain "Talk" since the rest of the label won't serve its intended purpose to many users – namely to convey that the talk page may be shared with other computers in the same network, and that the network may get a new IP at any time.

Change 239649 had a related patch set uploaded (by TTO):
Improved personal toolbar for logged-out users

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

I posted a little patch based on Krinkle's idea. It matches the Dutch/English WP implementation, except for returning the Create account link to its original position.

A couple of points:

  • I basically left the old $wgShowIPinHeader implementation as is, but turned it off by default. Do you think we should get rid of this feature altogether? Does anyone find it useful? (In my experience, most wikis turn it off.)
  • To allow the old implementation to persist, I created a new message "anontalkshort": "Talk" alongside "anontalk": "Talk for this IP address". Should we just reword anontalk to read Talk?

I made some small modifications to the Dutch script, but I like having it closer to the MW implementation. I'll move the 'Create account' to the right, but I'm not sure what to do with the user page link: remove it or link it? Thoughts?

In T112724#1656569, @TTO wrote:
  • I basically left the old $wgShowIPinHeader implementation as is, but turned it off by default. Do you think we should get rid of this feature altogether? Does anyone find it useful? (In my experience, most wikis turn it off.)

Yes, I think we should get rid of $wgShowIPinHeader and simply never expose IPs in the page header. On many wikis, the feature gets automatically disabled when caching is enabled, I believe. If we can implement a generic solution for logged-out users that works with caching (which basically means not showing IPs in the header), I don't see a reason to continue having this configuration option.

  • To allow the old implementation to persist, I created a new message "anontalkshort": "Talk" alongside "anontalk": "Talk for this IP address". Should we just reword anontalk to read Talk?

Yeah, that seems reasonable to me.

On many wikis, the feature gets automatically disabled when caching is enabled, I believe.

It's actually the other way round: $wgShowIPinHeader = true causes certain caching mechanisms to be disabled!

@Krinkle, what do you think of my questions in T112724#1656569?

In T112724#1665162, @TTO wrote:

On many wikis, the feature gets automatically disabled when caching is enabled, I believe.

It's actually the other way round: $wgShowIPinHeader = true causes certain caching mechanisms to be disabled!

I was referring to T19180 (https://www.mediawiki.org/wiki/Special:Code/MediaWiki/46374).

includes/Setup.php currently contains:

// Easy to forget to falsify $wgShowIPinHeader for static caches.
// If file cache or squid cache is on, just disable this (DWIMD).
// Do the same for $wgDebugToolbar.
if ( $wgUseFileCache || $wgUseSquid ) {
	$wgShowIPinHeader = false;
	$wgDebugToolbar = false;
}

FYI, French Wikipedia has a poll about activating the personal toolbar for IPs.

The poll is finished on frwp, with a very large majority for the adoption of this tollbar.
What are the plans for the future?

The poll is finished on frwp, with a very large majority for the adoption of this tollbar.
What are the plans for the future?

The feature will be turned on for all Wikimedia wikis, subject to review.

Jdlrobson triaged this task as Low priority.Nov 3 2015, 7:30 PM
Jdlrobson subscribed.

Change 239649 merged by jenkins-bot:
Improved personal toolbar for logged-out users

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

TTO added a project: User-notice.

Wikis with the JS for this (at least enwiki and nlwiki) will need to remove it.

I'll remove it. When will it be deployed?

Scheduled for 10 December on Wikipedias.

Current implementation in MediaWiki latest master:

Screen Shot 2015-12-09 at 19.13.22.png (100×750 px, 16 KB)

Current implementation on en.wikipedia.org:

Screen Shot 2015-12-09 at 19.13.40.png (100×750 px, 16 KB)

The greying of the text seems valuable in my opinion. We have a known usability problem with links being sometimes indistinguishable from text (especially visited/darkened links). Making the text lighter here makes it less confusing. The hard black text for "Not logged in" is imho confusable for a link.

It's even worse in MonoBook where for some reason, the <li> (not the <a>) is styled blue:

Screen Shot 2015-12-09 at 19.19.18.png (106×840 px, 30 KB)

Change 257969 had a related patch set uploaded (by Krinkle):
Make placeholder in logged-out personal bar greyed out

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

Krinkle removed TTO as the assignee of this task.
Krinkle raised the priority of this task from Low to Medium.

Change 257969 merged by jenkins-bot:
Make placeholder in logged-out personal bar greyed out

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

Change 257970 had a related patch set uploaded (by Krinkle):
Make placeholder in logged-out personal bar greyed out

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

Change 257970 merged by jenkins-bot:
Make placeholder in logged-out personal bar greyed out

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

Jdlrobson claimed this task.

Noticed today that https://si.wikipedia.org still had old code copied from en.wikipedia.org that created these buttons in MediaWiki:Common.js manually, such causing it to be displayed twice now.

Screen Shot 2016-06-17 at 20.29.43.png (254×1 px, 149 KB)

Revision siwiki#365758 removes it from si.wikipedia.org.

$ mwgrep addAnonToolbarLinks
## Public wiki results
cebwiki             MediaWiki:Common.js
siwiki              MediaWiki:Common.js
..