{"action":"closed","number":4825,"pull_request":{"url":"https://api.github.com/repos/handsontable/handsontable/pulls/4825","id":170186365,"html_url":"https://github.com/handsontable/handsontable/pull/4825","diff_url":"https://github.com/handsontable/handsontable/pull/4825.diff","patch_url":"https://github.com/handsontable/handsontable/pull/4825.patch","issue_url":"https://api.github.com/repos/handsontable/handsontable/issues/4825","number":4825,"state":"closed","locked":false,"title":"Make the `alter` method more stable when group of indexes are used","user":{"login":"budnix","id":571316,"avatar_url":"https://avatars0.githubusercontent.com/u/571316?v=4","gravatar_id":"","url":"https://api.github.com/users/budnix","html_url":"https://github.com/budnix","followers_url":"https://api.github.com/users/budnix/followers","following_url":"https://api.github.com/users/budnix/following{/other_user}","gists_url":"https://api.github.com/users/budnix/gists{/gist_id}","starred_url":"https://api.github.com/users/budnix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/budnix/subscriptions","organizations_url":"https://api.github.com/users/budnix/orgs","repos_url":"https://api.github.com/users/budnix/repos","events_url":"https://api.github.com/users/budnix/events{/privacy}","received_events_url":"https://api.github.com/users/budnix/received_events","type":"User","site_admin":false},"body":"### Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\nTo make the `hot.alter` method less buggy the normalization algorithm for a group of indexes is added. This change allows passing unordered with intersection indexes to the `hot.alter` method.\r\n\r\n### How has this been tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\nThis was tested by removing rows and columns through API using several combinations of the group of the indexes. Since 0.36.0 the `alter` method supports removing rows and columns using an array of arrays like `[[index, amount], [index, amount]...]` but only in an orderly manner.\r\n\r\nThis PR extends that method in how the group of the indexes should be created and support passing them in an unordered way. Additionally, the normalization internally tries to simplify the passed collection by grouping the collection into continuous values.\r\n\r\nFor instance, this group `[[11, 1], [4, 2], [5, 5], [1, 3]]` will be transformed to `[[1, 9], [11, 1]]`.\r\n```\r\n                 5-------5\r\ninput:   1---3 4-2             11\r\nrows:  1 2 3 4 5 6 7 8 9 10 11 12 13 14\r\noutput: [[1, 9], [11, 1]]\r\n```\r\n\r\n### Types of changes\r\n<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->\r\n- [x] Bug fix (non-breaking change which fixes an issue)\r\n\r\n### Related issue(s):\r\n1. #4815\r\n\r\n### Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] My code follows the code style of this project,\r\n- [x] My change requires a change to the documentation.\r\n","created_at":"2018-02-20T13:04:20Z","updated_at":"2018-02-21T14:06:40Z","closed_at":"2018-02-21T14:06:40Z","merged_at":"2018-02-21T14:06:40Z","merge_commit_sha":"df08619db6aa3d366ca3a02d5dc0063eb846f874","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/handsontable/handsontable/pulls/4825/commits","review_comments_url":"https://api.github.com/repos/handsontable/handsontable/pulls/4825/comments","review_comment_url":"https://api.github.com/repos/handsontable/handsontable/pulls/comments{/number}","comments_url":"https://api.github.com/repos/handsontable/handsontable/issues/4825/comments","statuses_url":"https://api.github.com/repos/handsontable/handsontable/statuses/29bd5b8f2dd58097571549dff903fb56afca68d0","head":{"label":"handsontable:feature/issue-4815","ref":"feature/issue-4815","sha":"29bd5b8f2dd58097571549dff903fb56afca68d0","user":{"login":"handsontable","id":8068250,"avatar_url":"https://avatars3.githubusercontent.com/u/8068250?v=4","gravatar_id":"","url":"https://api.github.com/users/handsontable","html_url":"https://github.com/handsontable","followers_url":"https://api.github.com/users/handsontable/followers","following_url":"https://api.github.com/users/handsontable/following{/other_user}","gists_url":"https://api.github.com/users/handsontable/gists{/gist_id}","starred_url":"https://api.github.com/users/handsontable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/handsontable/subscriptions","organizations_url":"https://api.github.com/users/handsontable/orgs","repos_url":"https://api.github.com/users/handsontable/repos","events_url":"https://api.github.com/users/handsontable/events{/privacy}","received_events_url":"https://api.github.com/users/handsontable/received_events","type":"Organization","site_admin":false},"repo":{"id":1790564,"name":"handsontable","full_name":"handsontable/handsontable","owner":{"login":"handsontable","id":8068250,"avatar_url":"https://avatars3.githubusercontent.com/u/8068250?v=4","gravatar_id":"","url":"https://api.github.com/users/handsontable","html_url":"https://github.com/handsontable","followers_url":"https://api.github.com/users/handsontable/followers","following_url":"https://api.github.com/users/handsontable/following{/other_user}","gists_url":"https://api.github.com/users/handsontable/gists{/gist_id}","starred_url":"https://api.github.com/users/handsontable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/handsontable/subscriptions","organizations_url":"https://api.github.com/users/handsontable/orgs","repos_url":"https://api.github.com/users/handsontable/repos","events_url":"https://api.github.com/users/handsontable/events{/privacy}","received_events_url":"https://api.github.com/users/handsontable/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/handsontable/handsontable","description":"Handsontable Community Edition - JavaScript/HTML5 Spreadsheet Component for Web Apps","fork":false,"url":"https://api.github.com/repos/handsontable/handsontable","forks_url":"https://api.github.com/repos/handsontable/handsontable/forks","keys_url":"https://api.github.com/repos/handsontable/handsontable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/handsontable/handsontable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/handsontable/handsontable/teams","hooks_url":"https://api.github.com/repos/handsontable/handsontable/hooks","issue_events_url":"https://api.github.com/repos/handsontable/handsontable/issues/events{/number}","events_url":"https://api.github.com/repos/handsontable/handsontable/events","assignees_url":"https://api.github.com/repos/handsontable/handsontable/assignees{/user}","branches_url":"https://api.github.com/repos/handsontable/handsontable/branches{/branch}","tags_url":"https://api.github.com/repos/handsontable/handsontable/tags","blobs_url":"https://api.github.com/repos/handsontable/handsontable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/handsontable/handsontable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/handsontable/handsontable/git/refs{/sha}","trees_url":"https://api.github.com/repos/handsontable/handsontable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/handsontable/handsontable/statuses/{sha}","languages_url":"https://api.github.com/repos/handsontable/handsontable/languages","stargazers_url":"https://api.github.com/repos/handsontable/handsontable/stargazers","contributors_url":"https://api.github.com/repos/handsontable/handsontable/contributors","subscribers_url":"https://api.github.com/repos/handsontable/handsontable/subscribers","subscription_url":"https://api.github.com/repos/handsontable/handsontable/subscription","commits_url":"https://api.github.com/repos/handsontable/handsontable/commits{/sha}","git_commits_url":"https://api.github.com/repos/handsontable/handsontable/git/commits{/sha}","comments_url":"https://api.github.com/repos/handsontable/handsontable/comments{/number}","issue_comment_url":"https://api.github.com/repos/handsontable/handsontable/issues/comments{/number}","contents_url":"https://api.github.com/repos/handsontable/handsontable/contents/{+path}","compare_url":"https://api.github.com/repos/handsontable/handsontable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/handsontable/handsontable/merges","archive_url":"https://api.github.com/repos/handsontable/handsontable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/handsontable/handsontable/downloads","issues_url":"https://api.github.com/repos/handsontable/handsontable/issues{/number}","pulls_url":"https://api.github.com/repos/handsontable/handsontable/pulls{/number}","milestones_url":"https://api.github.com/repos/handsontable/handsontable/milestones{/number}","notifications_url":"https://api.github.com/repos/handsontable/handsontable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/handsontable/handsontable/labels{/name}","releases_url":"https://api.github.com/repos/handsontable/handsontable/releases{/id}","deployments_url":"https://api.github.com/repos/handsontable/handsontable/deployments","created_at":"2011-05-23T22:38:58Z","updated_at":"2018-02-21T10:50:46Z","pushed_at":"2018-02-21T14:06:40Z","git_url":"git://github.com/handsontable/handsontable.git","ssh_url":"git@github.com:handsontable/handsontable.git","clone_url":"https://github.com/handsontable/handsontable.git","svn_url":"https://github.com/handsontable/handsontable","homepage":"https://handsontable.com","size":49609,"stargazers_count":9347,"watchers_count":9347,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1933,"mirror_url":null,"archived":false,"open_issues_count":493,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1933,"open_issues":493,"watchers":9347,"default_branch":"master"}},"base":{"label":"handsontable:develop","ref":"develop","sha":"ae7e5079d504bf35c78b65618e05b091091cbac4","user":{"login":"handsontable","id":8068250,"avatar_url":"https://avatars3.githubusercontent.com/u/8068250?v=4","gravatar_id":"","url":"https://api.github.com/users/handsontable","html_url":"https://github.com/handsontable","followers_url":"https://api.github.com/users/handsontable/followers","following_url":"https://api.github.com/users/handsontable/following{/other_user}","gists_url":"https://api.github.com/users/handsontable/gists{/gist_id}","starred_url":"https://api.github.com/users/handsontable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/handsontable/subscriptions","organizations_url":"https://api.github.com/users/handsontable/orgs","repos_url":"https://api.github.com/users/handsontable/repos","events_url":"https://api.github.com/users/handsontable/events{/privacy}","received_events_url":"https://api.github.com/users/handsontable/received_events","type":"Organization","site_admin":false},"repo":{"id":1790564,"name":"handsontable","full_name":"handsontable/handsontable","owner":{"login":"handsontable","id":8068250,"avatar_url":"https://avatars3.githubusercontent.com/u/8068250?v=4","gravatar_id":"","url":"https://api.github.com/users/handsontable","html_url":"https://github.com/handsontable","followers_url":"https://api.github.com/users/handsontable/followers","following_url":"https://api.github.com/users/handsontable/following{/other_user}","gists_url":"https://api.github.com/users/handsontable/gists{/gist_id}","starred_url":"https://api.github.com/users/handsontable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/handsontable/subscriptions","organizations_url":"https://api.github.com/users/handsontable/orgs","repos_url":"https://api.github.com/users/handsontable/repos","events_url":"https://api.github.com/users/handsontable/events{/privacy}","received_events_url":"https://api.github.com/users/handsontable/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/handsontable/handsontable","description":"Handsontable Community Edition - JavaScript/HTML5 Spreadsheet Component for Web Apps","fork":false,"url":"https://api.github.com/repos/handsontable/handsontable","forks_url":"https://api.github.com/repos/handsontable/handsontable/forks","keys_url":"https://api.github.com/repos/handsontable/handsontable/keys{/key_id}","collaborators_url":"https://api.github.com/repos/handsontable/handsontable/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/handsontable/handsontable/teams","hooks_url":"https://api.github.com/repos/handsontable/handsontable/hooks","issue_events_url":"https://api.github.com/repos/handsontable/handsontable/issues/events{/number}","events_url":"https://api.github.com/repos/handsontable/handsontable/events","assignees_url":"https://api.github.com/repos/handsontable/handsontable/assignees{/user}","branches_url":"https://api.github.com/repos/handsontable/handsontable/branches{/branch}","tags_url":"https://api.github.com/repos/handsontable/handsontable/tags","blobs_url":"https://api.github.com/repos/handsontable/handsontable/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/handsontable/handsontable/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/handsontable/handsontable/git/refs{/sha}","trees_url":"https://api.github.com/repos/handsontable/handsontable/git/trees{/sha}","statuses_url":"https://api.github.com/repos/handsontable/handsontable/statuses/{sha}","languages_url":"https://api.github.com/repos/handsontable/handsontable/languages","stargazers_url":"https://api.github.com/repos/handsontable/handsontable/stargazers","contributors_url":"https://api.github.com/repos/handsontable/handsontable/contributors","subscribers_url":"https://api.github.com/repos/handsontable/handsontable/subscribers","subscription_url":"https://api.github.com/repos/handsontable/handsontable/subscription","commits_url":"https://api.github.com/repos/handsontable/handsontable/commits{/sha}","git_commits_url":"https://api.github.com/repos/handsontable/handsontable/git/commits{/sha}","comments_url":"https://api.github.com/repos/handsontable/handsontable/comments{/number}","issue_comment_url":"https://api.github.com/repos/handsontable/handsontable/issues/comments{/number}","contents_url":"https://api.github.com/repos/handsontable/handsontable/contents/{+path}","compare_url":"https://api.github.com/repos/handsontable/handsontable/compare/{base}...{head}","merges_url":"https://api.github.com/repos/handsontable/handsontable/merges","archive_url":"https://api.github.com/repos/handsontable/handsontable/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/handsontable/handsontable/downloads","issues_url":"https://api.github.com/repos/handsontable/handsontable/issues{/number}","pulls_url":"https://api.github.com/repos/handsontable/handsontable/pulls{/number}","milestones_url":"https://api.github.com/repos/handsontable/handsontable/milestones{/number}","notifications_url":"https://api.github.com/repos/handsontable/handsontable/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/handsontable/handsontable/labels{/name}","releases_url":"https://api.github.com/repos/handsontable/handsontable/releases{/id}","deployments_url":"https://api.github.com/repos/handsontable/handsontable/deployments","created_at":"2011-05-23T22:38:58Z","updated_at":"2018-02-21T10:50:46Z","pushed_at":"2018-02-21T14:06:40Z","git_url":"git://github.com/handsontable/handsontable.git","ssh_url":"git@github.com:handsontable/handsontable.git","clone_url":"https://github.com/handsontable/handsontable.git","svn_url":"https://github.com/handsontable/handsontable","homepage":"https://handsontable.com","size":49609,"stargazers_count":9347,"watchers_count":9347,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1933,"mirror_url":null,"archived":false,"open_issues_count":493,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1933,"open_issues":493,"watchers":9347,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/handsontable/handsontable/pulls/4825"},"html":{"href":"https://github.com/handsontable/handsontable/pull/4825"},"issue":{"href":"https://api.github.com/repos/handsontable/handsontable/issues/4825"},"comments":{"href":"https://api.github.com/repos/handsontable/handsontable/issues/4825/comments"},"review_comments":{"href":"https://api.github.com/repos/handsontable/handsontable/pulls/4825/comments"},"review_comment":{"href":"https://api.github.com/repos/handsontable/handsontable/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/handsontable/handsontable/pulls/4825/commits"},"statuses":{"href":"https://api.github.com/repos/handsontable/handsontable/statuses/29bd5b8f2dd58097571549dff903fb56afca68d0"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"budnix","id":571316,"avatar_url":"https://avatars0.githubusercontent.com/u/571316?v=4","gravatar_id":"","url":"https://api.github.com/users/budnix","html_url":"https://github.com/budnix","followers_url":"https://api.github.com/users/budnix/followers","following_url":"https://api.github.com/users/budnix/following{/other_user}","gists_url":"https://api.github.com/users/budnix/gists{/gist_id}","starred_url":"https://api.github.com/users/budnix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/budnix/subscriptions","organizations_url":"https://api.github.com/users/budnix/orgs","repos_url":"https://api.github.com/users/budnix/repos","events_url":"https://api.github.com/users/budnix/events{/privacy}","received_events_url":"https://api.github.com/users/budnix/received_events","type":"User","site_admin":false},"comments":0,"review_comments":2,"maintainer_can_modify":false,"commits":4,"additions":400,"deletions":48,"changed_files":4}}
{"actor":{"display_login":"budnix"}}