{"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":4,"created_at":"2016-06-16T14:20:29Z","updated_at":"2016-06-16T17:20:49Z","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/226553294","html_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/2697#issuecomment-226553294","issue_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/2697","id":226553294,"user":{"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},"created_at":"2016-06-16T17:20:48Z","updated_at":"2016-06-16T17:20:48Z","body":"1) We are defining the behavior in some cases such as the links going out to twitter and facebook in the footer with `target=\"_blank\"`. It's my understanding that most internet users understand that many sites open external links in a new tab where appropriate and can determine when this happens by context. \r\n\r\n2) With markdown, the default behavior is to open in the same tab. We can't change that, however, some markdown syntax was added to allow volunteers manually specify when they want the link to open in a new tab. See #946\r\n\r\n3) As far as UX goes, I've seen it debated either way. 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\nI'm inclined to agree that this is a non-issue and will defer to whatever @jwbmartin wants here unless there's an accessibility concern I'm not aware of that @eatyourgreens does know about."}}
{"actor":{"display_login":"srallen"}}