{"action":"created","comment":{"url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/comments/231552695","pull_request_review_id":172547320,"id":231552695,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTU1MjY5NQ==","diff_hunk":"@@ -0,0 +1,229 @@\n+import _ from 'lodash'\n+import React, { Component } from 'react'\n+\n+export interface Props {\n+  gap: number\n+  height: number\n+  width: number\n+  count?: number\n+  scale?: number\n+  radius?: number\n+  analyser?: AnalyserNode\n+  color?: (magnitude: number) => string | any\n+}\n+\n+interface State {\n+  grid: {\n+    width: number\n+    height: number\n+    gap: number\n+    style: {\n+      width: string\n+      height: string\n+    }\n+  }\n+  bar: {\n+    width: number\n+    height: number\n+    radius: number\n+    count: number\n+  }\n+  data: Float32Array\n+}\n+\n+class FormantBars extends Component<Props, Partial<State>> {\n+  state: Partial<State> = {\n+    data: new Float32Array(),\n+  }\n+\n+  static defaultProps = {\n+    gap: 2,\n+    width: 4,\n+    height: 32,\n+    radius: 2,\n+    count: 8,\n+    scale: 2,\n+  }\n+\n+  static getDerivedStateFromProps({ analyser, count, scale, width, height, radius, gap }: Props, { data, bar }: State) {\n+    let state = null\n+\n+    if (analyser.frequencyBinCount !== data.length) {\n+      state = {\n+        ...(state as any),\n+        data: new Float32Array(analyser.frequencyBinCount),\n+      }\n+    }\n+\n+    if (bar == null) {\n+      ;[width, height, radius, gap] = [width, height, radius, gap].map(v => v * scale)\n+\n+      state = {\n+        ...state,\n+\n+        grid: {\n+          width: (width + gap) * count - gap,\n+          height,\n+          gap,\n+          style: {\n+            width: `${_.round((width / scale + gap / scale) * count - gap / scale)}px`,\n+            height: `${height / scale}px`,\n+          },\n+        },\n+\n+        bar: {\n+          width,\n+          height,\n+          radius,\n+          count,\n+        },\n+      }\n+    }\n+\n+    return state\n+  }\n+\n+  canvas: any\n+  canvasScale = 2\n+  frameID: any","path":"src/client/src/routes/OrderTicketRoute/FormantBars.tsx","position":88,"original_position":88,"commit_id":"9d37026e0aa3bb0d02bd889b3e343b6c117653b3","original_commit_id":"9d37026e0aa3bb0d02bd889b3e343b6c117653b3","user":{"login":"keshaldesai","id":32776407,"node_id":"MDQ6VXNlcjMyNzc2NDA3","avatar_url":"https://avatars1.githubusercontent.com/u/32776407?v=4","gravatar_id":"","url":"https://api.github.com/users/keshaldesai","html_url":"https://github.com/keshaldesai","followers_url":"https://api.github.com/users/keshaldesai/followers","following_url":"https://api.github.com/users/keshaldesai/following{/other_user}","gists_url":"https://api.github.com/users/keshaldesai/gists{/gist_id}","starred_url":"https://api.github.com/users/keshaldesai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keshaldesai/subscriptions","organizations_url":"https://api.github.com/users/keshaldesai/orgs","repos_url":"https://api.github.com/users/keshaldesai/repos","events_url":"https://api.github.com/users/keshaldesai/events{/privacy}","received_events_url":"https://api.github.com/users/keshaldesai/received_events","type":"User","site_admin":false},"body":"Is it possible to get types for these?","created_at":"2018-11-07T15:32:19Z","updated_at":"2018-11-07T15:32:19Z","html_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/882#discussion_r231552695","pull_request_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/882","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/comments/231552695"},"html":{"href":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/882#discussion_r231552695"},"pull_request":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/882"}}},"pull_request":{"url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/882","id":226944121,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2OTQ0MTIx","html_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/882","diff_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/882.diff","patch_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/882.patch","issue_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/882","number":882,"state":"open","locked":false,"title":"Implement order ticket with voice recognition.","user":{"login":"evanrs","id":297455,"node_id":"MDQ6VXNlcjI5NzQ1NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/297455?v=4","gravatar_id":"","url":"https://api.github.com/users/evanrs","html_url":"https://github.com/evanrs","followers_url":"https://api.github.com/users/evanrs/followers","following_url":"https://api.github.com/users/evanrs/following{/other_user}","gists_url":"https://api.github.com/users/evanrs/gists{/gist_id}","starred_url":"https://api.github.com/users/evanrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evanrs/subscriptions","organizations_url":"https://api.github.com/users/evanrs/orgs","repos_url":"https://api.github.com/users/evanrs/repos","events_url":"https://api.github.com/users/evanrs/events{/privacy}","received_events_url":"https://api.github.com/users/evanrs/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-10-30T14:26:44Z","updated_at":"2018-11-07T15:32:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4c6f0685a98e365f0f195a470920719a9690eba","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/882/commits","review_comments_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/882/comments","review_comment_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/882/comments","statuses_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/statuses/9d37026e0aa3bb0d02bd889b3e343b6c117653b3","head":{"label":"AdaptiveConsulting:order-ticket","ref":"order-ticket","sha":"9d37026e0aa3bb0d02bd889b3e343b6c117653b3","user":{"login":"AdaptiveConsulting","id":3510823,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MTA4MjM=","avatar_url":"https://avatars1.githubusercontent.com/u/3510823?v=4","gravatar_id":"","url":"https://api.github.com/users/AdaptiveConsulting","html_url":"https://github.com/AdaptiveConsulting","followers_url":"https://api.github.com/users/AdaptiveConsulting/followers","following_url":"https://api.github.com/users/AdaptiveConsulting/following{/other_user}","gists_url":"https://api.github.com/users/AdaptiveConsulting/gists{/gist_id}","starred_url":"https://api.github.com/users/AdaptiveConsulting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdaptiveConsulting/subscriptions","organizations_url":"https://api.github.com/users/AdaptiveConsulting/orgs","repos_url":"https://api.github.com/users/AdaptiveConsulting/repos","events_url":"https://api.github.com/users/AdaptiveConsulting/events{/privacy}","received_events_url":"https://api.github.com/users/AdaptiveConsulting/received_events","type":"Organization","site_admin":false},"repo":{"id":46142401,"node_id":"MDEwOlJlcG9zaXRvcnk0NjE0MjQwMQ==","name":"ReactiveTraderCloud","full_name":"AdaptiveConsulting/ReactiveTraderCloud","private":false,"owner":{"login":"AdaptiveConsulting","id":3510823,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MTA4MjM=","avatar_url":"https://avatars1.githubusercontent.com/u/3510823?v=4","gravatar_id":"","url":"https://api.github.com/users/AdaptiveConsulting","html_url":"https://github.com/AdaptiveConsulting","followers_url":"https://api.github.com/users/AdaptiveConsulting/followers","following_url":"https://api.github.com/users/AdaptiveConsulting/following{/other_user}","gists_url":"https://api.github.com/users/AdaptiveConsulting/gists{/gist_id}","starred_url":"https://api.github.com/users/AdaptiveConsulting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdaptiveConsulting/subscriptions","organizations_url":"https://api.github.com/users/AdaptiveConsulting/orgs","repos_url":"https://api.github.com/users/AdaptiveConsulting/repos","events_url":"https://api.github.com/users/AdaptiveConsulting/events{/privacy}","received_events_url":"https://api.github.com/users/AdaptiveConsulting/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud","description":"Real-time trading platform demo showcasing reactive programming principles applied across the full application stack.","fork":false,"url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud","forks_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/forks","keys_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/teams","hooks_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/hooks","issue_events_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/events{/number}","events_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/events","assignees_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/assignees{/user}","branches_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/branches{/branch}","tags_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/tags","blobs_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/statuses/{sha}","languages_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/languages","stargazers_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/stargazers","contributors_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/contributors","subscribers_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/subscribers","subscription_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/subscription","commits_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/contents/{+path}","compare_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/merges","archive_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/downloads","issues_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues{/number}","pulls_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls{/number}","milestones_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/milestones{/number}","notifications_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/labels{/name}","releases_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/releases{/id}","deployments_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/deployments","created_at":"2015-11-13T19:24:11Z","updated_at":"2018-11-04T13:49:36Z","pushed_at":"2018-11-05T19:09:12Z","git_url":"git://github.com/AdaptiveConsulting/ReactiveTraderCloud.git","ssh_url":"git@github.com:AdaptiveConsulting/ReactiveTraderCloud.git","clone_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud.git","svn_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud","homepage":"","size":21766,"stargazers_count":1000,"watchers_count":1000,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":291,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":291,"open_issues":33,"watchers":1000,"default_branch":"develop"}},"base":{"label":"AdaptiveConsulting:develop","ref":"develop","sha":"21d6a32d2cba16e8dd065e8f51a1acc36c4e1659","user":{"login":"AdaptiveConsulting","id":3510823,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MTA4MjM=","avatar_url":"https://avatars1.githubusercontent.com/u/3510823?v=4","gravatar_id":"","url":"https://api.github.com/users/AdaptiveConsulting","html_url":"https://github.com/AdaptiveConsulting","followers_url":"https://api.github.com/users/AdaptiveConsulting/followers","following_url":"https://api.github.com/users/AdaptiveConsulting/following{/other_user}","gists_url":"https://api.github.com/users/AdaptiveConsulting/gists{/gist_id}","starred_url":"https://api.github.com/users/AdaptiveConsulting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdaptiveConsulting/subscriptions","organizations_url":"https://api.github.com/users/AdaptiveConsulting/orgs","repos_url":"https://api.github.com/users/AdaptiveConsulting/repos","events_url":"https://api.github.com/users/AdaptiveConsulting/events{/privacy}","received_events_url":"https://api.github.com/users/AdaptiveConsulting/received_events","type":"Organization","site_admin":false},"repo":{"id":46142401,"node_id":"MDEwOlJlcG9zaXRvcnk0NjE0MjQwMQ==","name":"ReactiveTraderCloud","full_name":"AdaptiveConsulting/ReactiveTraderCloud","private":false,"owner":{"login":"AdaptiveConsulting","id":3510823,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MTA4MjM=","avatar_url":"https://avatars1.githubusercontent.com/u/3510823?v=4","gravatar_id":"","url":"https://api.github.com/users/AdaptiveConsulting","html_url":"https://github.com/AdaptiveConsulting","followers_url":"https://api.github.com/users/AdaptiveConsulting/followers","following_url":"https://api.github.com/users/AdaptiveConsulting/following{/other_user}","gists_url":"https://api.github.com/users/AdaptiveConsulting/gists{/gist_id}","starred_url":"https://api.github.com/users/AdaptiveConsulting/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdaptiveConsulting/subscriptions","organizations_url":"https://api.github.com/users/AdaptiveConsulting/orgs","repos_url":"https://api.github.com/users/AdaptiveConsulting/repos","events_url":"https://api.github.com/users/AdaptiveConsulting/events{/privacy}","received_events_url":"https://api.github.com/users/AdaptiveConsulting/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud","description":"Real-time trading platform demo showcasing reactive programming principles applied across the full application stack.","fork":false,"url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud","forks_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/forks","keys_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/teams","hooks_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/hooks","issue_events_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/events{/number}","events_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/events","assignees_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/assignees{/user}","branches_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/branches{/branch}","tags_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/tags","blobs_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/git/refs{/sha}","trees_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/statuses/{sha}","languages_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/languages","stargazers_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/stargazers","contributors_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/contributors","subscribers_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/subscribers","subscription_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/subscription","commits_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/commits{/sha}","git_commits_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/git/commits{/sha}","comments_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/comments{/number}","issue_comment_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/comments{/number}","contents_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/contents/{+path}","compare_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/merges","archive_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/downloads","issues_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues{/number}","pulls_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls{/number}","milestones_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/milestones{/number}","notifications_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/labels{/name}","releases_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/releases{/id}","deployments_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/deployments","created_at":"2015-11-13T19:24:11Z","updated_at":"2018-11-04T13:49:36Z","pushed_at":"2018-11-05T19:09:12Z","git_url":"git://github.com/AdaptiveConsulting/ReactiveTraderCloud.git","ssh_url":"git@github.com:AdaptiveConsulting/ReactiveTraderCloud.git","clone_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud.git","svn_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud","homepage":"","size":21766,"stargazers_count":1000,"watchers_count":1000,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":291,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":291,"open_issues":33,"watchers":1000,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/882"},"html":{"href":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/882"},"issue":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/882"},"comments":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/882/comments"},"review_comments":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/882/comments"},"review_comment":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/882/commits"},"statuses":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/statuses/9d37026e0aa3bb0d02bd889b3e343b6c117653b3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"keshaldesai"}}