{"action":"created","comment":{"url":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/comments/230901536","pull_request_review_id":171746446,"id":230901536,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDkwMTUzNg==","diff_hunk":"@@ -12,60 +12,96 @@ class ContentItem extends React.PureComponent {\n       aspect,\n       className,\n       content,\n-      failed,\n+      failedText,\n       fileSize,\n+      height,\n       icon,\n       isProtected,\n       loading,\n+      loadingText,\n       style,\n       subtitle,\n       title,\n       type,\n+      width,\n       ...otherProps\n     } = this.props;\n \n+    const findAspect = (width, height) => {\n+\n+      if(width && height){\n+\n+        const aspectRatioObj = {\n+          1 : 'oneOne',\n+          .75 : 'threeFour',\n+          .66 : 'twoThree',\n+          .4 : 'tall',\n+          4.35 : 'wide',\n+          1.33 : 'fourThree',\n+          1.5 : 'threeTwo',\n+          1.78 : 'sixteenNine'\n+        };\n+\n+        const providedAspectRatio = width/height;\n+\n+        const closestAspectRatio = Object.keys(aspectRatioObj)\n+        .reduce((prev, curr) => Math.abs(curr - providedAspectRatio) < Math.abs(prev - providedAspectRatio)","path":"src/lib/ContentItem/index.js","position":38,"original_position":38,"commit_id":"3cde88d88d19c130966a6295d973e0fa7b72ad17","original_commit_id":"3cde88d88d19c130966a6295d973e0fa7b72ad17","user":{"login":"bfbiggs","id":36969382,"node_id":"MDQ6VXNlcjM2OTY5Mzgy","avatar_url":"https://avatars0.githubusercontent.com/u/36969382?v=4","gravatar_id":"","url":"https://api.github.com/users/bfbiggs","html_url":"https://github.com/bfbiggs","followers_url":"https://api.github.com/users/bfbiggs/followers","following_url":"https://api.github.com/users/bfbiggs/following{/other_user}","gists_url":"https://api.github.com/users/bfbiggs/gists{/gist_id}","starred_url":"https://api.github.com/users/bfbiggs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfbiggs/subscriptions","organizations_url":"https://api.github.com/users/bfbiggs/orgs","repos_url":"https://api.github.com/users/bfbiggs/repos","events_url":"https://api.github.com/users/bfbiggs/events{/privacy}","received_events_url":"https://api.github.com/users/bfbiggs/received_events","type":"User","site_admin":false},"body":"tabs","created_at":"2018-11-05T20:33:55Z","updated_at":"2018-11-05T20:34:19Z","html_url":"https://github.com/collab-ui/collab-ui-react/pull/187#discussion_r230901536","pull_request_url":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/187","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/comments/230901536"},"html":{"href":"https://github.com/collab-ui/collab-ui-react/pull/187#discussion_r230901536"},"pull_request":{"href":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/187"}}},"pull_request":{"url":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/187","id":225794443,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1Nzk0NDQz","html_url":"https://github.com/collab-ui/collab-ui-react/pull/187","diff_url":"https://github.com/collab-ui/collab-ui-react/pull/187.diff","patch_url":"https://github.com/collab-ui/collab-ui-react/pull/187.patch","issue_url":"https://api.github.com/repos/collab-ui/collab-ui-react/issues/187","number":187,"state":"open","locked":false,"title":"Content Item fixes","user":{"login":"daanishnasir","id":15917537,"node_id":"MDQ6VXNlcjE1OTE3NTM3","avatar_url":"https://avatars0.githubusercontent.com/u/15917537?v=4","gravatar_id":"","url":"https://api.github.com/users/daanishnasir","html_url":"https://github.com/daanishnasir","followers_url":"https://api.github.com/users/daanishnasir/followers","following_url":"https://api.github.com/users/daanishnasir/following{/other_user}","gists_url":"https://api.github.com/users/daanishnasir/gists{/gist_id}","starred_url":"https://api.github.com/users/daanishnasir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanishnasir/subscriptions","organizations_url":"https://api.github.com/users/daanishnasir/orgs","repos_url":"https://api.github.com/users/daanishnasir/repos","events_url":"https://api.github.com/users/daanishnasir/events{/privacy}","received_events_url":"https://api.github.com/users/daanishnasir/received_events","type":"User","site_admin":false},"body":"**Please check if the PR fulfills these requirements**\r\n- [x] The commit message follows our guidelines: https://github.com/collab-ui/collab-ui-react/blob/master/CONTRIBUTING.md#commit-message-format\r\n- [ ] Tests for the changes have been added (for bug fixes / features)\r\n- [ ] Docs have been added / updated (for bug fixes / features)\r\n\r\n\r\n**What kind of change does this PR introduce?** (check one with \"x\")\r\n- [x] Bugfix\r\n- [x] Feature\r\n- [ ] Documentation update\r\n- [x] Code style update (formatting, local variables)\r\n- [ ] Refactoring (no functional changes, no api changes)\r\n- [ ] Build related changes\r\n- [ ] CI related changes\r\n- [ ] Other... Please describe:\r\n\r\n\r\n**What is the current behavior?** (You can also link to an open issue here)\r\n\r\nhttps://github.com/collab-ui/collab-ui-react/issues/186\r\n\r\n**What is the new behavior?**\r\n\r\n add failedText prop\r\n show subtitle with no extra space when there is no title prop\r\n Image onClick added\r\n pointer cursor on image only when there is a onClick\r\n add native title, text-overflow: ellipsis, nowrap to avoid overlap with title / subtitle\r\n add gifIcon prop - Add gif icon (or any icon) to the top right if content is a gif; using our gif \r\n add loadingText prop\r\n add findAspect function using new width and height props\r\n add onKeyDown for onClick\r\n\r\n**Does this PR introduce a breaking change?** (check one with \"x\")\r\n- [ ] Yes\r\n- [ ] No\r\n\r\n\r\nIf this PR contains a breaking change, please describe the impact and migration path for existing applications: ...\r\n\r\n\r\n**Other information**:\r\n","created_at":"2018-10-25T15:00:02Z","updated_at":"2018-11-05T20:34:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"af6d0f96d0a1e327eed18ac2c39c515fb13bde9c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"elenagiere","id":15151981,"node_id":"MDQ6VXNlcjE1MTUxOTgx","avatar_url":"https://avatars0.githubusercontent.com/u/15151981?v=4","gravatar_id":"","url":"https://api.github.com/users/elenagiere","html_url":"https://github.com/elenagiere","followers_url":"https://api.github.com/users/elenagiere/followers","following_url":"https://api.github.com/users/elenagiere/following{/other_user}","gists_url":"https://api.github.com/users/elenagiere/gists{/gist_id}","starred_url":"https://api.github.com/users/elenagiere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elenagiere/subscriptions","organizations_url":"https://api.github.com/users/elenagiere/orgs","repos_url":"https://api.github.com/users/elenagiere/repos","events_url":"https://api.github.com/users/elenagiere/events{/privacy}","received_events_url":"https://api.github.com/users/elenagiere/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/187/commits","review_comments_url":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/187/comments","review_comment_url":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/collab-ui/collab-ui-react/issues/187/comments","statuses_url":"https://api.github.com/repos/collab-ui/collab-ui-react/statuses/3cde88d88d19c130966a6295d973e0fa7b72ad17","head":{"label":"daanishnasir:ContentItemFixes","ref":"ContentItemFixes","sha":"3cde88d88d19c130966a6295d973e0fa7b72ad17","user":{"login":"daanishnasir","id":15917537,"node_id":"MDQ6VXNlcjE1OTE3NTM3","avatar_url":"https://avatars0.githubusercontent.com/u/15917537?v=4","gravatar_id":"","url":"https://api.github.com/users/daanishnasir","html_url":"https://github.com/daanishnasir","followers_url":"https://api.github.com/users/daanishnasir/followers","following_url":"https://api.github.com/users/daanishnasir/following{/other_user}","gists_url":"https://api.github.com/users/daanishnasir/gists{/gist_id}","starred_url":"https://api.github.com/users/daanishnasir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanishnasir/subscriptions","organizations_url":"https://api.github.com/users/daanishnasir/orgs","repos_url":"https://api.github.com/users/daanishnasir/repos","events_url":"https://api.github.com/users/daanishnasir/events{/privacy}","received_events_url":"https://api.github.com/users/daanishnasir/received_events","type":"User","site_admin":false},"repo":{"id":143443392,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM0NDMzOTI=","name":"collab-ui-react","full_name":"daanishnasir/collab-ui-react","private":false,"owner":{"login":"daanishnasir","id":15917537,"node_id":"MDQ6VXNlcjE1OTE3NTM3","avatar_url":"https://avatars0.githubusercontent.com/u/15917537?v=4","gravatar_id":"","url":"https://api.github.com/users/daanishnasir","html_url":"https://github.com/daanishnasir","followers_url":"https://api.github.com/users/daanishnasir/followers","following_url":"https://api.github.com/users/daanishnasir/following{/other_user}","gists_url":"https://api.github.com/users/daanishnasir/gists{/gist_id}","starred_url":"https://api.github.com/users/daanishnasir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daanishnasir/subscriptions","organizations_url":"https://api.github.com/users/daanishnasir/orgs","repos_url":"https://api.github.com/users/daanishnasir/repos","events_url":"https://api.github.com/users/daanishnasir/events{/privacy}","received_events_url":"https://api.github.com/users/daanishnasir/received_events","type":"User","site_admin":false},"html_url":"https://github.com/daanishnasir/collab-ui-react","description":"Cisco Collab UI framework for ReactJs applications","fork":true,"url":"https://api.github.com/repos/daanishnasir/collab-ui-react","forks_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/forks","keys_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/teams","hooks_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/hooks","issue_events_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/issues/events{/number}","events_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/events","assignees_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/assignees{/user}","branches_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/branches{/branch}","tags_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/tags","blobs_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/git/refs{/sha}","trees_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/statuses/{sha}","languages_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/languages","stargazers_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/stargazers","contributors_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/contributors","subscribers_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/subscribers","subscription_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/subscription","commits_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/commits{/sha}","git_commits_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/git/commits{/sha}","comments_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/comments{/number}","issue_comment_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/issues/comments{/number}","contents_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/contents/{+path}","compare_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/merges","archive_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/downloads","issues_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/issues{/number}","pulls_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/pulls{/number}","milestones_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/milestones{/number}","notifications_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/labels{/name}","releases_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/releases{/id}","deployments_url":"https://api.github.com/repos/daanishnasir/collab-ui-react/deployments","created_at":"2018-08-03T15:23:00Z","updated_at":"2018-08-06T16:19:25Z","pushed_at":"2018-11-05T14:56:31Z","git_url":"git://github.com/daanishnasir/collab-ui-react.git","ssh_url":"git@github.com:daanishnasir/collab-ui-react.git","clone_url":"https://github.com/daanishnasir/collab-ui-react.git","svn_url":"https://github.com/daanishnasir/collab-ui-react","homepage":null,"size":6603,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"collab-ui:master","ref":"master","sha":"65211d4df8a2bc858b28936b602c8f92f68e615e","user":{"login":"collab-ui","id":19691026,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NjkxMDI2","avatar_url":"https://avatars3.githubusercontent.com/u/19691026?v=4","gravatar_id":"","url":"https://api.github.com/users/collab-ui","html_url":"https://github.com/collab-ui","followers_url":"https://api.github.com/users/collab-ui/followers","following_url":"https://api.github.com/users/collab-ui/following{/other_user}","gists_url":"https://api.github.com/users/collab-ui/gists{/gist_id}","starred_url":"https://api.github.com/users/collab-ui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collab-ui/subscriptions","organizations_url":"https://api.github.com/users/collab-ui/orgs","repos_url":"https://api.github.com/users/collab-ui/repos","events_url":"https://api.github.com/users/collab-ui/events{/privacy}","received_events_url":"https://api.github.com/users/collab-ui/received_events","type":"Organization","site_admin":false},"repo":{"id":131100723,"node_id":"MDEwOlJlcG9zaXRvcnkxMzExMDA3MjM=","name":"collab-ui-react","full_name":"collab-ui/collab-ui-react","private":false,"owner":{"login":"collab-ui","id":19691026,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NjkxMDI2","avatar_url":"https://avatars3.githubusercontent.com/u/19691026?v=4","gravatar_id":"","url":"https://api.github.com/users/collab-ui","html_url":"https://github.com/collab-ui","followers_url":"https://api.github.com/users/collab-ui/followers","following_url":"https://api.github.com/users/collab-ui/following{/other_user}","gists_url":"https://api.github.com/users/collab-ui/gists{/gist_id}","starred_url":"https://api.github.com/users/collab-ui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collab-ui/subscriptions","organizations_url":"https://api.github.com/users/collab-ui/orgs","repos_url":"https://api.github.com/users/collab-ui/repos","events_url":"https://api.github.com/users/collab-ui/events{/privacy}","received_events_url":"https://api.github.com/users/collab-ui/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/collab-ui/collab-ui-react","description":"Cisco Collab UI framework for ReactJs applications","fork":false,"url":"https://api.github.com/repos/collab-ui/collab-ui-react","forks_url":"https://api.github.com/repos/collab-ui/collab-ui-react/forks","keys_url":"https://api.github.com/repos/collab-ui/collab-ui-react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/collab-ui/collab-ui-react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/collab-ui/collab-ui-react/teams","hooks_url":"https://api.github.com/repos/collab-ui/collab-ui-react/hooks","issue_events_url":"https://api.github.com/repos/collab-ui/collab-ui-react/issues/events{/number}","events_url":"https://api.github.com/repos/collab-ui/collab-ui-react/events","assignees_url":"https://api.github.com/repos/collab-ui/collab-ui-react/assignees{/user}","branches_url":"https://api.github.com/repos/collab-ui/collab-ui-react/branches{/branch}","tags_url":"https://api.github.com/repos/collab-ui/collab-ui-react/tags","blobs_url":"https://api.github.com/repos/collab-ui/collab-ui-react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/collab-ui/collab-ui-react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/collab-ui/collab-ui-react/git/refs{/sha}","trees_url":"https://api.github.com/repos/collab-ui/collab-ui-react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/collab-ui/collab-ui-react/statuses/{sha}","languages_url":"https://api.github.com/repos/collab-ui/collab-ui-react/languages","stargazers_url":"https://api.github.com/repos/collab-ui/collab-ui-react/stargazers","contributors_url":"https://api.github.com/repos/collab-ui/collab-ui-react/contributors","subscribers_url":"https://api.github.com/repos/collab-ui/collab-ui-react/subscribers","subscription_url":"https://api.github.com/repos/collab-ui/collab-ui-react/subscription","commits_url":"https://api.github.com/repos/collab-ui/collab-ui-react/commits{/sha}","git_commits_url":"https://api.github.com/repos/collab-ui/collab-ui-react/git/commits{/sha}","comments_url":"https://api.github.com/repos/collab-ui/collab-ui-react/comments{/number}","issue_comment_url":"https://api.github.com/repos/collab-ui/collab-ui-react/issues/comments{/number}","contents_url":"https://api.github.com/repos/collab-ui/collab-ui-react/contents/{+path}","compare_url":"https://api.github.com/repos/collab-ui/collab-ui-react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/collab-ui/collab-ui-react/merges","archive_url":"https://api.github.com/repos/collab-ui/collab-ui-react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/collab-ui/collab-ui-react/downloads","issues_url":"https://api.github.com/repos/collab-ui/collab-ui-react/issues{/number}","pulls_url":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls{/number}","milestones_url":"https://api.github.com/repos/collab-ui/collab-ui-react/milestones{/number}","notifications_url":"https://api.github.com/repos/collab-ui/collab-ui-react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/collab-ui/collab-ui-react/labels{/name}","releases_url":"https://api.github.com/repos/collab-ui/collab-ui-react/releases{/id}","deployments_url":"https://api.github.com/repos/collab-ui/collab-ui-react/deployments","created_at":"2018-04-26T04:39:17Z","updated_at":"2018-11-02T05:33:47Z","pushed_at":"2018-11-05T18:51:58Z","git_url":"git://github.com/collab-ui/collab-ui-react.git","ssh_url":"git@github.com:collab-ui/collab-ui-react.git","clone_url":"https://github.com/collab-ui/collab-ui-react.git","svn_url":"https://github.com/collab-ui/collab-ui-react","homepage":null,"size":122234,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":32,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":32,"open_issues":9,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/187"},"html":{"href":"https://github.com/collab-ui/collab-ui-react/pull/187"},"issue":{"href":"https://api.github.com/repos/collab-ui/collab-ui-react/issues/187"},"comments":{"href":"https://api.github.com/repos/collab-ui/collab-ui-react/issues/187/comments"},"review_comments":{"href":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/187/comments"},"review_comment":{"href":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/collab-ui/collab-ui-react/pulls/187/commits"},"statuses":{"href":"https://api.github.com/repos/collab-ui/collab-ui-react/statuses/3cde88d88d19c130966a6295d973e0fa7b72ad17"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bfbiggs"}}