{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/2348","repository_url":"https://api.github.com/repos/facebook/AsyncDisplayKit","labels_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/2348/labels{/name}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/2348/comments","events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/2348/events","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/2348","id":181274616,"number":2348,"title":"[ASCollectionView] Separate indexPath Spaces More Clearly","user":{"login":"Adlai-Holler","id":2466893,"avatar_url":"https://avatars.githubusercontent.com/u/2466893?v=3","gravatar_id":"","url":"https://api.github.com/users/Adlai-Holler","html_url":"https://github.com/Adlai-Holler","followers_url":"https://api.github.com/users/Adlai-Holler/followers","following_url":"https://api.github.com/users/Adlai-Holler/following{/other_user}","gists_url":"https://api.github.com/users/Adlai-Holler/gists{/gist_id}","starred_url":"https://api.github.com/users/Adlai-Holler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adlai-Holler/subscriptions","organizations_url":"https://api.github.com/users/Adlai-Holler/orgs","repos_url":"https://api.github.com/users/Adlai-Holler/repos","events_url":"https://api.github.com/users/Adlai-Holler/events{/privacy}","received_events_url":"https://api.github.com/users/Adlai-Holler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels/API%20Change","name":"API Change","color":"d93f0b"},{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels/ASCollectionView","name":"ASCollectionView","color":"d4c5f9"},{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels/CLA%20Signed","name":"CLA Signed","color":"bfe5bf"},{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels/pr%20-%20development%20in%20progress","name":"pr - development in progress","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-05T21:48:05Z","updated_at":"2016-10-05T22:09:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/2348","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/2348","diff_url":"https://github.com/facebook/AsyncDisplayKit/pull/2348.diff","patch_url":"https://github.com/facebook/AsyncDisplayKit/pull/2348.patch"},"body":"Users are getting confused when we tell them \"the index paths are out-of-sync\" or \"don't line up.\"\r\n\r\nTo help tackle this major problem, this diff:\r\n- Add failing unit tests for the new behavior.\r\n- Makes `nodeAtIndexPath` and `indexPathForNode` work in the _data source's_ index space, not in the UIKit index space. So immediately after submitting an update, if you call `nodeAtIndexPath:` you'll get the new node.\r\n- Deprecate `calculatedSizeForNodeAtIndexPath`: we should let them get the node and call `calculatedSize` instead – now that the index space distinction is more clear we should centralize all our logic on nodes instead.\r\n- Removes the `indexPath` argument from `collectionView:willDisplayNode:forItemAtIndexPath:` and friends.\r\n   - The `indexPath` was provided by the collection view and would not be correct for accessing their data source.\r\n   - They can always call `indexPathForNode:` to get the data-source index path for the node, if needed. If the item for the node has been deleted from the collection view i.e. no longer exists in the data source, they'll get nil back. It's a bummer, but c'est la vie. The delegate will probably still want to know that a given node is being displayed, even if it no longer corresponds to an item.\r\n- Add some assertions about what happens on main vs on editing queue. These are all pretty safe I believe, and are mostly there for documentation/regression-proofing.\r\n- Add supplementary nodes into our collection view tests.\r\n\r\n**NOTE**: I have added a unit test for similar behavior to be applied to supplementary nodes. This diff is already big enough just handling it for rows/items, so the unit test is disabled and I will enable it + the feature in a follow-up diff.\r\n\r\nReady for review @nguyenhuy @appleguy @maicki @garrettmoon !"},"comment":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/comments/251814236","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/2348#issuecomment-251814236","issue_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/2348","id":251814236,"user":{"login":"Adlai-Holler","id":2466893,"avatar_url":"https://avatars.githubusercontent.com/u/2466893?v=3","gravatar_id":"","url":"https://api.github.com/users/Adlai-Holler","html_url":"https://github.com/Adlai-Holler","followers_url":"https://api.github.com/users/Adlai-Holler/followers","following_url":"https://api.github.com/users/Adlai-Holler/following{/other_user}","gists_url":"https://api.github.com/users/Adlai-Holler/gists{/gist_id}","starred_url":"https://api.github.com/users/Adlai-Holler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Adlai-Holler/subscriptions","organizations_url":"https://api.github.com/users/Adlai-Holler/orgs","repos_url":"https://api.github.com/users/Adlai-Holler/repos","events_url":"https://api.github.com/users/Adlai-Holler/events{/privacy}","received_events_url":"https://api.github.com/users/Adlai-Holler/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T22:09:28Z","updated_at":"2016-10-05T22:09:28Z","body":"@appleguy @maicki @garrettmoon Well, the plan to completely hide UIKit index paths is a no-go  because `UICollectionViewLayout` subclasses will want to get nodes in their index space, which is the UIKit index space.\r\n\r\nSo if we have to expose them, we should come up with a public-facing name for the \"completed\" set or the \"UIKit\" set. The current implementation uses the word `Completed` which is pretty to look at but somewhat vague. We should obviously beef up the documentation about this, but simultaneously come up with good consistent words for these two spaces.\r\n\r\nIdeas?"}}
{"actor":{"display_login":"Adlai-Holler"}}