{"action":"created","issue":{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/2697","repository_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End","labels_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/2697/labels{/name}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/2697/comments","events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/2697/events","html_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/2697","id":160673687,"number":2697,"title":"Show an icon for external links","user":{"login":"alexbfree","id":1473244,"avatar_url":"https://avatars.githubusercontent.com/u/1473244?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbfree","html_url":"https://github.com/alexbfree","followers_url":"https://api.github.com/users/alexbfree/followers","following_url":"https://api.github.com/users/alexbfree/following{/other_user}","gists_url":"https://api.github.com/users/alexbfree/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbfree/subscriptions","organizations_url":"https://api.github.com/users/alexbfree/orgs","repos_url":"https://api.github.com/users/alexbfree/repos","events_url":"https://api.github.com/users/alexbfree/events{/privacy}","received_events_url":"https://api.github.com/users/alexbfree/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/labels/ui","name":"ui","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"srallen","id":5016731,"avatar_url":"https://avatars.githubusercontent.com/u/5016731?v=3","gravatar_id":"","url":"https://api.github.com/users/srallen","html_url":"https://github.com/srallen","followers_url":"https://api.github.com/users/srallen/followers","following_url":"https://api.github.com/users/srallen/following{/other_user}","gists_url":"https://api.github.com/users/srallen/gists{/gist_id}","starred_url":"https://api.github.com/users/srallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srallen/subscriptions","organizations_url":"https://api.github.com/users/srallen/orgs","repos_url":"https://api.github.com/users/srallen/repos","events_url":"https://api.github.com/users/srallen/events{/privacy}","received_events_url":"https://api.github.com/users/srallen/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2016-06-16T14:20:29Z","updated_at":"2016-06-17T08:42:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/2697","html_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/2697","diff_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/2697.diff","patch_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/2697.patch"},"body":"We don't want to define \"open in new tab\" behaviour as it can and should depend on the user's preference or browser settings. We do want the behaviour of a link to be predictable. Therefore, a sensible way forward would be to ensure that any link that takes you off site is marked as an external link. Like this:\r\n\r\n![screenshot 2016-06-16 15 13 09](https://cloud.githubusercontent.com/assets/1473244/16119861/5655802e-33d5-11e6-9ddb-4bb672a93d85.png)\r\n\r\nor this:\r\n![screenshot 2016-06-16 15 12 54](https://cloud.githubusercontent.com/assets/1473244/16119863/583c7db6-33d5-11e6-9a40-3123c13594f3.png)\r\n\r\nor this:\r\n![screenshot 2016-06-16 15 22 01](https://cloud.githubusercontent.com/assets/1473244/16120050/1f2f694c-33d6-11e6-8438-e416149b72cc.png)\r\n\r\nThis is especially useful when a menu contains a list of external and in-page links, and also when you are in a middle of a task that would be destroyed/interrupted by clicking off page (as in the second example screenshot).\r\n\r\nThe code in this PR will automatically suffix any external link with an external link icon (which is already present in our font awesome pack).\r\n\r\nExternal links are identified simply as those beginning `http` (best practice would suggest any link within the site should be relatively specified and not start with `http`).\r\n\r\nFor those occasions where we do not want this to appear on specific links, we can add the `suppress-external-link-icon` class to the `<a>`'s attributes and this will ensure no icon appears.\r\n\r\nDeployed to https://external-links.pfe-preview.zooniverse.org/?env=production for testing.\r\n\r\nI have opted for a CSS-only solution because I think this is the best way not to miss any. Especially as project builders or Talk commenters can add their own external links."},"comment":{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/comments/226714045","html_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/2697#issuecomment-226714045","issue_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/2697","id":226714045,"user":{"login":"alexbfree","id":1473244,"avatar_url":"https://avatars.githubusercontent.com/u/1473244?v=3","gravatar_id":"","url":"https://api.github.com/users/alexbfree","html_url":"https://github.com/alexbfree","followers_url":"https://api.github.com/users/alexbfree/followers","following_url":"https://api.github.com/users/alexbfree/following{/other_user}","gists_url":"https://api.github.com/users/alexbfree/gists{/gist_id}","starred_url":"https://api.github.com/users/alexbfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexbfree/subscriptions","organizations_url":"https://api.github.com/users/alexbfree/orgs","repos_url":"https://api.github.com/users/alexbfree/repos","events_url":"https://api.github.com/users/alexbfree/events{/privacy}","received_events_url":"https://api.github.com/users/alexbfree/received_events","type":"User","site_admin":false},"created_at":"2016-06-17T08:42:00Z","updated_at":"2016-06-17T08:42:00Z","body":"So... if we could come up with a solution whereby wherever this icon appears, it also applies target=_blank to open in a new tab, then folks would be happier with that?\r\n\r\nI think the second case (where you actually *can't* go back) is most critical. I guess we could solve that another way, like Jim says, but that's a much bigger change - this could be a good interim step.\r\n\r\n>Our volunteers, as far as I know, haven't communicated any confusion or frustration about what an external link is or where they go. So...\r\n\r\nPretty much every person I've asked for feedback about my proposed maintain project context feature / new menu navigation has said it is confusing because some of the links take you away, and some don't. People need a way to differentiate the \"leave project context\" link from the \"stay in project\" links and I thought it would be better to establish a convention across the whole site and follow it, rather than do something special just for that one case.\r\n\r\nI've also had feedback from a couple of people that the main project menu in Computer Vision: Serengeti is confusing because Snapshot Serengeti and MICO links take you to another page, while About / Classify etc do not.\r\n\r\nPerhaps we should get more user feedback. "}}
{"actor":{"display_login":"alexbfree"}}