{"action":"created","comment":{"url":"https://api.github.com/repos/callemall/material-ui/pulls/comments/52137877","id":52137877,"diff_hunk":"@@ -1,10 +1,75 @@\n import React from 'react';\n-import ReactDOM from 'react-dom';\n-import StylePropable from './mixins/style-propable';\n import autoPrefix from './styles/auto-prefix';\n import Transitions from './styles/transitions';\n import getMuiTheme from './styles/getMuiTheme';\n \n+function getRelativeValue(value, min, max) {\n+  const clampedValue = Math.min(Math.max(min, value), max);\n+  const rangeValue = max - min;\n+  const relValue = Math.round(clampedValue / rangeValue * 10000) / 10000;\n+  return relValue * 100;\n+}\n+\n+function getStyles(props, state) {\n+  const {\n+    max,\n+    min,\n+    size,\n+    value,\n+  } = props;\n+\n+  const {\n+    baseTheme: {\n+      palette,\n+    },\n+  } = state.muiTheme;\n+\n+  const zoom = size * 1.4 ;\n+  const baseSize = '50px';\n+  let margin = Math.round( ((50 * zoom) - 50) / 2 );\n+\n+  if (margin < 0) margin = 0;\n+\n+  let styles = {\n+    root: {\n+      position: 'relative',\n+      margin: margin,\n+      display: 'inline-block',\n+      width: baseSize,\n+      height: baseSize,\n+    },\n+    wrapper: {\n+      width: baseSize,\n+      height: baseSize,\n+      display: 'inline-block',\n+      transition: Transitions.create('transform', '20s', null, 'linear'),\n+    },\n+    svg: {\n+      height: baseSize,\n+      position: 'relative',\n+      transform: `scale(${zoom})`,\n+      width: baseSize,\n+    },\n+    path: {\n+      strokeDasharray: '89,200',\n+      strokeDashoffset: 0,\n+      stroke: props.color || palette.primary1Color,\n+      strokeLinecap: 'round',\n+      transition: Transitions.create('all', '1.5s', null, 'ease-in-out'),\n+    },\n+  };\n+\n+  autoPrefix.set(styles.wrapper, 'transitionTimingFunction', 'linear', state.muiTheme);","path":"src/circular-progress.jsx","position":64,"original_position":64,"commit_id":"8e6de4584bee50e0f8f694025dc6dcf2bbaff0cf","original_commit_id":"8e6de4584bee50e0f8f694025dc6dcf2bbaff0cf","user":{"login":"newoga","id":344018,"avatar_url":"https://avatars.githubusercontent.com/u/344018?v=3","gravatar_id":"","url":"https://api.github.com/users/newoga","html_url":"https://github.com/newoga","followers_url":"https://api.github.com/users/newoga/followers","following_url":"https://api.github.com/users/newoga/following{/other_user}","gists_url":"https://api.github.com/users/newoga/gists{/gist_id}","starred_url":"https://api.github.com/users/newoga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newoga/subscriptions","organizations_url":"https://api.github.com/users/newoga/orgs","repos_url":"https://api.github.com/users/newoga/repos","events_url":"https://api.github.com/users/newoga/events{/privacy}","received_events_url":"https://api.github.com/users/newoga/received_events","type":"User","site_admin":false},"body":"Yeah good call. :+1:  After the migration I'd like to revisit seeing if we can get rid of all the `autoPrefix` calls...","created_at":"2016-02-08T07:15:28Z","updated_at":"2016-02-08T07:15:28Z","html_url":"https://github.com/callemall/material-ui/pull/3233#discussion_r52137877","pull_request_url":"https://api.github.com/repos/callemall/material-ui/pulls/3233","_links":{"self":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/comments/52137877"},"html":{"href":"https://github.com/callemall/material-ui/pull/3233#discussion_r52137877"},"pull_request":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/3233"}}},"pull_request":{"url":"https://api.github.com/repos/callemall/material-ui/pulls/3233","id":58568464,"html_url":"https://github.com/callemall/material-ui/pull/3233","diff_url":"https://github.com/callemall/material-ui/pull/3233.diff","patch_url":"https://github.com/callemall/material-ui/pull/3233.patch","issue_url":"https://api.github.com/repos/callemall/material-ui/issues/3233","number":3233,"state":"open","locked":false,"title":"[Progress] Remove style propable mixin","user":{"login":"newoga","id":344018,"avatar_url":"https://avatars.githubusercontent.com/u/344018?v=3","gravatar_id":"","url":"https://api.github.com/users/newoga","html_url":"https://github.com/newoga","followers_url":"https://api.github.com/users/newoga/followers","following_url":"https://api.github.com/users/newoga/following{/other_user}","gists_url":"https://api.github.com/users/newoga/gists{/gist_id}","starred_url":"https://api.github.com/users/newoga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newoga/subscriptions","organizations_url":"https://api.github.com/users/newoga/orgs","repos_url":"https://api.github.com/users/newoga/repos","events_url":"https://api.github.com/users/newoga/events{/privacy}","received_events_url":"https://api.github.com/users/newoga/received_events","type":"User","site_admin":false},"body":"These components could use some refactoring. I started some of it, but `refresh-indicator` in particular could be improved a lot. There is some common logic that's duplicated such as the `getRelativeValue()` function. Maybe one day we can consider making a single `<Progress />` component that can have different prop or child implementations.","created_at":"2016-02-08T03:40:50Z","updated_at":"2016-02-08T07:15:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"927c66d7c72e4d2bef886ce4a3129f44ed386b07","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/callemall/material-ui/pulls/3233/commits","review_comments_url":"https://api.github.com/repos/callemall/material-ui/pulls/3233/comments","review_comment_url":"https://api.github.com/repos/callemall/material-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/callemall/material-ui/issues/3233/comments","statuses_url":"https://api.github.com/repos/callemall/material-ui/statuses/8e6de4584bee50e0f8f694025dc6dcf2bbaff0cf","head":{"label":"newoga:#2852/progress","ref":"#2852/progress","sha":"8e6de4584bee50e0f8f694025dc6dcf2bbaff0cf","user":{"login":"newoga","id":344018,"avatar_url":"https://avatars.githubusercontent.com/u/344018?v=3","gravatar_id":"","url":"https://api.github.com/users/newoga","html_url":"https://github.com/newoga","followers_url":"https://api.github.com/users/newoga/followers","following_url":"https://api.github.com/users/newoga/following{/other_user}","gists_url":"https://api.github.com/users/newoga/gists{/gist_id}","starred_url":"https://api.github.com/users/newoga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newoga/subscriptions","organizations_url":"https://api.github.com/users/newoga/orgs","repos_url":"https://api.github.com/users/newoga/repos","events_url":"https://api.github.com/users/newoga/events{/privacy}","received_events_url":"https://api.github.com/users/newoga/received_events","type":"User","site_admin":false},"repo":{"id":47232679,"name":"material-ui","full_name":"newoga/material-ui","owner":{"login":"newoga","id":344018,"avatar_url":"https://avatars.githubusercontent.com/u/344018?v=3","gravatar_id":"","url":"https://api.github.com/users/newoga","html_url":"https://github.com/newoga","followers_url":"https://api.github.com/users/newoga/followers","following_url":"https://api.github.com/users/newoga/following{/other_user}","gists_url":"https://api.github.com/users/newoga/gists{/gist_id}","starred_url":"https://api.github.com/users/newoga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newoga/subscriptions","organizations_url":"https://api.github.com/users/newoga/orgs","repos_url":"https://api.github.com/users/newoga/repos","events_url":"https://api.github.com/users/newoga/events{/privacy}","received_events_url":"https://api.github.com/users/newoga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/newoga/material-ui","description":"React Components that Implement Google's Material Design.","fork":true,"url":"https://api.github.com/repos/newoga/material-ui","forks_url":"https://api.github.com/repos/newoga/material-ui/forks","keys_url":"https://api.github.com/repos/newoga/material-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/newoga/material-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/newoga/material-ui/teams","hooks_url":"https://api.github.com/repos/newoga/material-ui/hooks","issue_events_url":"https://api.github.com/repos/newoga/material-ui/issues/events{/number}","events_url":"https://api.github.com/repos/newoga/material-ui/events","assignees_url":"https://api.github.com/repos/newoga/material-ui/assignees{/user}","branches_url":"https://api.github.com/repos/newoga/material-ui/branches{/branch}","tags_url":"https://api.github.com/repos/newoga/material-ui/tags","blobs_url":"https://api.github.com/repos/newoga/material-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/newoga/material-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/newoga/material-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/newoga/material-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/newoga/material-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/newoga/material-ui/languages","stargazers_url":"https://api.github.com/repos/newoga/material-ui/stargazers","contributors_url":"https://api.github.com/repos/newoga/material-ui/contributors","subscribers_url":"https://api.github.com/repos/newoga/material-ui/subscribers","subscription_url":"https://api.github.com/repos/newoga/material-ui/subscription","commits_url":"https://api.github.com/repos/newoga/material-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/newoga/material-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/newoga/material-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/newoga/material-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/newoga/material-ui/contents/{+path}","compare_url":"https://api.github.com/repos/newoga/material-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/newoga/material-ui/merges","archive_url":"https://api.github.com/repos/newoga/material-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/newoga/material-ui/downloads","issues_url":"https://api.github.com/repos/newoga/material-ui/issues{/number}","pulls_url":"https://api.github.com/repos/newoga/material-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/newoga/material-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/newoga/material-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/newoga/material-ui/labels{/name}","releases_url":"https://api.github.com/repos/newoga/material-ui/releases{/id}","deployments_url":"https://api.github.com/repos/newoga/material-ui/deployments","created_at":"2015-12-02T02:48:02Z","updated_at":"2016-02-01T22:19:06Z","pushed_at":"2016-02-08T07:09:36Z","git_url":"git://github.com/newoga/material-ui.git","ssh_url":"git@github.com:newoga/material-ui.git","clone_url":"https://github.com/newoga/material-ui.git","svn_url":"https://github.com/newoga/material-ui","homepage":"http://www.material-ui.com","size":36005,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"callemall:master","ref":"master","sha":"484f03826054320ab909d8d803389c8c2341443e","user":{"login":"callemall","id":1262264,"avatar_url":"https://avatars.githubusercontent.com/u/1262264?v=3","gravatar_id":"","url":"https://api.github.com/users/callemall","html_url":"https://github.com/callemall","followers_url":"https://api.github.com/users/callemall/followers","following_url":"https://api.github.com/users/callemall/following{/other_user}","gists_url":"https://api.github.com/users/callemall/gists{/gist_id}","starred_url":"https://api.github.com/users/callemall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callemall/subscriptions","organizations_url":"https://api.github.com/users/callemall/orgs","repos_url":"https://api.github.com/users/callemall/repos","events_url":"https://api.github.com/users/callemall/events{/privacy}","received_events_url":"https://api.github.com/users/callemall/received_events","type":"Organization","site_admin":false},"repo":{"id":23083156,"name":"material-ui","full_name":"callemall/material-ui","owner":{"login":"callemall","id":1262264,"avatar_url":"https://avatars.githubusercontent.com/u/1262264?v=3","gravatar_id":"","url":"https://api.github.com/users/callemall","html_url":"https://github.com/callemall","followers_url":"https://api.github.com/users/callemall/followers","following_url":"https://api.github.com/users/callemall/following{/other_user}","gists_url":"https://api.github.com/users/callemall/gists{/gist_id}","starred_url":"https://api.github.com/users/callemall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callemall/subscriptions","organizations_url":"https://api.github.com/users/callemall/orgs","repos_url":"https://api.github.com/users/callemall/repos","events_url":"https://api.github.com/users/callemall/events{/privacy}","received_events_url":"https://api.github.com/users/callemall/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/callemall/material-ui","description":"React Components that Implement Google's Material Design.","fork":false,"url":"https://api.github.com/repos/callemall/material-ui","forks_url":"https://api.github.com/repos/callemall/material-ui/forks","keys_url":"https://api.github.com/repos/callemall/material-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/callemall/material-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/callemall/material-ui/teams","hooks_url":"https://api.github.com/repos/callemall/material-ui/hooks","issue_events_url":"https://api.github.com/repos/callemall/material-ui/issues/events{/number}","events_url":"https://api.github.com/repos/callemall/material-ui/events","assignees_url":"https://api.github.com/repos/callemall/material-ui/assignees{/user}","branches_url":"https://api.github.com/repos/callemall/material-ui/branches{/branch}","tags_url":"https://api.github.com/repos/callemall/material-ui/tags","blobs_url":"https://api.github.com/repos/callemall/material-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/callemall/material-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/callemall/material-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/callemall/material-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/callemall/material-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/callemall/material-ui/languages","stargazers_url":"https://api.github.com/repos/callemall/material-ui/stargazers","contributors_url":"https://api.github.com/repos/callemall/material-ui/contributors","subscribers_url":"https://api.github.com/repos/callemall/material-ui/subscribers","subscription_url":"https://api.github.com/repos/callemall/material-ui/subscription","commits_url":"https://api.github.com/repos/callemall/material-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/callemall/material-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/callemall/material-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/callemall/material-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/callemall/material-ui/contents/{+path}","compare_url":"https://api.github.com/repos/callemall/material-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/callemall/material-ui/merges","archive_url":"https://api.github.com/repos/callemall/material-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/callemall/material-ui/downloads","issues_url":"https://api.github.com/repos/callemall/material-ui/issues{/number}","pulls_url":"https://api.github.com/repos/callemall/material-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/callemall/material-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/callemall/material-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/callemall/material-ui/labels{/name}","releases_url":"https://api.github.com/repos/callemall/material-ui/releases{/id}","deployments_url":"https://api.github.com/repos/callemall/material-ui/deployments","created_at":"2014-08-18T19:11:54Z","updated_at":"2016-02-08T06:20:41Z","pushed_at":"2016-02-08T07:09:37Z","git_url":"git://github.com/callemall/material-ui.git","ssh_url":"git@github.com:callemall/material-ui.git","clone_url":"https://github.com/callemall/material-ui.git","svn_url":"https://github.com/callemall/material-ui","homepage":"http://www.material-ui.com","size":47942,"stargazers_count":13625,"watchers_count":13625,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2260,"mirror_url":null,"open_issues_count":581,"forks":2260,"open_issues":581,"watchers":13625,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/3233"},"html":{"href":"https://github.com/callemall/material-ui/pull/3233"},"issue":{"href":"https://api.github.com/repos/callemall/material-ui/issues/3233"},"comments":{"href":"https://api.github.com/repos/callemall/material-ui/issues/3233/comments"},"review_comments":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/3233/comments"},"review_comment":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/callemall/material-ui/pulls/3233/commits"},"statuses":{"href":"https://api.github.com/repos/callemall/material-ui/statuses/8e6de4584bee50e0f8f694025dc6dcf2bbaff0cf"}}}}