{"action":"created","comment":{"url":"https://api.github.com/repos/hackoregon/civic/pulls/comments/205681408","pull_request_review_id":141000575,"id":205681408,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTY4MTQwOA==","diff_hunk":"@@ -17,31 +17,26 @@ const tooltip = css`\n \n const MapTooltip = (props) => {\n   const {\n-    tooltipInfo,\n-    x,\n-    y,\n+    tooltipData,\n   } = props;\n \n+  const x = tooltipData.x;\n+  const y = tooltipData.y;\n+\n   const xPosition = x < window.innerWidth * 0.66 ? x : x - (window.innerWidth * 0.1);\n   const yPostition = y < 375  ? y : y - 50;\n \n-  const keyValuePairs = Object.entries(tooltipInfo.properties);\n-\n-  const tooltipContent = keyValuePairs.map((d, i) => {\n-    const nameSplit = d[0].split(\"_\");\n-    const name = nameSplit.reduce((acc, cur, i) => {\n-      const capitalize = cur.charAt(0).toUpperCase() + cur.slice(1);\n-      return acc + \" \" + capitalize;\n-    }, \"\");\n+  const keyValuePairs = Object.entries(tooltipData.content);","path":"packages/component-library/src/CivicSandboxMap/CivicSandboxTooltip.js","position":24,"original_position":24,"commit_id":"952025c97652a65761d37e15d8a8da9ac03da211","original_commit_id":"952025c97652a65761d37e15d8a8da9ac03da211","user":{"login":"jaronheard","id":7065695,"node_id":"MDQ6VXNlcjcwNjU2OTU=","avatar_url":"https://avatars0.githubusercontent.com/u/7065695?v=4","gravatar_id":"","url":"https://api.github.com/users/jaronheard","html_url":"https://github.com/jaronheard","followers_url":"https://api.github.com/users/jaronheard/followers","following_url":"https://api.github.com/users/jaronheard/following{/other_user}","gists_url":"https://api.github.com/users/jaronheard/gists{/gist_id}","starred_url":"https://api.github.com/users/jaronheard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaronheard/subscriptions","organizations_url":"https://api.github.com/users/jaronheard/orgs","repos_url":"https://api.github.com/users/jaronheard/repos","events_url":"https://api.github.com/users/jaronheard/events{/privacy}","received_events_url":"https://api.github.com/users/jaronheard/received_events","type":"User","site_admin":false},"body":"Is there a better name than keyValuePairs for this variable?","created_at":"2018-07-27T06:45:55Z","updated_at":"2018-07-27T06:49:17Z","html_url":"https://github.com/hackoregon/civic/pull/374#discussion_r205681408","pull_request_url":"https://api.github.com/repos/hackoregon/civic/pulls/374","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hackoregon/civic/pulls/comments/205681408"},"html":{"href":"https://github.com/hackoregon/civic/pull/374#discussion_r205681408"},"pull_request":{"href":"https://api.github.com/repos/hackoregon/civic/pulls/374"}}},"pull_request":{"url":"https://api.github.com/repos/hackoregon/civic/pulls/374","id":204046947,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MDQ2OTQ3","html_url":"https://github.com/hackoregon/civic/pull/374","diff_url":"https://github.com/hackoregon/civic/pull/374.diff","patch_url":"https://github.com/hackoregon/civic/pull/374.patch","issue_url":"https://api.github.com/repos/hackoregon/civic/issues/374","number":374,"state":"open","locked":false,"title":"Fix Sandbox Map Tooltip","user":{"login":"mendozaline","id":9361258,"node_id":"MDQ6VXNlcjkzNjEyNTg=","avatar_url":"https://avatars2.githubusercontent.com/u/9361258?v=4","gravatar_id":"","url":"https://api.github.com/users/mendozaline","html_url":"https://github.com/mendozaline","followers_url":"https://api.github.com/users/mendozaline/followers","following_url":"https://api.github.com/users/mendozaline/following{/other_user}","gists_url":"https://api.github.com/users/mendozaline/gists{/gist_id}","starred_url":"https://api.github.com/users/mendozaline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mendozaline/subscriptions","organizations_url":"https://api.github.com/users/mendozaline/orgs","repos_url":"https://api.github.com/users/mendozaline/repos","events_url":"https://api.github.com/users/mendozaline/events{/privacy}","received_events_url":"https://api.github.com/users/mendozaline/received_events","type":"User","site_admin":false},"body":"Currently the tooltip for the sandbox uses the field names from the property object for its text. So some of the descriptions are not very useful.\r\n\r\nI finally got around to fixing that so the text is properly formatted and uses the field names provided in `slide_meta.attributes` for each slide.\r\n\r\nOne issue that I encountered was that some of the `slide_meta.attributes` fields don't match the names of the fields in the actual data. For example, in [slide 016 - points of interest](http://service.civicpdx.org/neighborhood-development/sandbox/slides/retailgrocers/?format=json), the value for `slide_meta.attributes.secondary.field` is `description_txt` but the field name in `slide_data.features.properties` is `description2_txt`. So that mismatch prevents the tooltip from showing up since they don't match. The same problem happens with [slide 015 - change in ridership by route](http://service.civicpdx.org/transportation-systems/sandbox/slides/routechange/?format=json).\r\n\r\nAnother issue is that some slides have information in `slide_data.features.properties`, but there are no `primary` or `secondary` fields provided in `slide_meta`. [Slide 011 - demolitions](http://service.civicpdx.org/neighborhood-development/sandbox/slides/demolitions/) and [slide 032 - crashes](http://service.civicpdx.org/transportation-systems/sandbox/slides/crashes/) share that issue.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n","created_at":"2018-07-26T07:06:56Z","updated_at":"2018-07-27T06:49:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61e099c99768b33eeac9b55808bd6e4ec3f5a1fb","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hackoregon/civic/pulls/374/commits","review_comments_url":"https://api.github.com/repos/hackoregon/civic/pulls/374/comments","review_comment_url":"https://api.github.com/repos/hackoregon/civic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hackoregon/civic/issues/374/comments","statuses_url":"https://api.github.com/repos/hackoregon/civic/statuses/952025c97652a65761d37e15d8a8da9ac03da211","head":{"label":"hackoregon:update/map-tooltip","ref":"update/map-tooltip","sha":"952025c97652a65761d37e15d8a8da9ac03da211","user":{"login":"hackoregon","id":6343574,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNDM1NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6343574?v=4","gravatar_id":"","url":"https://api.github.com/users/hackoregon","html_url":"https://github.com/hackoregon","followers_url":"https://api.github.com/users/hackoregon/followers","following_url":"https://api.github.com/users/hackoregon/following{/other_user}","gists_url":"https://api.github.com/users/hackoregon/gists{/gist_id}","starred_url":"https://api.github.com/users/hackoregon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackoregon/subscriptions","organizations_url":"https://api.github.com/users/hackoregon/orgs","repos_url":"https://api.github.com/users/hackoregon/repos","events_url":"https://api.github.com/users/hackoregon/events{/privacy}","received_events_url":"https://api.github.com/users/hackoregon/received_events","type":"Organization","site_admin":false},"repo":{"id":101359725,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEzNTk3MjU=","name":"civic","full_name":"hackoregon/civic","owner":{"login":"hackoregon","id":6343574,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNDM1NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6343574?v=4","gravatar_id":"","url":"https://api.github.com/users/hackoregon","html_url":"https://github.com/hackoregon","followers_url":"https://api.github.com/users/hackoregon/followers","following_url":"https://api.github.com/users/hackoregon/following{/other_user}","gists_url":"https://api.github.com/users/hackoregon/gists{/gist_id}","starred_url":"https://api.github.com/users/hackoregon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackoregon/subscriptions","organizations_url":"https://api.github.com/users/hackoregon/orgs","repos_url":"https://api.github.com/users/hackoregon/repos","events_url":"https://api.github.com/users/hackoregon/events{/privacy}","received_events_url":"https://api.github.com/users/hackoregon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hackoregon/civic","description":"The frontend monorepo for the CIVIC platform.","fork":false,"url":"https://api.github.com/repos/hackoregon/civic","forks_url":"https://api.github.com/repos/hackoregon/civic/forks","keys_url":"https://api.github.com/repos/hackoregon/civic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hackoregon/civic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hackoregon/civic/teams","hooks_url":"https://api.github.com/repos/hackoregon/civic/hooks","issue_events_url":"https://api.github.com/repos/hackoregon/civic/issues/events{/number}","events_url":"https://api.github.com/repos/hackoregon/civic/events","assignees_url":"https://api.github.com/repos/hackoregon/civic/assignees{/user}","branches_url":"https://api.github.com/repos/hackoregon/civic/branches{/branch}","tags_url":"https://api.github.com/repos/hackoregon/civic/tags","blobs_url":"https://api.github.com/repos/hackoregon/civic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hackoregon/civic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hackoregon/civic/git/refs{/sha}","trees_url":"https://api.github.com/repos/hackoregon/civic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hackoregon/civic/statuses/{sha}","languages_url":"https://api.github.com/repos/hackoregon/civic/languages","stargazers_url":"https://api.github.com/repos/hackoregon/civic/stargazers","contributors_url":"https://api.github.com/repos/hackoregon/civic/contributors","subscribers_url":"https://api.github.com/repos/hackoregon/civic/subscribers","subscription_url":"https://api.github.com/repos/hackoregon/civic/subscription","commits_url":"https://api.github.com/repos/hackoregon/civic/commits{/sha}","git_commits_url":"https://api.github.com/repos/hackoregon/civic/git/commits{/sha}","comments_url":"https://api.github.com/repos/hackoregon/civic/comments{/number}","issue_comment_url":"https://api.github.com/repos/hackoregon/civic/issues/comments{/number}","contents_url":"https://api.github.com/repos/hackoregon/civic/contents/{+path}","compare_url":"https://api.github.com/repos/hackoregon/civic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hackoregon/civic/merges","archive_url":"https://api.github.com/repos/hackoregon/civic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hackoregon/civic/downloads","issues_url":"https://api.github.com/repos/hackoregon/civic/issues{/number}","pulls_url":"https://api.github.com/repos/hackoregon/civic/pulls{/number}","milestones_url":"https://api.github.com/repos/hackoregon/civic/milestones{/number}","notifications_url":"https://api.github.com/repos/hackoregon/civic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hackoregon/civic/labels{/name}","releases_url":"https://api.github.com/repos/hackoregon/civic/releases{/id}","deployments_url":"https://api.github.com/repos/hackoregon/civic/deployments","created_at":"2017-08-25T02:57:36Z","updated_at":"2018-07-26T05:19:50Z","pushed_at":"2018-07-26T07:06:56Z","git_url":"git://github.com/hackoregon/civic.git","ssh_url":"git@github.com:hackoregon/civic.git","clone_url":"https://github.com/hackoregon/civic.git","svn_url":"https://github.com/hackoregon/civic","homepage":"http://civicplatform.org","size":95782,"stargazers_count":35,"watchers_count":35,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":52,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":13,"open_issues":52,"watchers":35,"default_branch":"master"}},"base":{"label":"hackoregon:master","ref":"master","sha":"9d0c0d7ec736f336277a00953f956316f6633e54","user":{"login":"hackoregon","id":6343574,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNDM1NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6343574?v=4","gravatar_id":"","url":"https://api.github.com/users/hackoregon","html_url":"https://github.com/hackoregon","followers_url":"https://api.github.com/users/hackoregon/followers","following_url":"https://api.github.com/users/hackoregon/following{/other_user}","gists_url":"https://api.github.com/users/hackoregon/gists{/gist_id}","starred_url":"https://api.github.com/users/hackoregon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackoregon/subscriptions","organizations_url":"https://api.github.com/users/hackoregon/orgs","repos_url":"https://api.github.com/users/hackoregon/repos","events_url":"https://api.github.com/users/hackoregon/events{/privacy}","received_events_url":"https://api.github.com/users/hackoregon/received_events","type":"Organization","site_admin":false},"repo":{"id":101359725,"node_id":"MDEwOlJlcG9zaXRvcnkxMDEzNTk3MjU=","name":"civic","full_name":"hackoregon/civic","owner":{"login":"hackoregon","id":6343574,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYzNDM1NzQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6343574?v=4","gravatar_id":"","url":"https://api.github.com/users/hackoregon","html_url":"https://github.com/hackoregon","followers_url":"https://api.github.com/users/hackoregon/followers","following_url":"https://api.github.com/users/hackoregon/following{/other_user}","gists_url":"https://api.github.com/users/hackoregon/gists{/gist_id}","starred_url":"https://api.github.com/users/hackoregon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackoregon/subscriptions","organizations_url":"https://api.github.com/users/hackoregon/orgs","repos_url":"https://api.github.com/users/hackoregon/repos","events_url":"https://api.github.com/users/hackoregon/events{/privacy}","received_events_url":"https://api.github.com/users/hackoregon/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hackoregon/civic","description":"The frontend monorepo for the CIVIC platform.","fork":false,"url":"https://api.github.com/repos/hackoregon/civic","forks_url":"https://api.github.com/repos/hackoregon/civic/forks","keys_url":"https://api.github.com/repos/hackoregon/civic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hackoregon/civic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hackoregon/civic/teams","hooks_url":"https://api.github.com/repos/hackoregon/civic/hooks","issue_events_url":"https://api.github.com/repos/hackoregon/civic/issues/events{/number}","events_url":"https://api.github.com/repos/hackoregon/civic/events","assignees_url":"https://api.github.com/repos/hackoregon/civic/assignees{/user}","branches_url":"https://api.github.com/repos/hackoregon/civic/branches{/branch}","tags_url":"https://api.github.com/repos/hackoregon/civic/tags","blobs_url":"https://api.github.com/repos/hackoregon/civic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hackoregon/civic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hackoregon/civic/git/refs{/sha}","trees_url":"https://api.github.com/repos/hackoregon/civic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hackoregon/civic/statuses/{sha}","languages_url":"https://api.github.com/repos/hackoregon/civic/languages","stargazers_url":"https://api.github.com/repos/hackoregon/civic/stargazers","contributors_url":"https://api.github.com/repos/hackoregon/civic/contributors","subscribers_url":"https://api.github.com/repos/hackoregon/civic/subscribers","subscription_url":"https://api.github.com/repos/hackoregon/civic/subscription","commits_url":"https://api.github.com/repos/hackoregon/civic/commits{/sha}","git_commits_url":"https://api.github.com/repos/hackoregon/civic/git/commits{/sha}","comments_url":"https://api.github.com/repos/hackoregon/civic/comments{/number}","issue_comment_url":"https://api.github.com/repos/hackoregon/civic/issues/comments{/number}","contents_url":"https://api.github.com/repos/hackoregon/civic/contents/{+path}","compare_url":"https://api.github.com/repos/hackoregon/civic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hackoregon/civic/merges","archive_url":"https://api.github.com/repos/hackoregon/civic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hackoregon/civic/downloads","issues_url":"https://api.github.com/repos/hackoregon/civic/issues{/number}","pulls_url":"https://api.github.com/repos/hackoregon/civic/pulls{/number}","milestones_url":"https://api.github.com/repos/hackoregon/civic/milestones{/number}","notifications_url":"https://api.github.com/repos/hackoregon/civic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hackoregon/civic/labels{/name}","releases_url":"https://api.github.com/repos/hackoregon/civic/releases{/id}","deployments_url":"https://api.github.com/repos/hackoregon/civic/deployments","created_at":"2017-08-25T02:57:36Z","updated_at":"2018-07-26T05:19:50Z","pushed_at":"2018-07-26T07:06:56Z","git_url":"git://github.com/hackoregon/civic.git","ssh_url":"git@github.com:hackoregon/civic.git","clone_url":"https://github.com/hackoregon/civic.git","svn_url":"https://github.com/hackoregon/civic","homepage":"http://civicplatform.org","size":95782,"stargazers_count":35,"watchers_count":35,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":52,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":13,"open_issues":52,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hackoregon/civic/pulls/374"},"html":{"href":"https://github.com/hackoregon/civic/pull/374"},"issue":{"href":"https://api.github.com/repos/hackoregon/civic/issues/374"},"comments":{"href":"https://api.github.com/repos/hackoregon/civic/issues/374/comments"},"review_comments":{"href":"https://api.github.com/repos/hackoregon/civic/pulls/374/comments"},"review_comment":{"href":"https://api.github.com/repos/hackoregon/civic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hackoregon/civic/pulls/374/commits"},"statuses":{"href":"https://api.github.com/repos/hackoregon/civic/statuses/952025c97652a65761d37e15d8a8da9ac03da211"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jaronheard"}}