{"action":"created","comment":{"url":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/comments/204889854","pull_request_review_id":140053080,"id":204889854,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDg4OTg1NA==","diff_hunk":"@@ -0,0 +1,41 @@\n+import { RouteComponentProps } from 'react-router-native';\n+\n+// tslint:disable-next-line:no-any\n+export type RouterProps = RouteComponentProps<any>;\n+\n+export enum Routes {\n+    Welcome,\n+    Home,\n+    Questionnaire,\n+    MyPlan,\n+    Learn,\n+    LearnDetail,\n+    TaskDetail,\n+    ArticleDetail,\n+}\n+\n+export const routePath = (route: Routes): string => {\n+    switch (route) {\n+        default:\n+        case Routes.Welcome:\n+            return '/';\n+        case Routes.Home:\n+            return '/home';\n+        case Routes.Questionnaire:\n+            return '/questionnaire';\n+        case Routes.MyPlan:\n+            return '/my-plan';\n+        case Routes.Learn:\n+            return '/learn';\n+        case Routes.LearnDetail:\n+            return '/learn/:learnId';\n+        case Routes.TaskDetail:\n+            return '/task/:taskId';\n+        case Routes.ArticleDetail:\n+            return '/article/:articleId';\n+    }\n+};","path":"src/application/routing.ts","position":38,"original_position":37,"commit_id":"8ab278f9e4adbd280a14fa838415855ef456a9b8","original_commit_id":"a3088e0ab7cc311aa254ea50929d5ddf43a477f3","user":{"login":"bensinjin","id":3228323,"node_id":"MDQ6VXNlcjMyMjgzMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/3228323?v=4","gravatar_id":"","url":"https://api.github.com/users/bensinjin","html_url":"https://github.com/bensinjin","followers_url":"https://api.github.com/users/bensinjin/followers","following_url":"https://api.github.com/users/bensinjin/following{/other_user}","gists_url":"https://api.github.com/users/bensinjin/gists{/gist_id}","starred_url":"https://api.github.com/users/bensinjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensinjin/subscriptions","organizations_url":"https://api.github.com/users/bensinjin/orgs","repos_url":"https://api.github.com/users/bensinjin/repos","events_url":"https://api.github.com/users/bensinjin/events{/privacy}","received_events_url":"https://api.github.com/users/bensinjin/received_events","type":"User","site_admin":false},"body":"See below - we now use the goTo functions for navigation needs which utilize the path functions.","created_at":"2018-07-24T19:54:12Z","updated_at":"2018-07-24T19:54:12Z","html_url":"https://github.com/pg-irc/pathways-frontend/pull/168#discussion_r204889854","pull_request_url":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/168","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/comments/204889854"},"html":{"href":"https://github.com/pg-irc/pathways-frontend/pull/168#discussion_r204889854"},"pull_request":{"href":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/168"}},"in_reply_to_id":204818514},"pull_request":{"url":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/168","id":203299217,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzMjk5MjE3","html_url":"https://github.com/pg-irc/pathways-frontend/pull/168","diff_url":"https://github.com/pg-irc/pathways-frontend/pull/168.diff","patch_url":"https://github.com/pg-irc/pathways-frontend/pull/168.patch","issue_url":"https://api.github.com/repos/pg-irc/pathways-frontend/issues/168","number":168,"state":"open","locked":false,"title":"Feature/issue 154 routing","user":{"login":"bensinjin","id":3228323,"node_id":"MDQ6VXNlcjMyMjgzMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/3228323?v=4","gravatar_id":"","url":"https://api.github.com/users/bensinjin","html_url":"https://github.com/bensinjin","followers_url":"https://api.github.com/users/bensinjin/followers","following_url":"https://api.github.com/users/bensinjin/following{/other_user}","gists_url":"https://api.github.com/users/bensinjin/gists{/gist_id}","starred_url":"https://api.github.com/users/bensinjin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bensinjin/subscriptions","organizations_url":"https://api.github.com/users/bensinjin/orgs","repos_url":"https://api.github.com/users/bensinjin/repos","events_url":"https://api.github.com/users/bensinjin/events{/privacy}","received_events_url":"https://api.github.com/users/bensinjin/received_events","type":"User","site_admin":false},"body":"This PR replaces our current router with the very established [react router](https://reacttraining.com/react-router/native/guides/philosophy) these are the same devs that produce the history library which many router solutions leverage. Outlined in #102, #130, and #154 are the issues we were encountering with our existing router. Another major issue is that Redux-router handles history internally which prevented us from dealing with it directly which from what I could tell would be the only way to fix our routing issues.  I decided it would be simpler, quicker, and cleaner to swap out this piece for something I feel will serve us better moving forward.  Please try it out, you should notice:\r\n\r\n- Back button works as expected on all pages\r\n- Android back button works as expected and does not close the app\r\n- The system for adding new routes, with or without parameter support, and navigating to them is quick and straight forward to implement, react-router takes care of knowing what to render based on props to the `Route` component\r\n- We have to write far less often redundant routing related code. Any component that requires access to routing now references one interface: `RouterProps` so we don't have to be constantly writing variations of props like `goToTaskDetail` and `goToMyPlan` for component A and then again for component B etc..","created_at":"2018-07-23T18:07:51Z","updated_at":"2018-07-24T19:54:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"205d816d22070d1c0cee0a569722f6aa900bfc57","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/168/commits","review_comments_url":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/168/comments","review_comment_url":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pg-irc/pathways-frontend/issues/168/comments","statuses_url":"https://api.github.com/repos/pg-irc/pathways-frontend/statuses/8ab278f9e4adbd280a14fa838415855ef456a9b8","head":{"label":"pg-irc:feature/Issue_154_routing","ref":"feature/Issue_154_routing","sha":"8ab278f9e4adbd280a14fa838415855ef456a9b8","user":{"login":"pg-irc","id":30124065,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMTI0MDY1","avatar_url":"https://avatars3.githubusercontent.com/u/30124065?v=4","gravatar_id":"","url":"https://api.github.com/users/pg-irc","html_url":"https://github.com/pg-irc","followers_url":"https://api.github.com/users/pg-irc/followers","following_url":"https://api.github.com/users/pg-irc/following{/other_user}","gists_url":"https://api.github.com/users/pg-irc/gists{/gist_id}","starred_url":"https://api.github.com/users/pg-irc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pg-irc/subscriptions","organizations_url":"https://api.github.com/users/pg-irc/orgs","repos_url":"https://api.github.com/users/pg-irc/repos","events_url":"https://api.github.com/users/pg-irc/events{/privacy}","received_events_url":"https://api.github.com/users/pg-irc/received_events","type":"Organization","site_admin":false},"repo":{"id":99282566,"node_id":"MDEwOlJlcG9zaXRvcnk5OTI4MjU2Ng==","name":"pathways-frontend","full_name":"pg-irc/pathways-frontend","owner":{"login":"pg-irc","id":30124065,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMTI0MDY1","avatar_url":"https://avatars3.githubusercontent.com/u/30124065?v=4","gravatar_id":"","url":"https://api.github.com/users/pg-irc","html_url":"https://github.com/pg-irc","followers_url":"https://api.github.com/users/pg-irc/followers","following_url":"https://api.github.com/users/pg-irc/following{/other_user}","gists_url":"https://api.github.com/users/pg-irc/gists{/gist_id}","starred_url":"https://api.github.com/users/pg-irc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pg-irc/subscriptions","organizations_url":"https://api.github.com/users/pg-irc/orgs","repos_url":"https://api.github.com/users/pg-irc/repos","events_url":"https://api.github.com/users/pg-irc/events{/privacy}","received_events_url":"https://api.github.com/users/pg-irc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pg-irc/pathways-frontend","description":null,"fork":false,"url":"https://api.github.com/repos/pg-irc/pathways-frontend","forks_url":"https://api.github.com/repos/pg-irc/pathways-frontend/forks","keys_url":"https://api.github.com/repos/pg-irc/pathways-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pg-irc/pathways-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pg-irc/pathways-frontend/teams","hooks_url":"https://api.github.com/repos/pg-irc/pathways-frontend/hooks","issue_events_url":"https://api.github.com/repos/pg-irc/pathways-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/pg-irc/pathways-frontend/events","assignees_url":"https://api.github.com/repos/pg-irc/pathways-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/pg-irc/pathways-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/pg-irc/pathways-frontend/tags","blobs_url":"https://api.github.com/repos/pg-irc/pathways-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pg-irc/pathways-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pg-irc/pathways-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/pg-irc/pathways-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pg-irc/pathways-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/pg-irc/pathways-frontend/languages","stargazers_url":"https://api.github.com/repos/pg-irc/pathways-frontend/stargazers","contributors_url":"https://api.github.com/repos/pg-irc/pathways-frontend/contributors","subscribers_url":"https://api.github.com/repos/pg-irc/pathways-frontend/subscribers","subscription_url":"https://api.github.com/repos/pg-irc/pathways-frontend/subscription","commits_url":"https://api.github.com/repos/pg-irc/pathways-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/pg-irc/pathways-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/pg-irc/pathways-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/pg-irc/pathways-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/pg-irc/pathways-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/pg-irc/pathways-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pg-irc/pathways-frontend/merges","archive_url":"https://api.github.com/repos/pg-irc/pathways-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pg-irc/pathways-frontend/downloads","issues_url":"https://api.github.com/repos/pg-irc/pathways-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/pg-irc/pathways-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/pg-irc/pathways-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pg-irc/pathways-frontend/labels{/name}","releases_url":"https://api.github.com/repos/pg-irc/pathways-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/pg-irc/pathways-frontend/deployments","created_at":"2017-08-03T23:15:59Z","updated_at":"2018-07-21T14:34:03Z","pushed_at":"2018-07-24T19:50:15Z","git_url":"git://github.com/pg-irc/pathways-frontend.git","ssh_url":"git@github.com:pg-irc/pathways-frontend.git","clone_url":"https://github.com/pg-irc/pathways-frontend.git","svn_url":"https://github.com/pg-irc/pathways-frontend","homepage":null,"size":2348,"stargazers_count":5,"watchers_count":5,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":49,"license":null,"forks":2,"open_issues":49,"watchers":5,"default_branch":"master"}},"base":{"label":"pg-irc:master","ref":"master","sha":"ee978ff6a6d39f12c629daadacdab253448bf165","user":{"login":"pg-irc","id":30124065,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMTI0MDY1","avatar_url":"https://avatars3.githubusercontent.com/u/30124065?v=4","gravatar_id":"","url":"https://api.github.com/users/pg-irc","html_url":"https://github.com/pg-irc","followers_url":"https://api.github.com/users/pg-irc/followers","following_url":"https://api.github.com/users/pg-irc/following{/other_user}","gists_url":"https://api.github.com/users/pg-irc/gists{/gist_id}","starred_url":"https://api.github.com/users/pg-irc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pg-irc/subscriptions","organizations_url":"https://api.github.com/users/pg-irc/orgs","repos_url":"https://api.github.com/users/pg-irc/repos","events_url":"https://api.github.com/users/pg-irc/events{/privacy}","received_events_url":"https://api.github.com/users/pg-irc/received_events","type":"Organization","site_admin":false},"repo":{"id":99282566,"node_id":"MDEwOlJlcG9zaXRvcnk5OTI4MjU2Ng==","name":"pathways-frontend","full_name":"pg-irc/pathways-frontend","owner":{"login":"pg-irc","id":30124065,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwMTI0MDY1","avatar_url":"https://avatars3.githubusercontent.com/u/30124065?v=4","gravatar_id":"","url":"https://api.github.com/users/pg-irc","html_url":"https://github.com/pg-irc","followers_url":"https://api.github.com/users/pg-irc/followers","following_url":"https://api.github.com/users/pg-irc/following{/other_user}","gists_url":"https://api.github.com/users/pg-irc/gists{/gist_id}","starred_url":"https://api.github.com/users/pg-irc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pg-irc/subscriptions","organizations_url":"https://api.github.com/users/pg-irc/orgs","repos_url":"https://api.github.com/users/pg-irc/repos","events_url":"https://api.github.com/users/pg-irc/events{/privacy}","received_events_url":"https://api.github.com/users/pg-irc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pg-irc/pathways-frontend","description":null,"fork":false,"url":"https://api.github.com/repos/pg-irc/pathways-frontend","forks_url":"https://api.github.com/repos/pg-irc/pathways-frontend/forks","keys_url":"https://api.github.com/repos/pg-irc/pathways-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pg-irc/pathways-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pg-irc/pathways-frontend/teams","hooks_url":"https://api.github.com/repos/pg-irc/pathways-frontend/hooks","issue_events_url":"https://api.github.com/repos/pg-irc/pathways-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/pg-irc/pathways-frontend/events","assignees_url":"https://api.github.com/repos/pg-irc/pathways-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/pg-irc/pathways-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/pg-irc/pathways-frontend/tags","blobs_url":"https://api.github.com/repos/pg-irc/pathways-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pg-irc/pathways-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pg-irc/pathways-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/pg-irc/pathways-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pg-irc/pathways-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/pg-irc/pathways-frontend/languages","stargazers_url":"https://api.github.com/repos/pg-irc/pathways-frontend/stargazers","contributors_url":"https://api.github.com/repos/pg-irc/pathways-frontend/contributors","subscribers_url":"https://api.github.com/repos/pg-irc/pathways-frontend/subscribers","subscription_url":"https://api.github.com/repos/pg-irc/pathways-frontend/subscription","commits_url":"https://api.github.com/repos/pg-irc/pathways-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/pg-irc/pathways-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/pg-irc/pathways-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/pg-irc/pathways-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/pg-irc/pathways-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/pg-irc/pathways-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pg-irc/pathways-frontend/merges","archive_url":"https://api.github.com/repos/pg-irc/pathways-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pg-irc/pathways-frontend/downloads","issues_url":"https://api.github.com/repos/pg-irc/pathways-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/pg-irc/pathways-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/pg-irc/pathways-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pg-irc/pathways-frontend/labels{/name}","releases_url":"https://api.github.com/repos/pg-irc/pathways-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/pg-irc/pathways-frontend/deployments","created_at":"2017-08-03T23:15:59Z","updated_at":"2018-07-21T14:34:03Z","pushed_at":"2018-07-24T19:50:15Z","git_url":"git://github.com/pg-irc/pathways-frontend.git","ssh_url":"git@github.com:pg-irc/pathways-frontend.git","clone_url":"https://github.com/pg-irc/pathways-frontend.git","svn_url":"https://github.com/pg-irc/pathways-frontend","homepage":null,"size":2348,"stargazers_count":5,"watchers_count":5,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":49,"license":null,"forks":2,"open_issues":49,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/168"},"html":{"href":"https://github.com/pg-irc/pathways-frontend/pull/168"},"issue":{"href":"https://api.github.com/repos/pg-irc/pathways-frontend/issues/168"},"comments":{"href":"https://api.github.com/repos/pg-irc/pathways-frontend/issues/168/comments"},"review_comments":{"href":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/168/comments"},"review_comment":{"href":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pg-irc/pathways-frontend/pulls/168/commits"},"statuses":{"href":"https://api.github.com/repos/pg-irc/pathways-frontend/statuses/8ab278f9e4adbd280a14fa838415855ef456a9b8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bensinjin"}}