{"action":"created","comment":{"url":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/comments/87066377","pull_request_review_id":7693543,"id":87066377,"diff_hunk":"@@ -0,0 +1,175 @@\n+const React = require('react');\n+const ReactDOM = require('react-dom');\n+const Radium = require('radium');\n+const _merge = require('lodash/merge');\n+\n+const StyleConstants = require('../constants/Style');\n+\n+const SimpleSlider = React.createClass({\n+  propTypes: {\n+    disabled: React.PropTypes.bool,\n+    onPercentChange: React.PropTypes.func.isRequired,\n+    percent: React.PropTypes.number.isRequired,\n+    selectedColor: React.PropTypes.string,\n+    styles: React.PropTypes.object\n+  },\n+\n+  getDefaultProps () {\n+    return {\n+      selectedColor: StyleConstants.Colors.PRIMARY\n+    };\n+  },\n+\n+  getInitialState () {\n+    return {\n+      dragging: false,\n+      leftPixels: 0\n+    };\n+  },\n+\n+  componentDidMount () {\n+    this._setDefaults();\n+  },\n+\n+  componentWillReceiveProps (newProps) {\n+    const leftPixels = (newProps.percent * this.state.width);\n+\n+    this.setState({ leftPixels });\n+  },\n+\n+  _setDefaults () {\n+    const component = ReactDOM.findDOMNode(this.rangeSelectorRef);\n+    const componentStyles = window.getComputedStyle(component);\n+    const width = parseInt(componentStyles.width, 0);\n+    const leftPixels = this.props.percent * width;\n+\n+    this.setState({ width, leftPixels });","path":"src/components/SimpleSlider.js","position":47,"original_position":46,"commit_id":"806307a63b06196d69fe2e3eeabaa05888d2f1ca","original_commit_id":"4da5d80fa1fc7314a1e31f4a5edcd55a219f29c3","user":{"login":"redperk","id":6424668,"avatar_url":"https://avatars.githubusercontent.com/u/6424668?v=3","gravatar_id":"","url":"https://api.github.com/users/redperk","html_url":"https://github.com/redperk","followers_url":"https://api.github.com/users/redperk/followers","following_url":"https://api.github.com/users/redperk/following{/other_user}","gists_url":"https://api.github.com/users/redperk/gists{/gist_id}","starred_url":"https://api.github.com/users/redperk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redperk/subscriptions","organizations_url":"https://api.github.com/users/redperk/orgs","repos_url":"https://api.github.com/users/redperk/repos","events_url":"https://api.github.com/users/redperk/events{/privacy}","received_events_url":"https://api.github.com/users/redperk/received_events","type":"User","site_admin":false},"body":"@tumentumurchudur Does that look better?","created_at":"2016-11-08T19:35:33Z","updated_at":"2016-11-08T19:35:33Z","html_url":"https://github.com/mxenabled/mx-react-components/pull/466#discussion_r87066377","pull_request_url":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/466","_links":{"self":{"href":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/comments/87066377"},"html":{"href":"https://github.com/mxenabled/mx-react-components/pull/466#discussion_r87066377"},"pull_request":{"href":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/466"}}},"pull_request":{"url":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/466","id":92661130,"html_url":"https://github.com/mxenabled/mx-react-components/pull/466","diff_url":"https://github.com/mxenabled/mx-react-components/pull/466.diff","patch_url":"https://github.com/mxenabled/mx-react-components/pull/466.patch","issue_url":"https://api.github.com/repos/mxenabled/mx-react-components/issues/466","number":466,"state":"open","locked":false,"title":"Fancy new slider component","user":{"login":"redperk","id":6424668,"avatar_url":"https://avatars.githubusercontent.com/u/6424668?v=3","gravatar_id":"","url":"https://api.github.com/users/redperk","html_url":"https://github.com/redperk","followers_url":"https://api.github.com/users/redperk/followers","following_url":"https://api.github.com/users/redperk/following{/other_user}","gists_url":"https://api.github.com/users/redperk/gists{/gist_id}","starred_url":"https://api.github.com/users/redperk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redperk/subscriptions","organizations_url":"https://api.github.com/users/redperk/orgs","repos_url":"https://api.github.com/users/redperk/repos","events_url":"https://api.github.com/users/redperk/events{/privacy}","received_events_url":"https://api.github.com/users/redperk/received_events","type":"User","site_admin":false},"body":"This PR adds a new slider component and docs to our OS components.\r\n\r\n![ezgif com-video-to-gif 7](https://cloud.githubusercontent.com/assets/6424668/20075321/002736b0-a4f1-11e6-80d4-c39ef0f5b106.gif)\r\n","created_at":"2016-11-07T20:49:47Z","updated_at":"2016-11-08T19:35:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9cf50a6ef3c3884bb36b56d97f6bf3fc60ccbdd6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/466/commits","review_comments_url":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/466/comments","review_comment_url":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mxenabled/mx-react-components/issues/466/comments","statuses_url":"https://api.github.com/repos/mxenabled/mx-react-components/statuses/806307a63b06196d69fe2e3eeabaa05888d2f1ca","head":{"label":"mxenabled:perkins/new_slider_component","ref":"perkins/new_slider_component","sha":"806307a63b06196d69fe2e3eeabaa05888d2f1ca","user":{"login":"mxenabled","id":991323,"avatar_url":"https://avatars.githubusercontent.com/u/991323?v=3","gravatar_id":"","url":"https://api.github.com/users/mxenabled","html_url":"https://github.com/mxenabled","followers_url":"https://api.github.com/users/mxenabled/followers","following_url":"https://api.github.com/users/mxenabled/following{/other_user}","gists_url":"https://api.github.com/users/mxenabled/gists{/gist_id}","starred_url":"https://api.github.com/users/mxenabled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxenabled/subscriptions","organizations_url":"https://api.github.com/users/mxenabled/orgs","repos_url":"https://api.github.com/users/mxenabled/repos","events_url":"https://api.github.com/users/mxenabled/events{/privacy}","received_events_url":"https://api.github.com/users/mxenabled/received_events","type":"Organization","site_admin":false},"repo":{"id":41570643,"name":"mx-react-components","full_name":"mxenabled/mx-react-components","owner":{"login":"mxenabled","id":991323,"avatar_url":"https://avatars.githubusercontent.com/u/991323?v=3","gravatar_id":"","url":"https://api.github.com/users/mxenabled","html_url":"https://github.com/mxenabled","followers_url":"https://api.github.com/users/mxenabled/followers","following_url":"https://api.github.com/users/mxenabled/following{/other_user}","gists_url":"https://api.github.com/users/mxenabled/gists{/gist_id}","starred_url":"https://api.github.com/users/mxenabled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxenabled/subscriptions","organizations_url":"https://api.github.com/users/mxenabled/orgs","repos_url":"https://api.github.com/users/mxenabled/repos","events_url":"https://api.github.com/users/mxenabled/events{/privacy}","received_events_url":"https://api.github.com/users/mxenabled/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mxenabled/mx-react-components","description":"A library of generic React components used at MX","fork":false,"url":"https://api.github.com/repos/mxenabled/mx-react-components","forks_url":"https://api.github.com/repos/mxenabled/mx-react-components/forks","keys_url":"https://api.github.com/repos/mxenabled/mx-react-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mxenabled/mx-react-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mxenabled/mx-react-components/teams","hooks_url":"https://api.github.com/repos/mxenabled/mx-react-components/hooks","issue_events_url":"https://api.github.com/repos/mxenabled/mx-react-components/issues/events{/number}","events_url":"https://api.github.com/repos/mxenabled/mx-react-components/events","assignees_url":"https://api.github.com/repos/mxenabled/mx-react-components/assignees{/user}","branches_url":"https://api.github.com/repos/mxenabled/mx-react-components/branches{/branch}","tags_url":"https://api.github.com/repos/mxenabled/mx-react-components/tags","blobs_url":"https://api.github.com/repos/mxenabled/mx-react-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mxenabled/mx-react-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mxenabled/mx-react-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/mxenabled/mx-react-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mxenabled/mx-react-components/statuses/{sha}","languages_url":"https://api.github.com/repos/mxenabled/mx-react-components/languages","stargazers_url":"https://api.github.com/repos/mxenabled/mx-react-components/stargazers","contributors_url":"https://api.github.com/repos/mxenabled/mx-react-components/contributors","subscribers_url":"https://api.github.com/repos/mxenabled/mx-react-components/subscribers","subscription_url":"https://api.github.com/repos/mxenabled/mx-react-components/subscription","commits_url":"https://api.github.com/repos/mxenabled/mx-react-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/mxenabled/mx-react-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/mxenabled/mx-react-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/mxenabled/mx-react-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/mxenabled/mx-react-components/contents/{+path}","compare_url":"https://api.github.com/repos/mxenabled/mx-react-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mxenabled/mx-react-components/merges","archive_url":"https://api.github.com/repos/mxenabled/mx-react-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mxenabled/mx-react-components/downloads","issues_url":"https://api.github.com/repos/mxenabled/mx-react-components/issues{/number}","pulls_url":"https://api.github.com/repos/mxenabled/mx-react-components/pulls{/number}","milestones_url":"https://api.github.com/repos/mxenabled/mx-react-components/milestones{/number}","notifications_url":"https://api.github.com/repos/mxenabled/mx-react-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mxenabled/mx-react-components/labels{/name}","releases_url":"https://api.github.com/repos/mxenabled/mx-react-components/releases{/id}","deployments_url":"https://api.github.com/repos/mxenabled/mx-react-components/deployments","created_at":"2015-08-28T21:47:32Z","updated_at":"2016-10-26T15:41:06Z","pushed_at":"2016-11-08T19:35:15Z","git_url":"git://github.com/mxenabled/mx-react-components.git","ssh_url":"git@github.com:mxenabled/mx-react-components.git","clone_url":"https://github.com/mxenabled/mx-react-components.git","svn_url":"https://github.com/mxenabled/mx-react-components","homepage":null,"size":23898,"stargazers_count":34,"watchers_count":34,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":48,"mirror_url":null,"open_issues_count":12,"forks":48,"open_issues":12,"watchers":34,"default_branch":"master"}},"base":{"label":"mxenabled:master","ref":"master","sha":"c61a4aeeaf2d2ac988a57417e759136a8cc3843d","user":{"login":"mxenabled","id":991323,"avatar_url":"https://avatars.githubusercontent.com/u/991323?v=3","gravatar_id":"","url":"https://api.github.com/users/mxenabled","html_url":"https://github.com/mxenabled","followers_url":"https://api.github.com/users/mxenabled/followers","following_url":"https://api.github.com/users/mxenabled/following{/other_user}","gists_url":"https://api.github.com/users/mxenabled/gists{/gist_id}","starred_url":"https://api.github.com/users/mxenabled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxenabled/subscriptions","organizations_url":"https://api.github.com/users/mxenabled/orgs","repos_url":"https://api.github.com/users/mxenabled/repos","events_url":"https://api.github.com/users/mxenabled/events{/privacy}","received_events_url":"https://api.github.com/users/mxenabled/received_events","type":"Organization","site_admin":false},"repo":{"id":41570643,"name":"mx-react-components","full_name":"mxenabled/mx-react-components","owner":{"login":"mxenabled","id":991323,"avatar_url":"https://avatars.githubusercontent.com/u/991323?v=3","gravatar_id":"","url":"https://api.github.com/users/mxenabled","html_url":"https://github.com/mxenabled","followers_url":"https://api.github.com/users/mxenabled/followers","following_url":"https://api.github.com/users/mxenabled/following{/other_user}","gists_url":"https://api.github.com/users/mxenabled/gists{/gist_id}","starred_url":"https://api.github.com/users/mxenabled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxenabled/subscriptions","organizations_url":"https://api.github.com/users/mxenabled/orgs","repos_url":"https://api.github.com/users/mxenabled/repos","events_url":"https://api.github.com/users/mxenabled/events{/privacy}","received_events_url":"https://api.github.com/users/mxenabled/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mxenabled/mx-react-components","description":"A library of generic React components used at MX","fork":false,"url":"https://api.github.com/repos/mxenabled/mx-react-components","forks_url":"https://api.github.com/repos/mxenabled/mx-react-components/forks","keys_url":"https://api.github.com/repos/mxenabled/mx-react-components/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mxenabled/mx-react-components/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mxenabled/mx-react-components/teams","hooks_url":"https://api.github.com/repos/mxenabled/mx-react-components/hooks","issue_events_url":"https://api.github.com/repos/mxenabled/mx-react-components/issues/events{/number}","events_url":"https://api.github.com/repos/mxenabled/mx-react-components/events","assignees_url":"https://api.github.com/repos/mxenabled/mx-react-components/assignees{/user}","branches_url":"https://api.github.com/repos/mxenabled/mx-react-components/branches{/branch}","tags_url":"https://api.github.com/repos/mxenabled/mx-react-components/tags","blobs_url":"https://api.github.com/repos/mxenabled/mx-react-components/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mxenabled/mx-react-components/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mxenabled/mx-react-components/git/refs{/sha}","trees_url":"https://api.github.com/repos/mxenabled/mx-react-components/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mxenabled/mx-react-components/statuses/{sha}","languages_url":"https://api.github.com/repos/mxenabled/mx-react-components/languages","stargazers_url":"https://api.github.com/repos/mxenabled/mx-react-components/stargazers","contributors_url":"https://api.github.com/repos/mxenabled/mx-react-components/contributors","subscribers_url":"https://api.github.com/repos/mxenabled/mx-react-components/subscribers","subscription_url":"https://api.github.com/repos/mxenabled/mx-react-components/subscription","commits_url":"https://api.github.com/repos/mxenabled/mx-react-components/commits{/sha}","git_commits_url":"https://api.github.com/repos/mxenabled/mx-react-components/git/commits{/sha}","comments_url":"https://api.github.com/repos/mxenabled/mx-react-components/comments{/number}","issue_comment_url":"https://api.github.com/repos/mxenabled/mx-react-components/issues/comments{/number}","contents_url":"https://api.github.com/repos/mxenabled/mx-react-components/contents/{+path}","compare_url":"https://api.github.com/repos/mxenabled/mx-react-components/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mxenabled/mx-react-components/merges","archive_url":"https://api.github.com/repos/mxenabled/mx-react-components/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mxenabled/mx-react-components/downloads","issues_url":"https://api.github.com/repos/mxenabled/mx-react-components/issues{/number}","pulls_url":"https://api.github.com/repos/mxenabled/mx-react-components/pulls{/number}","milestones_url":"https://api.github.com/repos/mxenabled/mx-react-components/milestones{/number}","notifications_url":"https://api.github.com/repos/mxenabled/mx-react-components/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mxenabled/mx-react-components/labels{/name}","releases_url":"https://api.github.com/repos/mxenabled/mx-react-components/releases{/id}","deployments_url":"https://api.github.com/repos/mxenabled/mx-react-components/deployments","created_at":"2015-08-28T21:47:32Z","updated_at":"2016-10-26T15:41:06Z","pushed_at":"2016-11-08T19:35:15Z","git_url":"git://github.com/mxenabled/mx-react-components.git","ssh_url":"git@github.com:mxenabled/mx-react-components.git","clone_url":"https://github.com/mxenabled/mx-react-components.git","svn_url":"https://github.com/mxenabled/mx-react-components","homepage":null,"size":23898,"stargazers_count":34,"watchers_count":34,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":48,"mirror_url":null,"open_issues_count":12,"forks":48,"open_issues":12,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/466"},"html":{"href":"https://github.com/mxenabled/mx-react-components/pull/466"},"issue":{"href":"https://api.github.com/repos/mxenabled/mx-react-components/issues/466"},"comments":{"href":"https://api.github.com/repos/mxenabled/mx-react-components/issues/466/comments"},"review_comments":{"href":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/466/comments"},"review_comment":{"href":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mxenabled/mx-react-components/pulls/466/commits"},"statuses":{"href":"https://api.github.com/repos/mxenabled/mx-react-components/statuses/806307a63b06196d69fe2e3eeabaa05888d2f1ca"}}}}
{"actor":{"display_login":"redperk"}}