{"action":"created","comment":{"url":"https://api.github.com/repos/palantir/blueprint/pulls/comments/182836718","pull_request_review_id":113717680,"id":182836718,"diff_hunk":"@@ -48,7 +48,10 @@ export class Handle extends AbstractPureComponent<IHandleProps, IHandleState> {\n \n     private handleElement: HTMLElement;\n     private refHandlers = {\n-        handle: (el: HTMLSpanElement) => (this.handleElement = el),\n+        handle: (el: HTMLSpanElement) => {\n+            this.handleElement = el;\n+            this.forceUpdate();","path":"packages/core/src/components/slider/handle.tsx","position":7,"original_position":7,"commit_id":"d892981a996cbb72a7bf063e8d517bcfcbdc6f8d","original_commit_id":"d892981a996cbb72a7bf063e8d517bcfcbdc6f8d","user":{"login":"jscheiny","id":993321,"avatar_url":"https://avatars3.githubusercontent.com/u/993321?v=4","gravatar_id":"","url":"https://api.github.com/users/jscheiny","html_url":"https://github.com/jscheiny","followers_url":"https://api.github.com/users/jscheiny/followers","following_url":"https://api.github.com/users/jscheiny/following{/other_user}","gists_url":"https://api.github.com/users/jscheiny/gists{/gist_id}","starred_url":"https://api.github.com/users/jscheiny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscheiny/subscriptions","organizations_url":"https://api.github.com/users/jscheiny/orgs","repos_url":"https://api.github.com/users/jscheiny/repos","events_url":"https://api.github.com/users/jscheiny/events{/privacy}","received_events_url":"https://api.github.com/users/jscheiny/received_events","type":"User","site_admin":false},"body":"This is here because when the number of handles changes, these handles are re-instantiated. When that happens the first render of the component does not have the ref captured and thus incorrectly positions the handle. This fixes by immediately re-rendering once the ref is captured, not sure if there's a nicer way to handle (haha) this. Otherwise, will add a comment to this effect.","created_at":"2018-04-19T18:08:32Z","updated_at":"2018-04-19T18:08:32Z","html_url":"https://github.com/palantir/blueprint/pull/2407#discussion_r182836718","pull_request_url":"https://api.github.com/repos/palantir/blueprint/pulls/2407","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/palantir/blueprint/pulls/comments/182836718"},"html":{"href":"https://github.com/palantir/blueprint/pull/2407#discussion_r182836718"},"pull_request":{"href":"https://api.github.com/repos/palantir/blueprint/pulls/2407"}}},"pull_request":{"url":"https://api.github.com/repos/palantir/blueprint/pulls/2407","id":182841002,"html_url":"https://github.com/palantir/blueprint/pull/2407","diff_url":"https://github.com/palantir/blueprint/pull/2407.diff","patch_url":"https://github.com/palantir/blueprint/pull/2407.patch","issue_url":"https://api.github.com/repos/palantir/blueprint/issues/2407","number":2407,"state":"open","locked":false,"title":"MultiRangeSlider component","user":{"login":"jscheiny","id":993321,"avatar_url":"https://avatars3.githubusercontent.com/u/993321?v=4","gravatar_id":"","url":"https://api.github.com/users/jscheiny","html_url":"https://github.com/jscheiny","followers_url":"https://api.github.com/users/jscheiny/followers","following_url":"https://api.github.com/users/jscheiny/following{/other_user}","gists_url":"https://api.github.com/users/jscheiny/gists{/gist_id}","starred_url":"https://api.github.com/users/jscheiny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscheiny/subscriptions","organizations_url":"https://api.github.com/users/jscheiny/orgs","repos_url":"https://api.github.com/users/jscheiny/repos","events_url":"https://api.github.com/users/jscheiny/events{/privacy}","received_events_url":"https://api.github.com/users/jscheiny/received_events","type":"User","site_admin":false},"body":"#### Checklist\r\n\r\n- [x] [Enable CircleCI for your fork](https://circleci.com/add-projects)\r\n- [ ] Include tests\r\n- [ ] Update documentation\r\n\r\n---\r\n\r\n#### Changes proposed in this pull request:\r\n\r\nThis adds a very general `MultiRangeSlider` component that ultimately should be able to subsume the `Slider` and `RangeSlider` components.\r\n\r\nNotes about the component API:\r\n- Instead of taking a value/values the component takes a list of handles specified by props. Each handle has:\r\n - `value` - where it gets placed on the slider\r\n - `type` - specifies how the slider handle should be displayed\r\n   - `\"full\"` - handle appears like it does in a `Slider` (default)\r\n   - `\"lower\"` - handle appears like the first slider in a `RangeSlider`\r\n   - `\"upper\"` - handle appears like the second slider in a `RangeSlider`\r\n - `trackIntent{Above,Below}` specifies the color of the track fill above and below (numerically) of the given handle.\r\n\r\nHandles are always displayed in ascending numeric order and the values that are returned by `onChange` and `onRelease` are always sorted.\r\n\r\nIn addition, `MultiRangeSlider` takes a `defaultTrackIntent` prop which is used in the resolution of how to render the color of the track between two given handles. The way that this is resolved is as follows (and is one of my concerns about the API).\r\n\r\n- If the left handle has an above intent, use that\r\n- If the right handle has a below intent, use that\r\n- If the component has a default intent, use that\r\n- Otherwise don't color that section\r\n\r\n**Important:** Note that there is a difference between the `NONE` intent and the absence of an intent entirely (`undefined`). The former will render a gray track between the two handles and the latter will fall-through to the next color in the hierarchy above.\r\n\r\nI previously allowed the specification of colors instead of intents but that didn't seem very blueprint-y.\r\n\r\n---\r\n\r\n#### Reviewers should focus on:\r\n\r\nI have explicitly **not** written tests/docs for this yet, as I would first like to iterate on the API as I'm not convinced what I've written is particularly nice (worked for our use case but don't know if it generalizes well). Once we've iterated and nailed down an API I will gladly write tests and docs for this component.\r\n\r\nI've written some questions in the code, but one additional question I have is should this component live in `labs` first to incubate before moving into `core`?\r\n\r\n---\r\n\r\n#### Not addressed in this PR (requires follow-up):\r\n\r\nTo keep this PR simple(r) and easy(er) to review, I have not made many changes to the existing slider components but in 1-2 follow up PRs I would like to:\r\n\r\n1. Refactor `Slider` and `RangeSlider` to be simple wrappers around `MultiRangeSlider`\r\n2. Remove `CoreSlider` and refactor into `MultiRangeSlider`\r\n\r\nThe second one is questionable, especially if there are plans to add a slider that does not fit into the multi range slider model.\r\n\r\n---\r\n\r\n#### Screenshots\r\n\r\nTwo tailed slider:\r\n\r\n![screen shot 2018-04-19 at 10 43 24 am](https://user-images.githubusercontent.com/993321/39000287-9e078b26-43c1-11e8-85c6-96e59d1fb92e.png)\r\n\r\nDisabled:\r\n\r\n![screen shot 2018-04-19 at 11 09 44 am](https://user-images.githubusercontent.com/993321/39000519-3b62b3c8-43c2-11e8-8e72-7547d5091e40.png)\r\n\r\nOne tailed:\r\n\r\n![screen shot 2018-04-19 at 11 10 39 am](https://user-images.githubusercontent.com/993321/39000675-95658c1a-43c2-11e8-9b40-3ae00692dc0b.png)\r\n\r\nWeird:\r\n\r\n![screen shot 2018-04-19 at 11 12 27 am](https://user-images.githubusercontent.com/993321/39000684-9aeaa030-43c2-11e8-8205-f2ce51258d93.png)\r\n\r\nVertical:\r\n\r\n![screen shot 2018-04-19 at 11 14 13 am](https://user-images.githubusercontent.com/993321/39000784-d548f65a-43c2-11e8-9a2a-a5ab891a71dc.png)\r\n\r\nIn action:\r\n\r\n![mulit-range-slider](https://user-images.githubusercontent.com/993321/39000291-a34d7cf8-43c1-11e8-8e2b-7feaf81f3413.gif)\r\n\r\n","created_at":"2018-04-19T17:06:23Z","updated_at":"2018-04-19T18:08:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"029b48b4587d9cf01aa4f052876130963e5c2000","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/palantir/blueprint/pulls/2407/commits","review_comments_url":"https://api.github.com/repos/palantir/blueprint/pulls/2407/comments","review_comment_url":"https://api.github.com/repos/palantir/blueprint/pulls/comments{/number}","comments_url":"https://api.github.com/repos/palantir/blueprint/issues/2407/comments","statuses_url":"https://api.github.com/repos/palantir/blueprint/statuses/d892981a996cbb72a7bf063e8d517bcfcbdc6f8d","head":{"label":"jscheiny:js/multi-range-slider","ref":"js/multi-range-slider","sha":"d892981a996cbb72a7bf063e8d517bcfcbdc6f8d","user":{"login":"jscheiny","id":993321,"avatar_url":"https://avatars3.githubusercontent.com/u/993321?v=4","gravatar_id":"","url":"https://api.github.com/users/jscheiny","html_url":"https://github.com/jscheiny","followers_url":"https://api.github.com/users/jscheiny/followers","following_url":"https://api.github.com/users/jscheiny/following{/other_user}","gists_url":"https://api.github.com/users/jscheiny/gists{/gist_id}","starred_url":"https://api.github.com/users/jscheiny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscheiny/subscriptions","organizations_url":"https://api.github.com/users/jscheiny/orgs","repos_url":"https://api.github.com/users/jscheiny/repos","events_url":"https://api.github.com/users/jscheiny/events{/privacy}","received_events_url":"https://api.github.com/users/jscheiny/received_events","type":"User","site_admin":false},"repo":{"id":130230772,"name":"blueprint","full_name":"jscheiny/blueprint","owner":{"login":"jscheiny","id":993321,"avatar_url":"https://avatars3.githubusercontent.com/u/993321?v=4","gravatar_id":"","url":"https://api.github.com/users/jscheiny","html_url":"https://github.com/jscheiny","followers_url":"https://api.github.com/users/jscheiny/followers","following_url":"https://api.github.com/users/jscheiny/following{/other_user}","gists_url":"https://api.github.com/users/jscheiny/gists{/gist_id}","starred_url":"https://api.github.com/users/jscheiny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jscheiny/subscriptions","organizations_url":"https://api.github.com/users/jscheiny/orgs","repos_url":"https://api.github.com/users/jscheiny/repos","events_url":"https://api.github.com/users/jscheiny/events{/privacy}","received_events_url":"https://api.github.com/users/jscheiny/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jscheiny/blueprint","description":"A React-based UI toolkit for the web","fork":true,"url":"https://api.github.com/repos/jscheiny/blueprint","forks_url":"https://api.github.com/repos/jscheiny/blueprint/forks","keys_url":"https://api.github.com/repos/jscheiny/blueprint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jscheiny/blueprint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jscheiny/blueprint/teams","hooks_url":"https://api.github.com/repos/jscheiny/blueprint/hooks","issue_events_url":"https://api.github.com/repos/jscheiny/blueprint/issues/events{/number}","events_url":"https://api.github.com/repos/jscheiny/blueprint/events","assignees_url":"https://api.github.com/repos/jscheiny/blueprint/assignees{/user}","branches_url":"https://api.github.com/repos/jscheiny/blueprint/branches{/branch}","tags_url":"https://api.github.com/repos/jscheiny/blueprint/tags","blobs_url":"https://api.github.com/repos/jscheiny/blueprint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jscheiny/blueprint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jscheiny/blueprint/git/refs{/sha}","trees_url":"https://api.github.com/repos/jscheiny/blueprint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jscheiny/blueprint/statuses/{sha}","languages_url":"https://api.github.com/repos/jscheiny/blueprint/languages","stargazers_url":"https://api.github.com/repos/jscheiny/blueprint/stargazers","contributors_url":"https://api.github.com/repos/jscheiny/blueprint/contributors","subscribers_url":"https://api.github.com/repos/jscheiny/blueprint/subscribers","subscription_url":"https://api.github.com/repos/jscheiny/blueprint/subscription","commits_url":"https://api.github.com/repos/jscheiny/blueprint/commits{/sha}","git_commits_url":"https://api.github.com/repos/jscheiny/blueprint/git/commits{/sha}","comments_url":"https://api.github.com/repos/jscheiny/blueprint/comments{/number}","issue_comment_url":"https://api.github.com/repos/jscheiny/blueprint/issues/comments{/number}","contents_url":"https://api.github.com/repos/jscheiny/blueprint/contents/{+path}","compare_url":"https://api.github.com/repos/jscheiny/blueprint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jscheiny/blueprint/merges","archive_url":"https://api.github.com/repos/jscheiny/blueprint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jscheiny/blueprint/downloads","issues_url":"https://api.github.com/repos/jscheiny/blueprint/issues{/number}","pulls_url":"https://api.github.com/repos/jscheiny/blueprint/pulls{/number}","milestones_url":"https://api.github.com/repos/jscheiny/blueprint/milestones{/number}","notifications_url":"https://api.github.com/repos/jscheiny/blueprint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jscheiny/blueprint/labels{/name}","releases_url":"https://api.github.com/repos/jscheiny/blueprint/releases{/id}","deployments_url":"https://api.github.com/repos/jscheiny/blueprint/deployments","created_at":"2018-04-19T14:47:06Z","updated_at":"2018-04-19T14:47:10Z","pushed_at":"2018-04-19T14:55:49Z","git_url":"git://github.com/jscheiny/blueprint.git","ssh_url":"git@github.com:jscheiny/blueprint.git","clone_url":"https://github.com/jscheiny/blueprint.git","svn_url":"https://github.com/jscheiny/blueprint","homepage":"http://blueprintjs.com/","size":63537,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"palantir:develop","ref":"develop","sha":"979a8edd016f7f2454744e15ff0c5924991b0aff","user":{"login":"palantir","id":303157,"avatar_url":"https://avatars0.githubusercontent.com/u/303157?v=4","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"repo":{"id":71939872,"name":"blueprint","full_name":"palantir/blueprint","owner":{"login":"palantir","id":303157,"avatar_url":"https://avatars0.githubusercontent.com/u/303157?v=4","gravatar_id":"","url":"https://api.github.com/users/palantir","html_url":"https://github.com/palantir","followers_url":"https://api.github.com/users/palantir/followers","following_url":"https://api.github.com/users/palantir/following{/other_user}","gists_url":"https://api.github.com/users/palantir/gists{/gist_id}","starred_url":"https://api.github.com/users/palantir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palantir/subscriptions","organizations_url":"https://api.github.com/users/palantir/orgs","repos_url":"https://api.github.com/users/palantir/repos","events_url":"https://api.github.com/users/palantir/events{/privacy}","received_events_url":"https://api.github.com/users/palantir/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/palantir/blueprint","description":"A React-based UI toolkit for the web","fork":false,"url":"https://api.github.com/repos/palantir/blueprint","forks_url":"https://api.github.com/repos/palantir/blueprint/forks","keys_url":"https://api.github.com/repos/palantir/blueprint/keys{/key_id}","collaborators_url":"https://api.github.com/repos/palantir/blueprint/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/palantir/blueprint/teams","hooks_url":"https://api.github.com/repos/palantir/blueprint/hooks","issue_events_url":"https://api.github.com/repos/palantir/blueprint/issues/events{/number}","events_url":"https://api.github.com/repos/palantir/blueprint/events","assignees_url":"https://api.github.com/repos/palantir/blueprint/assignees{/user}","branches_url":"https://api.github.com/repos/palantir/blueprint/branches{/branch}","tags_url":"https://api.github.com/repos/palantir/blueprint/tags","blobs_url":"https://api.github.com/repos/palantir/blueprint/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/palantir/blueprint/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/palantir/blueprint/git/refs{/sha}","trees_url":"https://api.github.com/repos/palantir/blueprint/git/trees{/sha}","statuses_url":"https://api.github.com/repos/palantir/blueprint/statuses/{sha}","languages_url":"https://api.github.com/repos/palantir/blueprint/languages","stargazers_url":"https://api.github.com/repos/palantir/blueprint/stargazers","contributors_url":"https://api.github.com/repos/palantir/blueprint/contributors","subscribers_url":"https://api.github.com/repos/palantir/blueprint/subscribers","subscription_url":"https://api.github.com/repos/palantir/blueprint/subscription","commits_url":"https://api.github.com/repos/palantir/blueprint/commits{/sha}","git_commits_url":"https://api.github.com/repos/palantir/blueprint/git/commits{/sha}","comments_url":"https://api.github.com/repos/palantir/blueprint/comments{/number}","issue_comment_url":"https://api.github.com/repos/palantir/blueprint/issues/comments{/number}","contents_url":"https://api.github.com/repos/palantir/blueprint/contents/{+path}","compare_url":"https://api.github.com/repos/palantir/blueprint/compare/{base}...{head}","merges_url":"https://api.github.com/repos/palantir/blueprint/merges","archive_url":"https://api.github.com/repos/palantir/blueprint/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/palantir/blueprint/downloads","issues_url":"https://api.github.com/repos/palantir/blueprint/issues{/number}","pulls_url":"https://api.github.com/repos/palantir/blueprint/pulls{/number}","milestones_url":"https://api.github.com/repos/palantir/blueprint/milestones{/number}","notifications_url":"https://api.github.com/repos/palantir/blueprint/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/palantir/blueprint/labels{/name}","releases_url":"https://api.github.com/repos/palantir/blueprint/releases{/id}","deployments_url":"https://api.github.com/repos/palantir/blueprint/deployments","created_at":"2016-10-25T21:17:50Z","updated_at":"2018-04-19T18:00:24Z","pushed_at":"2018-04-19T17:06:23Z","git_url":"git://github.com/palantir/blueprint.git","ssh_url":"git@github.com:palantir/blueprint.git","clone_url":"https://github.com/palantir/blueprint.git","svn_url":"https://github.com/palantir/blueprint","homepage":"http://blueprintjs.com/","size":63533,"stargazers_count":9007,"watchers_count":9007,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":614,"mirror_url":null,"archived":false,"open_issues_count":240,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":614,"open_issues":240,"watchers":9007,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/palantir/blueprint/pulls/2407"},"html":{"href":"https://github.com/palantir/blueprint/pull/2407"},"issue":{"href":"https://api.github.com/repos/palantir/blueprint/issues/2407"},"comments":{"href":"https://api.github.com/repos/palantir/blueprint/issues/2407/comments"},"review_comments":{"href":"https://api.github.com/repos/palantir/blueprint/pulls/2407/comments"},"review_comment":{"href":"https://api.github.com/repos/palantir/blueprint/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/palantir/blueprint/pulls/2407/commits"},"statuses":{"href":"https://api.github.com/repos/palantir/blueprint/statuses/d892981a996cbb72a7bf063e8d517bcfcbdc6f8d"}},"author_association":"NONE"}}
{"actor":{"display_login":"jscheiny"}}