Page MenuHomePhabricator

Insert link item for adding language links in PHP
Closed, ResolvedPublic

Description

Right now, the "Edit links" link in the languages pane of the sidebar is inserted via JavaScript after the page's contents have finished loading. There's good momentum at the moment behind moving all code that modifies the initial appearance of the page to PHP, because having parts of the interface be drawn and redrawn as the page is loading is slow and distracting.

The ability to add inter-language links in-place (that is, without navigating away from the page) requires that the user's browser supports CORS. Right now, the JavaScript code checks to see that the user's browser supports CORS. It will insert the link if the browser does support it, and not insert the link otherwise. This particular check cannot be performed in PHP, so the alternative that I am proposing is that for users that do not have CORS support, clicking the link will trigger navigation to Wikidatawiki.

CORS support is at around 80% of global traffic, per http://caniuse.com/cors.

To be clear: if we make this change, the experience of 80% of users will not change. The impact will be scoped to the 20% of users that do not have CORS. They are currently not shown the "Edit links" link at all. If we make the change described above, they would be shown it, but instead of activating the in-place editing interface, it would cause them to navigate to Wikidatawiki.


Version: unspecified
Severity: normal
Whiteboard: u=dev c=frontend p=0

Details

Reference
bz61391

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:55 AM
bzimport set Reference to bz61391.
bzimport added a subscriber: Unknown Object (MLST).

I think we at some point decided that such a non-JS link would be confusing and is essentially unwanted?

Change 168632 had a related patch set uploaded by Hoo man:
[WIP] Create add links link in PHP

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

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).

How are we going to move forward here after comments by Thiemo in review request?