{"action":"created","issue":{"url":"https://api.github.com/repos/DoSomething/phoenix-next/issues/670","repository_url":"https://api.github.com/repos/DoSomething/phoenix-next","labels_url":"https://api.github.com/repos/DoSomething/phoenix-next/issues/670/labels{/name}","comments_url":"https://api.github.com/repos/DoSomething/phoenix-next/issues/670/comments","events_url":"https://api.github.com/repos/DoSomething/phoenix-next/issues/670/events","html_url":"https://github.com/DoSomething/phoenix-next/pull/670","id":294876908,"number":670,"title":"WIP: Direct \"share\" route for SMS users.","user":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars1.githubusercontent.com/u/583202?v=4","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-02-06T19:05:36Z","updated_at":"2018-02-07T21:21:12Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/DoSomething/phoenix-next/pulls/670","html_url":"https://github.com/DoSomething/phoenix-next/pull/670","diff_url":"https://github.com/DoSomething/phoenix-next/pull/670.diff","patch_url":"https://github.com/DoSomething/phoenix-next/pull/670.patch"},"body":"### What does this PR do?\r\nThis PR adds a \"direct share page\", which will allow Gambit to capture real \"reportbacks\" for SMS share actions (instead of that murky business where we ask for screenshots!)\r\n\r\n🦈 Adds an un-gated MVP \"share page\" for SMS users, e.g. `/us/campaigns/gtm-test-page/share?href=https%3A%2F%2Fwww.dosomething.org&id=59820f96a0bfad79b63516fd `.\r\n\r\n🎓 Fixes issue (at least with Vim's EditorConfig plugin) where `*.php` settings weren't respected for `*.blade.php` files.\r\n\r\n👤 Adds our [test app](https://developers.facebook.com/apps/159247331463057/dashboard/)'s \"App ID\" to the example `.env` file so we don't manually have to complete this step. This app is configured to work with the `phoenix.test`local domain so share flows are testable.\r\n\r\n🐞 Uses the [debug build](https://goo.gl/TBYxCB) of the Facebook SDK so that we get some additional logging and error-checking when working on share features locally.\r\n\r\n### Any background context you want to provide?\r\nThis ended up being more complicated than it seemed at first:\r\n\r\n#### Why not build this into the existing client-side app?\r\nI had a lot of trouble getting our current React routing rules to allow a non-authed campaign page without forcing the \"landing page\" UI. I also didn't find a clean way to override Puck to get the user ID from the query string (rather than the Redux store) without potentially mucking other things up.\r\n\r\n#### Why doesn't this automatically redirect to the Facebook share prompt?\r\nThe call to `FB.ui('share', {...});` is blocked by the browser's built-in popup blocker _unless_ it is initiated by a \"click\" event handler. I briefly experimented with redirecting to the plain [Share URL](https://developers.facebook.com/docs/sharing/reference/share-dialog#redirect) but this doesn't allow us to see the \"success\" status after a user posts (both success and failure send users to our `redirect_uri` with same `#_=_` hash).\r\n\r\n#### How could we make this nicer?\r\nI was thinking that displaying Mendel's beautiful \"share action\" (#662) on this page would be a nice way to make this experience feel less awkward sans-redirect. __Update:__ See below!\r\n\r\n### What are the relevant tickets/cards?\r\n[#154844995](https://www.pivotaltracker.com/story/show/154844995)\r\n\r\n### Checklist\r\n- [ ] Documentation added for new features/changed endpoints.\r\n- [ ] Added appropriate feature/unit tests.\r\n- [ ] Added screenshot to PR description of related front-end updates on **small** screens.\r\n- [ ] Added screenshot to PR description of related front-end updates on **medium** screens.\r\n- [ ] Added screenshot to PR description of related front-end updates on **large** screens."},"comment":{"url":"https://api.github.com/repos/DoSomething/phoenix-next/issues/comments/363914632","html_url":"https://github.com/DoSomething/phoenix-next/pull/670#issuecomment-363914632","issue_url":"https://api.github.com/repos/DoSomething/phoenix-next/issues/670","id":363914632,"user":{"login":"DFurnes","id":583202,"avatar_url":"https://avatars1.githubusercontent.com/u/583202?v=4","gravatar_id":"","url":"https://api.github.com/users/DFurnes","html_url":"https://github.com/DFurnes","followers_url":"https://api.github.com/users/DFurnes/followers","following_url":"https://api.github.com/users/DFurnes/following{/other_user}","gists_url":"https://api.github.com/users/DFurnes/gists{/gist_id}","starred_url":"https://api.github.com/users/DFurnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DFurnes/subscriptions","organizations_url":"https://api.github.com/users/DFurnes/orgs","repos_url":"https://api.github.com/users/DFurnes/repos","events_url":"https://api.github.com/users/DFurnes/events{/privacy}","received_events_url":"https://api.github.com/users/DFurnes/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T21:21:11Z","updated_at":"2018-02-07T21:21:11Z","author_association":"OWNER","body":"Updated this to use the share action introduced in #662 and it's lookin' good!\r\n\r\n![screen recording 2018-02-07 at 04 19 pm](https://user-images.githubusercontent.com/583202/35942183-d2c29cb0-0c22-11e8-851d-f624c7666d6d.gif)\r\n"}}
{"actor":{"display_login":"DFurnes"}}