{"action":"created","comment":{"url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/comments/210255530","pull_request_review_id":146429553,"id":210255530,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDI1NTUzMA==","diff_hunk":"@@ -0,0 +1,96 @@\n+import React from 'react'\n+import { ThemeProvider } from './ThemeProvider'\n+import { Theme, themes } from './themes'\n+\n+type ThemeName = 'light' | 'dark'\n+\n+interface ThemeSelector {\n+  name?: ThemeName\n+  /**\n+   * An unused property — this parallel approach would support\n+   * custom branding on child components — assuming they\n+   * subscribe to the struture of our Theme type\n+   *\n+   * @evanrs (8/14/18)\n+   */\n+  theme?: Theme\n+}\n+\n+interface ThemeStateProps extends ThemeSelector {\n+  onChange?: (value: ThemeSelector) => void\n+}\n+\n+export interface ThemeStateValue extends ThemeSelector {\n+  setTheme: (options: ThemeSelector) => void\n+}\n+\n+const { Provider: ContextProvider, Consumer: ContextConsumer } = React.createContext(null)\n+\n+/**\n+ * Set default theme and allow descendants to update selected theme.\n+ *\n+ * @example\n+ *  <ThemeState name={light | dark} onChange={this.handleThemeChange} />\n+ */\n+class ThemeStateProvider extends React.Component<ThemeStateProps> {\n+  render() {\n+    return <ContextConsumer children={this.renderThemeStateManager} />\n+  }\n+\n+  renderThemeStateManager = (context: ThemeStateValue | null) => {\n+    return <ThemeStateManager context={context} {...this.props} />\n+  }\n+}\n+\n+class ThemeStateManager extends React.Component<ThemeStateProps & { context: ThemeStateValue }, ThemeStateValue> {\n+  static getDerivedStateFromProps(props, state) {","path":"src/client/src/rt-theme/ThemeState.tsx","position":46,"original_position":46,"commit_id":"ad7552424b2b8a0b247ad2b8e2b2fd98119fb62f","original_commit_id":"ad7552424b2b8a0b247ad2b8e2b2fd98119fb62f","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":"Type these","created_at":"2018-08-15T12:43:58Z","updated_at":"2018-08-15T12:46:23Z","html_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/787#discussion_r210255530","pull_request_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/787","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/comments/210255530"},"html":{"href":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/787#discussion_r210255530"},"pull_request":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/787"}}},"pull_request":{"url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/787","id":208399148,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4Mzk5MTQ4","html_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/787","diff_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/787.diff","patch_url":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/787.patch","issue_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/787","number":787,"state":"open","locked":false,"title":"[ARTP-185] Move theme management to rt-theme","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-08-14T20:22:30Z","updated_at":"2018-08-15T12:46:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5047ff23605c54831c2ca9262fbac2060883ff8f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/787/commits","review_comments_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/787/comments","review_comment_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/787/comments","statuses_url":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/statuses/ad7552424b2b8a0b247ad2b8e2b2fd98119fb62f","head":{"label":"AdaptiveConsulting:ARTP-185/add-theme-manager-to-rt-theme","ref":"ARTP-185/add-theme-manager-to-rt-theme","sha":"ad7552424b2b8a0b247ad2b8e2b2fd98119fb62f","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","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},"private":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-08-15T06:01:27Z","pushed_at":"2018-08-15T08:57:37Z","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":16833,"stargazers_count":947,"watchers_count":947,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":278,"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":278,"open_issues":33,"watchers":947,"default_branch":"master"}},"base":{"label":"AdaptiveConsulting:story/theming","ref":"story/theming","sha":"a57dc0f96159f8e057e14e50c2f302c604f11a83","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","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},"private":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-08-15T06:01:27Z","pushed_at":"2018-08-15T08:57:37Z","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":16833,"stargazers_count":947,"watchers_count":947,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":278,"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":278,"open_issues":33,"watchers":947,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/787"},"html":{"href":"https://github.com/AdaptiveConsulting/ReactiveTraderCloud/pull/787"},"issue":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/787"},"comments":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/issues/787/comments"},"review_comments":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/787/comments"},"review_comment":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/pulls/787/commits"},"statuses":{"href":"https://api.github.com/repos/AdaptiveConsulting/ReactiveTraderCloud/statuses/ad7552424b2b8a0b247ad2b8e2b2fd98119fb62f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"keshaldesai"}}