GitHub PullRequestReviewCommentEvent at 2014-12-03 02:16:35
Repository: ember-table
Actor: Dylnuge
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Addepar/ember-table/pulls/comments/21208872","id":21208872,"diff_hunk":"@@ -202,38 +202,86 @@ Ember.View.extend Ember.AddeparMixins.StyleBindingsMixin,\n   # ---------------------------------------------------------------------------\n \n   column:         Ember.computed.alias 'content'\n-  width:          Ember.computed.alias 'column.columnWidth'\n+  width:          Ember.computed.alias 'column.width'\n   height: Ember.computed ->\n     @get('controller._headerHeight')\n   .property('controller._headerHeight')\n \n+  nextResizableColumn: Ember.computed.alias 'column.nextResizableColumn'\n+\n+  effectiveMinWidth: Ember.computed ->\n+    return @get('column.minWidth') unless @get('controller.fluid')\n+    nextColumnMaxDiff = @get('nextResizableColumn.maxWidth') -\n+      @get('nextResizableColumn.width')\n+    if @get('column.minWidth') and nextColumnMaxDiff\n+      return Math.min(@get('column.minWidth'),\n+        @get('width') - nextColumnMaxDiff)\n+    else if @get('column.minWidth')\n+      return @get('column.minWidth')\n+    else\n+      return @get('width') - nextColumnMaxDiff\n+  .property('width', 'column.minWidth', 'nextResizableColumn',\n+    'nextResizableColumn.width', 'nextResizableColumn.maxWidth',\n+    'controller.fluid')\n+\n+  effectiveMaxWidth: Ember.computed ->\n+    return @get('column.maxWidth') unless @get('controller.fluid')\n+    nextColumnMaxDiff = @get('nextResizableColumn.width') -\n+      @get('nextResizableColumn.minWidth')\n+    if @get('column.maxWidth') and not Ember.isNone(nextColumnMaxDiff)\n+      return Math.min(@get('column.maxWidth'), @get('width') +\n+        nextColumnMaxDiff)\n+    else if @get('column.maxWidth')\n+      return @get('column.maxWidth')\n+    else\n+      return @get('width') + nextColumnMaxDiff\n+  .property('width', 'column.maxWidth', 'nextResizableColumn',\n+    'nextResizableColumn.width', 'nextResizableColumn.minWidth',\n+    'controller.fluid')\n+\n   # jQuery UI resizable option\n   resizableOption: Ember.computed ->\n     handles: 'e'\n-    minHeight: 40\n-    minWidth: @get('column.minWidth') || 100\n-    maxWidth: @get('column.maxWidth') || 500\n+    minWidth: @get('effectiveMinWidth') or 10","path":"src/views.coffee","position":57,"original_position":57,"commit_id":"2f369a376d7dec2c44bee00b88cf0ebd6db05438","original_commit_id":"2f369a376d7dec2c44bee00b88cf0ebd6db05438","user":{"login":"Dylnuge","id":118624,"avatar_url":"https://avatars.githubusercontent.com/u/118624?v=3","gravatar_id":"","url":"https://api.github.com/users/Dylnuge","html_url":"https://github.com/Dylnuge","followers_url":"https://api.github.com/users/Dylnuge/followers","following_url":"https://api.github.com/users/Dylnuge/following{/other_user}","gists_url":"https://api.github.com/users/Dylnuge/gists{/gist_id}","starred_url":"https://api.github.com/users/Dylnuge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dylnuge/subscriptions","organizations_url":"https://api.github.com/users/Dylnuge/orgs","repos_url":"https://api.github.com/users/Dylnuge/repos","events_url":"https://api.github.com/users/Dylnuge/events{/privacy}","received_events_url":"https://api.github.com/users/Dylnuge/received_events","type":"User","site_admin":false},"body":"Makes sense, though just as a warning that does mean anyone setting the minimum to `1` through `9` is going to have a bad time (`0 or 10` should work right)","created_at":"2014-12-03T02:16:35Z","updated_at":"2014-12-03T02:16:35Z","html_url":"https://github.com/Addepar/ember-table/pull/238#discussion_r21208872","pull_request_url":"https://api.github.com/repos/Addepar/ember-table/pulls/238","_links":{"self":{"href":"https://api.github.com/repos/Addepar/ember-table/pulls/comments/21208872"},"html":{"href":"https://github.com/Addepar/ember-table/pull/238#discussion_r21208872"},"pull_request":{"href":"https://api.github.com/repos/Addepar/ember-table/pulls/238"}}},"pull_request":{"url":"https://api.github.com/repos/Addepar/ember-table/pulls/238","id":25039553,"html_url":"https://github.com/Addepar/ember-table/pull/238","diff_url":"https://github.com/Addepar/ember-table/pull/238.diff","patch_url":"https://github.com/Addepar/ember-table/pull/238.patch","issue_url":"https://api.github.com/repos/Addepar/ember-table/issues/238","number":238,"state":"open","locked":false,"title":"New column resizing and configurable column demo","user":{"login":"azirbel","id":498245,"avatar_url":"https://avatars.githubusercontent.com/u/498245?v=3","gravatar_id":"","url":"https://api.github.com/users/azirbel","html_url":"https://github.com/azirbel","followers_url":"https://api.github.com/users/azirbel/followers","following_url":"https://api.github.com/users/azirbel/following{/other_user}","gists_url":"https://api.github.com/users/azirbel/gists{/gist_id}","starred_url":"https://api.github.com/users/azirbel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azirbel/subscriptions","organizations_url":"https://api.github.com/users/azirbel/orgs","repos_url":"https://api.github.com/users/azirbel/repos","events_url":"https://api.github.com/users/azirbel/events{/privacy}","received_events_url":"https://api.github.com/users/azirbel/received_events","type":"User","site_admin":false},"body":"Splits resizing behavior into two modes (`normal` and `fluid`).\r\n\r\n@bigsley @Dylnuge @igillis - wondering about the right API for this second mode. I decided against `fixedWidth` in the end, because it really has nothing to do with the width of the table and everything to do with how columns interact. I'm also debating between the API here (`fluid: yes/no`) and a mirror of `selectionMode` (`columnResizeMode: 'normal'/'fluid'`).\r\n\r\nFor the new changes, see the spec: https://github.com/Addepar/ember-table/issues/175, and previous review: https://github.com/Addepar/ember-table/pull/176.\r\n\r\nNormal mode works as before.\r\n\r\nFluid mode makes columns steal width from their neighbors when they resize.\r\n\r\nTo see how this all works, I've added a Configurable Column Demo that allows you to play with these options and see a demo table respond.\r\n\r\n@cyril-sf there's a hack in here I'd love for you to take a look at. Will add a comment.\r\n@bigsley @Dylnuge @igillis @sreenath-addepar could all potentially be interested in reviewing.","created_at":"2014-11-25T20:54:05Z","updated_at":"2014-12-03T02:16:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbc3e191e6f00cae704f8be43d28ac8c59fac0f6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Addepar/ember-table/pulls/238/commits","review_comments_url":"https://api.github.com/repos/Addepar/ember-table/pulls/238/comments","review_comment_url":"https://api.github.com/repos/Addepar/ember-table/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Addepar/ember-table/issues/238/comments","statuses_url":"https://api.github.com/repos/Addepar/ember-table/statuses/2f369a376d7dec2c44bee00b88cf0ebd6db05438","head":{"label":"Addepar:azirbel/new-column-resizing-force-fit","ref":"azirbel/new-column-resizing-force-fit","sha":"2f369a376d7dec2c44bee00b88cf0ebd6db05438","user":{"login":"Addepar","id":847867,"avatar_url":"https://avatars.githubusercontent.com/u/847867?v=3","gravatar_id":"","url":"https://api.github.com/users/Addepar","html_url":"https://github.com/Addepar","followers_url":"https://api.github.com/users/Addepar/followers","following_url":"https://api.github.com/users/Addepar/following{/other_user}","gists_url":"https://api.github.com/users/Addepar/gists{/gist_id}","starred_url":"https://api.github.com/users/Addepar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Addepar/subscriptions","organizations_url":"https://api.github.com/users/Addepar/orgs","repos_url":"https://api.github.com/users/Addepar/repos","events_url":"https://api.github.com/users/Addepar/events{/privacy}","received_events_url":"https://api.github.com/users/Addepar/received_events","type":"Organization","site_admin":false},"repo":{"id":7193433,"name":"ember-table","full_name":"Addepar/ember-table","owner":{"login":"Addepar","id":847867,"avatar_url":"https://avatars.githubusercontent.com/u/847867?v=3","gravatar_id":"","url":"https://api.github.com/users/Addepar","html_url":"https://github.com/Addepar","followers_url":"https://api.github.com/users/Addepar/followers","following_url":"https://api.github.com/users/Addepar/following{/other_user}","gists_url":"https://api.github.com/users/Addepar/gists{/gist_id}","starred_url":"https://api.github.com/users/Addepar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Addepar/subscriptions","organizations_url":"https://api.github.com/users/Addepar/orgs","repos_url":"https://api.github.com/users/Addepar/repos","events_url":"https://api.github.com/users/Addepar/events{/privacy}","received_events_url":"https://api.github.com/users/Addepar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Addepar/ember-table","description":"","fork":false,"url":"https://api.github.com/repos/Addepar/ember-table","forks_url":"https://api.github.com/repos/Addepar/ember-table/forks","keys_url":"https://api.github.com/repos/Addepar/ember-table/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Addepar/ember-table/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Addepar/ember-table/teams","hooks_url":"https://api.github.com/repos/Addepar/ember-table/hooks","issue_events_url":"https://api.github.com/repos/Addepar/ember-table/issues/events{/number}","events_url":"https://api.github.com/repos/Addepar/ember-table/events","assignees_url":"https://api.github.com/repos/Addepar/ember-table/assignees{/user}","branches_url":"https://api.github.com/repos/Addepar/ember-table/branches{/branch}","tags_url":"https://api.github.com/repos/Addepar/ember-table/tags","blobs_url":"https://api.github.com/repos/Addepar/ember-table/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Addepar/ember-table/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Addepar/ember-table/git/refs{/sha}","trees_url":"https://api.github.com/repos/Addepar/ember-table/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Addepar/ember-table/statuses/{sha}","languages_url":"https://api.github.com/repos/Addepar/ember-table/languages","stargazers_url":"https://api.github.com/repos/Addepar/ember-table/stargazers","contributors_url":"https://api.github.com/repos/Addepar/ember-table/contributors","subscribers_url":"https://api.github.com/repos/Addepar/ember-table/subscribers","subscription_url":"https://api.github.com/repos/Addepar/ember-table/subscription","commits_url":"https://api.github.com/repos/Addepar/ember-table/commits{/sha}","git_commits_url":"https://api.github.com/repos/Addepar/ember-table/git/commits{/sha}","comments_url":"https://api.github.com/repos/Addepar/ember-table/comments{/number}","issue_comment_url":"https://api.github.com/repos/Addepar/ember-table/issues/comments/{number}","contents_url":"https://api.github.com/repos/Addepar/ember-table/contents/{+path}","compare_url":"https://api.github.com/repos/Addepar/ember-table/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Addepar/ember-table/merges","archive_url":"https://api.github.com/repos/Addepar/ember-table/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Addepar/ember-table/downloads","issues_url":"https://api.github.com/repos/Addepar/ember-table/issues{/number}","pulls_url":"https://api.github.com/repos/Addepar/ember-table/pulls{/number}","milestones_url":"https://api.github.com/repos/Addepar/ember-table/milestones{/number}","notifications_url":"https://api.github.com/repos/Addepar/ember-table/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Addepar/ember-table/labels{/name}","releases_url":"https://api.github.com/repos/Addepar/ember-table/releases{/id}","created_at":"2012-12-16T18:10:18Z","updated_at":"2014-12-02T16:14:16Z","pushed_at":"2014-11-26T08:08:40Z","git_url":"git://github.com/Addepar/ember-table.git","ssh_url":"git@github.com:Addepar/ember-table.git","clone_url":"https://github.com/Addepar/ember-table.git","svn_url":"https://github.com/Addepar/ember-table","homepage":"http://addepar.github.com/ember-table/","size":9808,"stargazers_count":1270,"watchers_count":1270,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":175,"mirror_url":null,"open_issues_count":59,"forks":175,"open_issues":59,"watchers":1270,"default_branch":"master"}},"base":{"label":"Addepar:master","ref":"master","sha":"b12852df82a9c18a4e87c7287384879534288597","user":{"login":"Addepar","id":847867,"avatar_url":"https://avatars.githubusercontent.com/u/847867?v=3","gravatar_id":"","url":"https://api.github.com/users/Addepar","html_url":"https://github.com/Addepar","followers_url":"https://api.github.com/users/Addepar/followers","following_url":"https://api.github.com/users/Addepar/following{/other_user}","gists_url":"https://api.github.com/users/Addepar/gists{/gist_id}","starred_url":"https://api.github.com/users/Addepar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Addepar/subscriptions","organizations_url":"https://api.github.com/users/Addepar/orgs","repos_url":"https://api.github.com/users/Addepar/repos","events_url":"https://api.github.com/users/Addepar/events{/privacy}","received_events_url":"https://api.github.com/users/Addepar/received_events","type":"Organization","site_admin":false},"repo":{"id":7193433,"name":"ember-table","full_name":"Addepar/ember-table","owner":{"login":"Addepar","id":847867,"avatar_url":"https://avatars.githubusercontent.com/u/847867?v=3","gravatar_id":"","url":"https://api.github.com/users/Addepar","html_url":"https://github.com/Addepar","followers_url":"https://api.github.com/users/Addepar/followers","following_url":"https://api.github.com/users/Addepar/following{/other_user}","gists_url":"https://api.github.com/users/Addepar/gists{/gist_id}","starred_url":"https://api.github.com/users/Addepar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Addepar/subscriptions","organizations_url":"https://api.github.com/users/Addepar/orgs","repos_url":"https://api.github.com/users/Addepar/repos","events_url":"https://api.github.com/users/Addepar/events{/privacy}","received_events_url":"https://api.github.com/users/Addepar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Addepar/ember-table","description":"","fork":false,"url":"https://api.github.com/repos/Addepar/ember-table","forks_url":"https://api.github.com/repos/Addepar/ember-table/forks","keys_url":"https://api.github.com/repos/Addepar/ember-table/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Addepar/ember-table/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Addepar/ember-table/teams","hooks_url":"https://api.github.com/repos/Addepar/ember-table/hooks","issue_events_url":"https://api.github.com/repos/Addepar/ember-table/issues/events{/number}","events_url":"https://api.github.com/repos/Addepar/ember-table/events","assignees_url":"https://api.github.com/repos/Addepar/ember-table/assignees{/user}","branches_url":"https://api.github.com/repos/Addepar/ember-table/branches{/branch}","tags_url":"https://api.github.com/repos/Addepar/ember-table/tags","blobs_url":"https://api.github.com/repos/Addepar/ember-table/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Addepar/ember-table/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Addepar/ember-table/git/refs{/sha}","trees_url":"https://api.github.com/repos/Addepar/ember-table/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Addepar/ember-table/statuses/{sha}","languages_url":"https://api.github.com/repos/Addepar/ember-table/languages","stargazers_url":"https://api.github.com/repos/Addepar/ember-table/stargazers","contributors_url":"https://api.github.com/repos/Addepar/ember-table/contributors","subscribers_url":"https://api.github.com/repos/Addepar/ember-table/subscribers","subscription_url":"https://api.github.com/repos/Addepar/ember-table/subscription","commits_url":"https://api.github.com/repos/Addepar/ember-table/commits{/sha}","git_commits_url":"https://api.github.com/repos/Addepar/ember-table/git/commits{/sha}","comments_url":"https://api.github.com/repos/Addepar/ember-table/comments{/number}","issue_comment_url":"https://api.github.com/repos/Addepar/ember-table/issues/comments/{number}","contents_url":"https://api.github.com/repos/Addepar/ember-table/contents/{+path}","compare_url":"https://api.github.com/repos/Addepar/ember-table/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Addepar/ember-table/merges","archive_url":"https://api.github.com/repos/Addepar/ember-table/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Addepar/ember-table/downloads","issues_url":"https://api.github.com/repos/Addepar/ember-table/issues{/number}","pulls_url":"https://api.github.com/repos/Addepar/ember-table/pulls{/number}","milestones_url":"https://api.github.com/repos/Addepar/ember-table/milestones{/number}","notifications_url":"https://api.github.com/repos/Addepar/ember-table/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Addepar/ember-table/labels{/name}","releases_url":"https://api.github.com/repos/Addepar/ember-table/releases{/id}","created_at":"2012-12-16T18:10:18Z","updated_at":"2014-12-02T16:14:16Z","pushed_at":"2014-11-26T08:08:40Z","git_url":"git://github.com/Addepar/ember-table.git","ssh_url":"git@github.com:Addepar/ember-table.git","clone_url":"https://github.com/Addepar/ember-table.git","svn_url":"https://github.com/Addepar/ember-table","homepage":"http://addepar.github.com/ember-table/","size":9808,"stargazers_count":1270,"watchers_count":1270,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":175,"mirror_url":null,"open_issues_count":59,"forks":175,"open_issues":59,"watchers":1270,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Addepar/ember-table/pulls/238"},"html":{"href":"https://github.com/Addepar/ember-table/pull/238"},"issue":{"href":"https://api.github.com/repos/Addepar/ember-table/issues/238"},"comments":{"href":"https://api.github.com/repos/Addepar/ember-table/issues/238/comments"},"review_comments":{"href":"https://api.github.com/repos/Addepar/ember-table/pulls/238/comments"},"review_comment":{"href":"https://api.github.com/repos/Addepar/ember-table/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Addepar/ember-table/pulls/238/commits"},"statuses":{"href":"https://api.github.com/repos/Addepar/ember-table/statuses/2f369a376d7dec2c44bee00b88cf0ebd6db05438"}}}}