{"action":"created","issue":{"url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/496","repository_url":"https://api.github.com/repos/wikimedia/wikipedia-ios","labels_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/496/labels{/name}","comments_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/496/comments","events_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/496/events","html_url":"https://github.com/wikimedia/wikipedia-ios/pull/496","id":135164148,"number":496,"title":"Share and share alike","user":{"login":"coreyfloyd","id":64771,"avatar_url":"https://avatars.githubusercontent.com/u/64771?v=3","gravatar_id":"","url":"https://api.github.com/users/coreyfloyd","html_url":"https://github.com/coreyfloyd","followers_url":"https://api.github.com/users/coreyfloyd/followers","following_url":"https://api.github.com/users/coreyfloyd/following{/other_user}","gists_url":"https://api.github.com/users/coreyfloyd/gists{/gist_id}","starred_url":"https://api.github.com/users/coreyfloyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreyfloyd/subscriptions","organizations_url":"https://api.github.com/users/coreyfloyd/orgs","repos_url":"https://api.github.com/users/coreyfloyd/repos","events_url":"https://api.github.com/users/coreyfloyd/events{/privacy}","received_events_url":"https://api.github.com/users/coreyfloyd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wikimedia/wikipedia-ios/labels/Pet%20Project","name":"Pet Project","color":"009800"},{"url":"https://api.github.com/repos/wikimedia/wikipedia-ios/labels/WIP","name":"WIP","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-02-21T05:43:36Z","updated_at":"2016-02-21T19:13:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wikimedia/wikipedia-ios/pulls/496","html_url":"https://github.com/wikimedia/wikipedia-ios/pull/496","diff_url":"https://github.com/wikimedia/wikipedia-ios/pull/496.diff","patch_url":"https://github.com/wikimedia/wikipedia-ios/pull/496.patch"},"body":"https://phabricator.wikimedia.org/T107074\r\n\r\nRevamp of sharing across the app…\r\n\r\nThis was a bit messy but I did my best to implement this following some basic principles: Predictable, Contextual, Simple\r\n\r\nIn essence we have 3 contexts for sharing:\r\n\r\n## 1. Tap Share on an Article\r\nEasy and the biggest use case. In this case we want to share the page url and the title of the article. This also enables adding to the reading list and opening in Safari. \r\n\r\nOf note, we are not sharing the selected text, if any. Rationale: for one no other apps connect selected text with the tool bar button. This includes safari and medium. Sharing selected text is solely done from the copy/paste menu. This makes sense since the button and text are separated in space. Secondly, this greatly simplifies the process of sharing by being more contextual. \r\n\r\n## 2. Select text and Share\r\nThis actually has 2 sub-cases\r\n### a. Share the selected text\r\nThis is enabled via the standard UIWebview text selection menu item \"Share…\"\r\n### b. Share-A-Fact™\r\nThis is our custom handler… we add a menu item (and name it \"Share-A-Fact\" to differentiate it) The user is presented with a preview, then after confirming the standard share sheet is shown. This is essentially the pre-existing behavior except the share as text option is removed as it is taken care of in case 2.a.\r\n\r\n## 3. Tap Share on an Image\r\nThis is new! A sharing button is added to the image gallery to allow users to share the specific image thy are looking at. When possible, the info page URL is also provide for licensing information.\r\n\r\n\r\n\r\n## Other Share A Fact Notes\r\nOverall this flow seems pretty natural. But definitely affects Share-A-Fact in a couple ways.\r\n\r\n1. One fall out of this flow is that Share-A-Fact only ever uses text that was selected by the user. In the current production app, it is possible to make a share card with automatically extracted text, which when\r\nyou think about it is not a good idea. Share a fact is about composing an image and quote - auto filling in the text is antithetical to this.\r\n\r\n2. Share-A-Fact is now only available via the text selection menu. This seems to be best as it is the most contextual place to put it, but text selection is a relatively rare action. \r\n\r\nAt first I tried to make a share a fact activity for the share sheet, but this was clunky. Doing this the workflow was:\r\n1. Tap Share\r\n2. Show Share Sheet\r\n3. Tap Share A Fact activity\r\n4. Show Share A Fact Preview\r\n5. Tap Share As Image\r\n6. Show Share Sheet\r\n7. Select the sharing service\r\n\r\nThis big problem here is that the Share Sheet was shown twice. That was just awkward, which lead me to the current implementation.\r\n\r\nSome things we need to do to get this in the app:\r\n- [ ] Agree on share a fact implementation\r\n- [ ] Add properly sized share image\r\n- [ ] Discus image sharing / attribution\r\n\r\nNOTE: This pr also this fixes a bug where the photo owner button in the gallery was untappable. \r\n\r\nSome previews…\r\n\r\nStandard Article Sharing\r\n---\r\n<img width=\"578\" alt=\"screenshot 2016-02-21 00 48 58\" src=\"https://cloud.githubusercontent.com/assets/64771/13201185/f43d4cd8-d834-11e5-813e-a1bef81d131b.png\">\r\n\r\nGallery Overlay (share button up top)\r\n---\r\n<img width=\"578\" alt=\"screenshot 2016-02-21 00 48 58 2\" src=\"https://cloud.githubusercontent.com/assets/64771/13201193/ff5f7cb2-d834-11e5-849b-3674dd99ca11.png\">\r\n\r\nGallery Share Sheet\r\n---\r\n<img width=\"578\" alt=\"screenshot 2016-02-21 00 48 59\" src=\"https://cloud.githubusercontent.com/assets/64771/13201194/02556954-d835-11e5-9eef-e08a13eb01c3.png\">\r\n\r\nText Selection Menu\r\n---\r\n<img width=\"578\" alt=\"screenshot 2016-02-21 00 49 01\" src=\"https://cloud.githubusercontent.com/assets/64771/13201195/06056b26-d835-11e5-83bd-79f1dce1db72.png\">\r\n\r\nShare A Fact Preview\r\n---\r\n<img width=\"578\" alt=\"screenshot 2016-02-21 00 49 04\" src=\"https://cloud.githubusercontent.com/assets/64771/13201196/0801e454-d835-11e5-9b77-d4ab959989c4.png\">\r\n\r\nShare A Fact Share Sheet\r\n---\r\n<img width=\"578\" alt=\"screenshot 2016-02-21 00 52 30\" src=\"https://cloud.githubusercontent.com/assets/64771/13201207/6b1fe284-d835-11e5-8f73-16d385441ce9.png\">\r\n"},"comment":{"url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/comments/186893491","html_url":"https://github.com/wikimedia/wikipedia-ios/pull/496#issuecomment-186893491","issue_url":"https://api.github.com/repos/wikimedia/wikipedia-ios/issues/496","id":186893491,"user":{"login":"montehurd","id":3143487,"avatar_url":"https://avatars.githubusercontent.com/u/3143487?v=3","gravatar_id":"","url":"https://api.github.com/users/montehurd","html_url":"https://github.com/montehurd","followers_url":"https://api.github.com/users/montehurd/followers","following_url":"https://api.github.com/users/montehurd/following{/other_user}","gists_url":"https://api.github.com/users/montehurd/gists{/gist_id}","starred_url":"https://api.github.com/users/montehurd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/montehurd/subscriptions","organizations_url":"https://api.github.com/users/montehurd/orgs","repos_url":"https://api.github.com/users/montehurd/repos","events_url":"https://api.github.com/users/montehurd/events{/privacy}","received_events_url":"https://api.github.com/users/montehurd/received_events","type":"User","site_admin":false},"created_at":"2016-02-21T19:13:54Z","updated_at":"2016-02-21T19:13:54Z","body":"oh man, this is great!"}}