{"action":"created","comment":{"url":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/comments/173493292","pull_request_review_id":102699001,"id":173493292,"diff_hunk":"@@ -0,0 +1,48 @@\n+import * as React from 'react';\n+import ScrollView from 'ScrollView';\n+import View from 'View';\n+import ResultsRow from 'ResultsRow';\n+import Panel from 'Panel';\n+import { SearchResult } from 'model';\n+import './resultsPanel.scss';\n+\n+type Props = {\n+  results?: Array<SearchResult>;\n+};\n+\n+const Placeholder = ({ message }: { message: string }) => {\n+  return (\n+    <Panel type=\"floating\">\n+      <p>{message}</p>\n+    </Panel>\n+  );\n+};\n+\n+export default class ResultsPanel extends React.PureComponent<Props> {\n+  getPlaceholderMessage = (): string | null => {\n+    const { results } = this.props;\n+    const isResultsUndefined = typeof results === 'undefined';\n+    const hasResults = results && results.length;\n+\n+    if (isResultsUndefined)\n+      return 'Search a repo in the top bar to see the results!';\n+    if (!hasResults) return 'Sorry, no results for your stupid query!';\n+    return null;\n+  };\n+  render() {\n+    const { results } = this.props;\n+    const placeholderMessage = this.getPlaceholderMessage();\n+\n+    return (\n+      <ScrollView className=\"results\">\n+        <View column grow hAlignContent=\"center\">\n+          {placeholderMessage ? (\n+            <Placeholder message={placeholderMessage} />\n+          ) : (\n+            results && results.map(result => <ResultsRow {...result} />)","path":"src/components/ResultsPanel/ResultsPanel.tsx","position":42,"original_position":42,"commit_id":"d6397c5208de1242d72a7dc7d7b8994aa34c213b","original_commit_id":"d6397c5208de1242d72a7dc7d7b8994aa34c213b","user":{"login":"armoniaechaos","id":22859283,"avatar_url":"https://avatars2.githubusercontent.com/u/22859283?v=4","gravatar_id":"","url":"https://api.github.com/users/armoniaechaos","html_url":"https://github.com/armoniaechaos","followers_url":"https://api.github.com/users/armoniaechaos/followers","following_url":"https://api.github.com/users/armoniaechaos/following{/other_user}","gists_url":"https://api.github.com/users/armoniaechaos/gists{/gist_id}","starred_url":"https://api.github.com/users/armoniaechaos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armoniaechaos/subscriptions","organizations_url":"https://api.github.com/users/armoniaechaos/orgs","repos_url":"https://api.github.com/users/armoniaechaos/repos","events_url":"https://api.github.com/users/armoniaechaos/events{/privacy}","received_events_url":"https://api.github.com/users/armoniaechaos/received_events","type":"User","site_admin":false},"body":"Avevo pensato di passare l'ID di SearchResult model come key ad i singoli componenti! Ora lavoro ad un fix. In quanto usare l'indice come key non è consigliabile. Ora provvedo. :)","created_at":"2018-03-09T16:10:19Z","updated_at":"2018-03-09T16:10:19Z","html_url":"https://github.com/buildo/ste-gh-explorer/pull/9#discussion_r173493292","pull_request_url":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/9","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/comments/173493292"},"html":{"href":"https://github.com/buildo/ste-gh-explorer/pull/9#discussion_r173493292"},"pull_request":{"href":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/9"}},"in_reply_to_id":173482843},"pull_request":{"url":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/9","id":174017555,"html_url":"https://github.com/buildo/ste-gh-explorer/pull/9","diff_url":"https://github.com/buildo/ste-gh-explorer/pull/9.diff","patch_url":"https://github.com/buildo/ste-gh-explorer/pull/9.patch","issue_url":"https://api.github.com/repos/buildo/ste-gh-explorer/issues/9","number":9,"state":"open","locked":false,"title":"#5: [First iteration] Implement Results Panel (closes #5)","user":{"login":"armoniaechaos","id":22859283,"avatar_url":"https://avatars2.githubusercontent.com/u/22859283?v=4","gravatar_id":"","url":"https://api.github.com/users/armoniaechaos","html_url":"https://github.com/armoniaechaos","followers_url":"https://api.github.com/users/armoniaechaos/followers","following_url":"https://api.github.com/users/armoniaechaos/following{/other_user}","gists_url":"https://api.github.com/users/armoniaechaos/gists{/gist_id}","starred_url":"https://api.github.com/users/armoniaechaos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/armoniaechaos/subscriptions","organizations_url":"https://api.github.com/users/armoniaechaos/orgs","repos_url":"https://api.github.com/users/armoniaechaos/repos","events_url":"https://api.github.com/users/armoniaechaos/events{/privacy}","received_events_url":"https://api.github.com/users/armoniaechaos/received_events","type":"User","site_admin":false},"body":"Closes #5\r\n\r\n## Test Plan\r\nHo creato un modello (temporaneo in quanto non corrisponderà a quello che riceverò dalle API) su cui generare il componente ResultsRow, via props. Ho implementato il componente ResultsPanel utilizzando Panel e ScrollView dei BRC. \r\n### tests performed\r\nHo lasciato un border sui singoli componenti, così da rendere visibili i loro margini. \r\nPer quanto riguarda il componente ResultsRow, ovvero il singolo risultato della ricerca, ho utilizzato FlexView, con l'aggiunta via css della proprietà `justify-content: space-between`, non (ancora) accessibile dalle API di FlexView. (Se avete qualche consiglio a riguardo, possiamo trovare altre soluzioni, magari usando `margin-left/right: auto`. :) )\r\nE controllo il messaggio per il PlaceHolder di ResultsPanel in base alla props `results` passatagli.\r\n\r\n> These results can be screenshots, query results, or even just pointers to unit tests that successfully passed.}\r\n\r\n### tests not performed (domain coverage)\r\n> At times not everything can be tested, and writing what hasn't been tested is just as important as writing what has been tested.\r\n\r\n> An example of partial test is a field displaying 4 possible values. If 3 values are tested, with screenshots, and 1 is not, then it should be mentioned here.}\r\n","created_at":"2018-03-09T14:25:05Z","updated_at":"2018-03-09T16:10:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"282e61e53473b77e523ac3918200951cdef2de75","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":857932050,"url":"https://api.github.com/repos/buildo/ste-gh-explorer/labels/WIP","name":"WIP","color":"333333","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/9/commits","review_comments_url":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/9/comments","review_comment_url":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/buildo/ste-gh-explorer/issues/9/comments","statuses_url":"https://api.github.com/repos/buildo/ste-gh-explorer/statuses/d6397c5208de1242d72a7dc7d7b8994aa34c213b","head":{"label":"buildo:web-5-first_iteration_implement_results","ref":"web-5-first_iteration_implement_results","sha":"d6397c5208de1242d72a7dc7d7b8994aa34c213b","user":{"login":"buildo","id":7370958,"avatar_url":"https://avatars3.githubusercontent.com/u/7370958?v=4","gravatar_id":"","url":"https://api.github.com/users/buildo","html_url":"https://github.com/buildo","followers_url":"https://api.github.com/users/buildo/followers","following_url":"https://api.github.com/users/buildo/following{/other_user}","gists_url":"https://api.github.com/users/buildo/gists{/gist_id}","starred_url":"https://api.github.com/users/buildo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildo/subscriptions","organizations_url":"https://api.github.com/users/buildo/orgs","repos_url":"https://api.github.com/users/buildo/repos","events_url":"https://api.github.com/users/buildo/events{/privacy}","received_events_url":"https://api.github.com/users/buildo/received_events","type":"Organization","site_admin":false},"repo":{"id":124085920,"name":"ste-gh-explorer","full_name":"buildo/ste-gh-explorer","owner":{"login":"buildo","id":7370958,"avatar_url":"https://avatars3.githubusercontent.com/u/7370958?v=4","gravatar_id":"","url":"https://api.github.com/users/buildo","html_url":"https://github.com/buildo","followers_url":"https://api.github.com/users/buildo/followers","following_url":"https://api.github.com/users/buildo/following{/other_user}","gists_url":"https://api.github.com/users/buildo/gists{/gist_id}","starred_url":"https://api.github.com/users/buildo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildo/subscriptions","organizations_url":"https://api.github.com/users/buildo/orgs","repos_url":"https://api.github.com/users/buildo/repos","events_url":"https://api.github.com/users/buildo/events{/privacy}","received_events_url":"https://api.github.com/users/buildo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/buildo/ste-gh-explorer","description":null,"fork":false,"url":"https://api.github.com/repos/buildo/ste-gh-explorer","forks_url":"https://api.github.com/repos/buildo/ste-gh-explorer/forks","keys_url":"https://api.github.com/repos/buildo/ste-gh-explorer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buildo/ste-gh-explorer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buildo/ste-gh-explorer/teams","hooks_url":"https://api.github.com/repos/buildo/ste-gh-explorer/hooks","issue_events_url":"https://api.github.com/repos/buildo/ste-gh-explorer/issues/events{/number}","events_url":"https://api.github.com/repos/buildo/ste-gh-explorer/events","assignees_url":"https://api.github.com/repos/buildo/ste-gh-explorer/assignees{/user}","branches_url":"https://api.github.com/repos/buildo/ste-gh-explorer/branches{/branch}","tags_url":"https://api.github.com/repos/buildo/ste-gh-explorer/tags","blobs_url":"https://api.github.com/repos/buildo/ste-gh-explorer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buildo/ste-gh-explorer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buildo/ste-gh-explorer/git/refs{/sha}","trees_url":"https://api.github.com/repos/buildo/ste-gh-explorer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buildo/ste-gh-explorer/statuses/{sha}","languages_url":"https://api.github.com/repos/buildo/ste-gh-explorer/languages","stargazers_url":"https://api.github.com/repos/buildo/ste-gh-explorer/stargazers","contributors_url":"https://api.github.com/repos/buildo/ste-gh-explorer/contributors","subscribers_url":"https://api.github.com/repos/buildo/ste-gh-explorer/subscribers","subscription_url":"https://api.github.com/repos/buildo/ste-gh-explorer/subscription","commits_url":"https://api.github.com/repos/buildo/ste-gh-explorer/commits{/sha}","git_commits_url":"https://api.github.com/repos/buildo/ste-gh-explorer/git/commits{/sha}","comments_url":"https://api.github.com/repos/buildo/ste-gh-explorer/comments{/number}","issue_comment_url":"https://api.github.com/repos/buildo/ste-gh-explorer/issues/comments{/number}","contents_url":"https://api.github.com/repos/buildo/ste-gh-explorer/contents/{+path}","compare_url":"https://api.github.com/repos/buildo/ste-gh-explorer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buildo/ste-gh-explorer/merges","archive_url":"https://api.github.com/repos/buildo/ste-gh-explorer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buildo/ste-gh-explorer/downloads","issues_url":"https://api.github.com/repos/buildo/ste-gh-explorer/issues{/number}","pulls_url":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls{/number}","milestones_url":"https://api.github.com/repos/buildo/ste-gh-explorer/milestones{/number}","notifications_url":"https://api.github.com/repos/buildo/ste-gh-explorer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buildo/ste-gh-explorer/labels{/name}","releases_url":"https://api.github.com/repos/buildo/ste-gh-explorer/releases{/id}","deployments_url":"https://api.github.com/repos/buildo/ste-gh-explorer/deployments","created_at":"2018-03-06T13:56:27Z","updated_at":"2018-03-06T16:33:27Z","pushed_at":"2018-03-09T15:11:03Z","git_url":"git://github.com/buildo/ste-gh-explorer.git","ssh_url":"git@github.com:buildo/ste-gh-explorer.git","clone_url":"https://github.com/buildo/ste-gh-explorer.git","svn_url":"https://github.com/buildo/ste-gh-explorer","homepage":null,"size":114,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"buildo:master","ref":"master","sha":"ed6414b7e2beb0a0ae57740b682887ee54eae17b","user":{"login":"buildo","id":7370958,"avatar_url":"https://avatars3.githubusercontent.com/u/7370958?v=4","gravatar_id":"","url":"https://api.github.com/users/buildo","html_url":"https://github.com/buildo","followers_url":"https://api.github.com/users/buildo/followers","following_url":"https://api.github.com/users/buildo/following{/other_user}","gists_url":"https://api.github.com/users/buildo/gists{/gist_id}","starred_url":"https://api.github.com/users/buildo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildo/subscriptions","organizations_url":"https://api.github.com/users/buildo/orgs","repos_url":"https://api.github.com/users/buildo/repos","events_url":"https://api.github.com/users/buildo/events{/privacy}","received_events_url":"https://api.github.com/users/buildo/received_events","type":"Organization","site_admin":false},"repo":{"id":124085920,"name":"ste-gh-explorer","full_name":"buildo/ste-gh-explorer","owner":{"login":"buildo","id":7370958,"avatar_url":"https://avatars3.githubusercontent.com/u/7370958?v=4","gravatar_id":"","url":"https://api.github.com/users/buildo","html_url":"https://github.com/buildo","followers_url":"https://api.github.com/users/buildo/followers","following_url":"https://api.github.com/users/buildo/following{/other_user}","gists_url":"https://api.github.com/users/buildo/gists{/gist_id}","starred_url":"https://api.github.com/users/buildo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildo/subscriptions","organizations_url":"https://api.github.com/users/buildo/orgs","repos_url":"https://api.github.com/users/buildo/repos","events_url":"https://api.github.com/users/buildo/events{/privacy}","received_events_url":"https://api.github.com/users/buildo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/buildo/ste-gh-explorer","description":null,"fork":false,"url":"https://api.github.com/repos/buildo/ste-gh-explorer","forks_url":"https://api.github.com/repos/buildo/ste-gh-explorer/forks","keys_url":"https://api.github.com/repos/buildo/ste-gh-explorer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buildo/ste-gh-explorer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buildo/ste-gh-explorer/teams","hooks_url":"https://api.github.com/repos/buildo/ste-gh-explorer/hooks","issue_events_url":"https://api.github.com/repos/buildo/ste-gh-explorer/issues/events{/number}","events_url":"https://api.github.com/repos/buildo/ste-gh-explorer/events","assignees_url":"https://api.github.com/repos/buildo/ste-gh-explorer/assignees{/user}","branches_url":"https://api.github.com/repos/buildo/ste-gh-explorer/branches{/branch}","tags_url":"https://api.github.com/repos/buildo/ste-gh-explorer/tags","blobs_url":"https://api.github.com/repos/buildo/ste-gh-explorer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buildo/ste-gh-explorer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buildo/ste-gh-explorer/git/refs{/sha}","trees_url":"https://api.github.com/repos/buildo/ste-gh-explorer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buildo/ste-gh-explorer/statuses/{sha}","languages_url":"https://api.github.com/repos/buildo/ste-gh-explorer/languages","stargazers_url":"https://api.github.com/repos/buildo/ste-gh-explorer/stargazers","contributors_url":"https://api.github.com/repos/buildo/ste-gh-explorer/contributors","subscribers_url":"https://api.github.com/repos/buildo/ste-gh-explorer/subscribers","subscription_url":"https://api.github.com/repos/buildo/ste-gh-explorer/subscription","commits_url":"https://api.github.com/repos/buildo/ste-gh-explorer/commits{/sha}","git_commits_url":"https://api.github.com/repos/buildo/ste-gh-explorer/git/commits{/sha}","comments_url":"https://api.github.com/repos/buildo/ste-gh-explorer/comments{/number}","issue_comment_url":"https://api.github.com/repos/buildo/ste-gh-explorer/issues/comments{/number}","contents_url":"https://api.github.com/repos/buildo/ste-gh-explorer/contents/{+path}","compare_url":"https://api.github.com/repos/buildo/ste-gh-explorer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buildo/ste-gh-explorer/merges","archive_url":"https://api.github.com/repos/buildo/ste-gh-explorer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buildo/ste-gh-explorer/downloads","issues_url":"https://api.github.com/repos/buildo/ste-gh-explorer/issues{/number}","pulls_url":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls{/number}","milestones_url":"https://api.github.com/repos/buildo/ste-gh-explorer/milestones{/number}","notifications_url":"https://api.github.com/repos/buildo/ste-gh-explorer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buildo/ste-gh-explorer/labels{/name}","releases_url":"https://api.github.com/repos/buildo/ste-gh-explorer/releases{/id}","deployments_url":"https://api.github.com/repos/buildo/ste-gh-explorer/deployments","created_at":"2018-03-06T13:56:27Z","updated_at":"2018-03-06T16:33:27Z","pushed_at":"2018-03-09T15:11:03Z","git_url":"git://github.com/buildo/ste-gh-explorer.git","ssh_url":"git@github.com:buildo/ste-gh-explorer.git","clone_url":"https://github.com/buildo/ste-gh-explorer.git","svn_url":"https://github.com/buildo/ste-gh-explorer","homepage":null,"size":114,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/9"},"html":{"href":"https://github.com/buildo/ste-gh-explorer/pull/9"},"issue":{"href":"https://api.github.com/repos/buildo/ste-gh-explorer/issues/9"},"comments":{"href":"https://api.github.com/repos/buildo/ste-gh-explorer/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/buildo/ste-gh-explorer/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/buildo/ste-gh-explorer/statuses/d6397c5208de1242d72a7dc7d7b8994aa34c213b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"armoniaechaos"}}