{"action":"closed","number":66,"pull_request":{"url":"https://api.github.com/repos/uberVU/grid/pulls/66","id":43019329,"html_url":"https://github.com/uberVU/grid/pull/66","diff_url":"https://github.com/uberVU/grid/pull/66.diff","patch_url":"https://github.com/uberVU/grid/pull/66.patch","issue_url":"https://api.github.com/repos/uberVU/grid/issues/66","number":66,"state":"closed","locked":false,"title":"Resizing an item can leave empty horizontal spaces","user":{"login":"NiGhTTraX","id":485061,"avatar_url":"https://avatars.githubusercontent.com/u/485061?v=3","gravatar_id":"","url":"https://api.github.com/users/NiGhTTraX","html_url":"https://github.com/NiGhTTraX","followers_url":"https://api.github.com/users/NiGhTTraX/followers","following_url":"https://api.github.com/users/NiGhTTraX/following{/other_user}","gists_url":"https://api.github.com/users/NiGhTTraX/gists{/gist_id}","starred_url":"https://api.github.com/users/NiGhTTraX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NiGhTTraX/subscriptions","organizations_url":"https://api.github.com/users/NiGhTTraX/orgs","repos_url":"https://api.github.com/users/NiGhTTraX/repos","events_url":"https://api.github.com/users/NiGhTTraX/events{/privacy}","received_events_url":"https://api.github.com/users/NiGhTTraX/received_events","type":"User","site_admin":false},"body":"![bug3](https://cloud.githubusercontent.com/assets/12442713/9111249/a87d9376-3c4d-11e5-9d6b-ed93be652a67.gif)\r\n\r\n\r\n## Solution\r\n\r\nWhen an item is resized we check if it fits in its original position. If it doesn't we start looking for a new position for it trying to preserve it's original row. If we can't find any, we make a new column and try to place it on its original row. If it doesn't fit there, we [place it on the first row](https://github.com/uberVU/grid/blob/20531d60a6900c421d310a8e43213224183ac03e/src/gridList.js#L193-L203).\r\n\r\nHowever, there might be horizontal to the left of the new position. We need to call gravity to fix this. See #65 for extra details.\r\n\r\n\r\n#### TODO\r\n\r\n- [x] writing failing test\r\n- [x] call `pullToLeft` [after](https://github.com/uberVU/grid/blob/20531d60a6900c421d310a8e43213224183ac03e/src/gridList.js#L224) the item is resized\r\n","created_at":"2015-08-21T09:28:36Z","updated_at":"2015-08-21T09:38:51Z","closed_at":"2015-08-21T09:38:51Z","merged_at":"2015-08-21T09:38:51Z","merge_commit_sha":"2ee559217c4564bd9b5b6d82a3a356ea878b5c3b","assignee":{"login":"andrei-picus-hs","id":12442713,"avatar_url":"https://avatars.githubusercontent.com/u/12442713?v=3","gravatar_id":"","url":"https://api.github.com/users/andrei-picus-hs","html_url":"https://github.com/andrei-picus-hs","followers_url":"https://api.github.com/users/andrei-picus-hs/followers","following_url":"https://api.github.com/users/andrei-picus-hs/following{/other_user}","gists_url":"https://api.github.com/users/andrei-picus-hs/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-picus-hs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-picus-hs/subscriptions","organizations_url":"https://api.github.com/users/andrei-picus-hs/orgs","repos_url":"https://api.github.com/users/andrei-picus-hs/repos","events_url":"https://api.github.com/users/andrei-picus-hs/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-picus-hs/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/uberVU/grid/pulls/66/commits","review_comments_url":"https://api.github.com/repos/uberVU/grid/pulls/66/comments","review_comment_url":"https://api.github.com/repos/uberVU/grid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uberVU/grid/issues/66/comments","statuses_url":"https://api.github.com/repos/uberVU/grid/statuses/6da3d39bc0fcd9f8c4591e815b5682ae74530857","head":{"label":"uberVU:66-resize-item-pull-left","ref":"66-resize-item-pull-left","sha":"6da3d39bc0fcd9f8c4591e815b5682ae74530857","user":{"login":"uberVU","id":1199831,"avatar_url":"https://avatars.githubusercontent.com/u/1199831?v=3","gravatar_id":"","url":"https://api.github.com/users/uberVU","html_url":"https://github.com/uberVU","followers_url":"https://api.github.com/users/uberVU/followers","following_url":"https://api.github.com/users/uberVU/following{/other_user}","gists_url":"https://api.github.com/users/uberVU/gists{/gist_id}","starred_url":"https://api.github.com/users/uberVU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uberVU/subscriptions","organizations_url":"https://api.github.com/users/uberVU/orgs","repos_url":"https://api.github.com/users/uberVU/repos","events_url":"https://api.github.com/users/uberVU/events{/privacy}","received_events_url":"https://api.github.com/users/uberVU/received_events","type":"Organization","site_admin":false},"repo":{"id":14335772,"name":"grid","full_name":"uberVU/grid","owner":{"login":"uberVU","id":1199831,"avatar_url":"https://avatars.githubusercontent.com/u/1199831?v=3","gravatar_id":"","url":"https://api.github.com/users/uberVU","html_url":"https://github.com/uberVU","followers_url":"https://api.github.com/users/uberVU/followers","following_url":"https://api.github.com/users/uberVU/following{/other_user}","gists_url":"https://api.github.com/users/uberVU/gists{/gist_id}","starred_url":"https://api.github.com/users/uberVU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uberVU/subscriptions","organizations_url":"https://api.github.com/users/uberVU/orgs","repos_url":"https://api.github.com/users/uberVU/repos","events_url":"https://api.github.com/users/uberVU/events{/privacy}","received_events_url":"https://api.github.com/users/uberVU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uberVU/grid","description":"Drag and drop library for two-dimensional, resizable and responsive lists","fork":false,"url":"https://api.github.com/repos/uberVU/grid","forks_url":"https://api.github.com/repos/uberVU/grid/forks","keys_url":"https://api.github.com/repos/uberVU/grid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uberVU/grid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uberVU/grid/teams","hooks_url":"https://api.github.com/repos/uberVU/grid/hooks","issue_events_url":"https://api.github.com/repos/uberVU/grid/issues/events{/number}","events_url":"https://api.github.com/repos/uberVU/grid/events","assignees_url":"https://api.github.com/repos/uberVU/grid/assignees{/user}","branches_url":"https://api.github.com/repos/uberVU/grid/branches{/branch}","tags_url":"https://api.github.com/repos/uberVU/grid/tags","blobs_url":"https://api.github.com/repos/uberVU/grid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uberVU/grid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uberVU/grid/git/refs{/sha}","trees_url":"https://api.github.com/repos/uberVU/grid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uberVU/grid/statuses/{sha}","languages_url":"https://api.github.com/repos/uberVU/grid/languages","stargazers_url":"https://api.github.com/repos/uberVU/grid/stargazers","contributors_url":"https://api.github.com/repos/uberVU/grid/contributors","subscribers_url":"https://api.github.com/repos/uberVU/grid/subscribers","subscription_url":"https://api.github.com/repos/uberVU/grid/subscription","commits_url":"https://api.github.com/repos/uberVU/grid/commits{/sha}","git_commits_url":"https://api.github.com/repos/uberVU/grid/git/commits{/sha}","comments_url":"https://api.github.com/repos/uberVU/grid/comments{/number}","issue_comment_url":"https://api.github.com/repos/uberVU/grid/issues/comments{/number}","contents_url":"https://api.github.com/repos/uberVU/grid/contents/{+path}","compare_url":"https://api.github.com/repos/uberVU/grid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uberVU/grid/merges","archive_url":"https://api.github.com/repos/uberVU/grid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uberVU/grid/downloads","issues_url":"https://api.github.com/repos/uberVU/grid/issues{/number}","pulls_url":"https://api.github.com/repos/uberVU/grid/pulls{/number}","milestones_url":"https://api.github.com/repos/uberVU/grid/milestones{/number}","notifications_url":"https://api.github.com/repos/uberVU/grid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uberVU/grid/labels{/name}","releases_url":"https://api.github.com/repos/uberVU/grid/releases{/id}","created_at":"2013-11-12T15:16:40Z","updated_at":"2015-08-20T14:18:47Z","pushed_at":"2015-08-21T09:38:51Z","git_url":"git://github.com/uberVU/grid.git","ssh_url":"git@github.com:uberVU/grid.git","clone_url":"https://github.com/uberVU/grid.git","svn_url":"https://github.com/uberVU/grid","homepage":"http://ubervu.github.io/grid/","size":1165,"stargazers_count":2760,"watchers_count":2760,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":163,"mirror_url":null,"open_issues_count":19,"forks":163,"open_issues":19,"watchers":2760,"default_branch":"master"}},"base":{"label":"uberVU:master","ref":"master","sha":"dcc305e23e0b21a986dd650b22ddfc6b513ded99","user":{"login":"uberVU","id":1199831,"avatar_url":"https://avatars.githubusercontent.com/u/1199831?v=3","gravatar_id":"","url":"https://api.github.com/users/uberVU","html_url":"https://github.com/uberVU","followers_url":"https://api.github.com/users/uberVU/followers","following_url":"https://api.github.com/users/uberVU/following{/other_user}","gists_url":"https://api.github.com/users/uberVU/gists{/gist_id}","starred_url":"https://api.github.com/users/uberVU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uberVU/subscriptions","organizations_url":"https://api.github.com/users/uberVU/orgs","repos_url":"https://api.github.com/users/uberVU/repos","events_url":"https://api.github.com/users/uberVU/events{/privacy}","received_events_url":"https://api.github.com/users/uberVU/received_events","type":"Organization","site_admin":false},"repo":{"id":14335772,"name":"grid","full_name":"uberVU/grid","owner":{"login":"uberVU","id":1199831,"avatar_url":"https://avatars.githubusercontent.com/u/1199831?v=3","gravatar_id":"","url":"https://api.github.com/users/uberVU","html_url":"https://github.com/uberVU","followers_url":"https://api.github.com/users/uberVU/followers","following_url":"https://api.github.com/users/uberVU/following{/other_user}","gists_url":"https://api.github.com/users/uberVU/gists{/gist_id}","starred_url":"https://api.github.com/users/uberVU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uberVU/subscriptions","organizations_url":"https://api.github.com/users/uberVU/orgs","repos_url":"https://api.github.com/users/uberVU/repos","events_url":"https://api.github.com/users/uberVU/events{/privacy}","received_events_url":"https://api.github.com/users/uberVU/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uberVU/grid","description":"Drag and drop library for two-dimensional, resizable and responsive lists","fork":false,"url":"https://api.github.com/repos/uberVU/grid","forks_url":"https://api.github.com/repos/uberVU/grid/forks","keys_url":"https://api.github.com/repos/uberVU/grid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uberVU/grid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uberVU/grid/teams","hooks_url":"https://api.github.com/repos/uberVU/grid/hooks","issue_events_url":"https://api.github.com/repos/uberVU/grid/issues/events{/number}","events_url":"https://api.github.com/repos/uberVU/grid/events","assignees_url":"https://api.github.com/repos/uberVU/grid/assignees{/user}","branches_url":"https://api.github.com/repos/uberVU/grid/branches{/branch}","tags_url":"https://api.github.com/repos/uberVU/grid/tags","blobs_url":"https://api.github.com/repos/uberVU/grid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uberVU/grid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uberVU/grid/git/refs{/sha}","trees_url":"https://api.github.com/repos/uberVU/grid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uberVU/grid/statuses/{sha}","languages_url":"https://api.github.com/repos/uberVU/grid/languages","stargazers_url":"https://api.github.com/repos/uberVU/grid/stargazers","contributors_url":"https://api.github.com/repos/uberVU/grid/contributors","subscribers_url":"https://api.github.com/repos/uberVU/grid/subscribers","subscription_url":"https://api.github.com/repos/uberVU/grid/subscription","commits_url":"https://api.github.com/repos/uberVU/grid/commits{/sha}","git_commits_url":"https://api.github.com/repos/uberVU/grid/git/commits{/sha}","comments_url":"https://api.github.com/repos/uberVU/grid/comments{/number}","issue_comment_url":"https://api.github.com/repos/uberVU/grid/issues/comments{/number}","contents_url":"https://api.github.com/repos/uberVU/grid/contents/{+path}","compare_url":"https://api.github.com/repos/uberVU/grid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uberVU/grid/merges","archive_url":"https://api.github.com/repos/uberVU/grid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uberVU/grid/downloads","issues_url":"https://api.github.com/repos/uberVU/grid/issues{/number}","pulls_url":"https://api.github.com/repos/uberVU/grid/pulls{/number}","milestones_url":"https://api.github.com/repos/uberVU/grid/milestones{/number}","notifications_url":"https://api.github.com/repos/uberVU/grid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uberVU/grid/labels{/name}","releases_url":"https://api.github.com/repos/uberVU/grid/releases{/id}","created_at":"2013-11-12T15:16:40Z","updated_at":"2015-08-20T14:18:47Z","pushed_at":"2015-08-21T09:38:51Z","git_url":"git://github.com/uberVU/grid.git","ssh_url":"git@github.com:uberVU/grid.git","clone_url":"https://github.com/uberVU/grid.git","svn_url":"https://github.com/uberVU/grid","homepage":"http://ubervu.github.io/grid/","size":1165,"stargazers_count":2760,"watchers_count":2760,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":163,"mirror_url":null,"open_issues_count":19,"forks":163,"open_issues":19,"watchers":2760,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uberVU/grid/pulls/66"},"html":{"href":"https://github.com/uberVU/grid/pull/66"},"issue":{"href":"https://api.github.com/repos/uberVU/grid/issues/66"},"comments":{"href":"https://api.github.com/repos/uberVU/grid/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/uberVU/grid/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/uberVU/grid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uberVU/grid/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/uberVU/grid/statuses/6da3d39bc0fcd9f8c4591e815b5682ae74530857"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"andrei-picus-hs","id":12442713,"avatar_url":"https://avatars.githubusercontent.com/u/12442713?v=3","gravatar_id":"","url":"https://api.github.com/users/andrei-picus-hs","html_url":"https://github.com/andrei-picus-hs","followers_url":"https://api.github.com/users/andrei-picus-hs/followers","following_url":"https://api.github.com/users/andrei-picus-hs/following{/other_user}","gists_url":"https://api.github.com/users/andrei-picus-hs/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-picus-hs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-picus-hs/subscriptions","organizations_url":"https://api.github.com/users/andrei-picus-hs/orgs","repos_url":"https://api.github.com/users/andrei-picus-hs/repos","events_url":"https://api.github.com/users/andrei-picus-hs/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-picus-hs/received_events","type":"User","site_admin":false},"comments":4,"review_comments":0,"commits":1,"additions":13,"deletions":0,"changed_files":2}}