Page MenuHomePhabricator

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

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:

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 updated the task description. (Show Details)
MZMcBride raised the priority of this task from to Needs Triage.
MZMcBride added subscribers: MZMcBride, Edokter, TheDJ, Legoktm.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 16 2015, 4:50 AM
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)
Krinkle added a comment.EditedSep 20 2015, 3:11 AM
@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.



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.

TTO claimed this task.Sep 20 2015, 4:48 AM

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

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

TTO added a comment.Sep 20 2015, 5:32 AM

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?

  • 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.

TTO added a comment.Sep 23 2015, 5:59 AM

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?

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?

TTO added a comment.Oct 6 2015, 11:10 AM

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.

Elitre added a subscriber: Elitre.Oct 22 2015, 9:05 AM
saper added a subscriber: saper.Oct 22 2015, 12:12 PM

Somehow related: T116274

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

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

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

TTO closed this task as Resolved.Dec 1 2015, 11:33 PM
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?

TTO added a comment.Dec 2 2015, 8:05 PM

Scheduled for 10 December on Wikipedias.

Current implementation in MediaWiki latest master:

Current implementation on en.wikipedia.org:

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:

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 reopened this task as Open.Dec 9 2015, 7:20 PM
Krinkle raised the priority of this task from Low to Normal.
Krinkle removed TTO as the assignee of this task.

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 closed this task as Resolved.Dec 10 2015, 2:59 AM
Jdlrobson claimed this task.
Meno25 removed a subscriber: Meno25.Jan 30 2016, 6:57 PM

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.

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

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