{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments/69672804","id":69672804,"diff_hunk":"@@ -122,6 +124,12 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) {\n \n @end\n \n+@interface ASCellNode (Deprecated)","path":"AsyncDisplayKit/ASCellNode.h","position":25,"original_position":25,"commit_id":"3994f2089c0ef7e8881522e5baf77fa103488e08","original_commit_id":"3994f2089c0ef7e8881522e5baf77fa103488e08","user":{"login":"appleguy","id":565251,"avatar_url":"https://avatars.githubusercontent.com/u/565251?v=3","gravatar_id":"","url":"https://api.github.com/users/appleguy","html_url":"https://github.com/appleguy","followers_url":"https://api.github.com/users/appleguy/followers","following_url":"https://api.github.com/users/appleguy/following{/other_user}","gists_url":"https://api.github.com/users/appleguy/gists{/gist_id}","starred_url":"https://api.github.com/users/appleguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appleguy/subscriptions","organizations_url":"https://api.github.com/users/appleguy/orgs","repos_url":"https://api.github.com/users/appleguy/repos","events_url":"https://api.github.com/users/appleguy/events{/privacy}","received_events_url":"https://api.github.com/users/appleguy/received_events","type":"User","site_admin":false},"body":"Could you add a comment above this saying:\r\n\r\n// Previous versions of ASDK did not include \"is\" in the name of the getter for these properties.\r\n// These older accessor methods don't match UIKit naming, and will be removed in a future version.","created_at":"2016-07-06T04:06:13Z","updated_at":"2016-07-06T04:06:13Z","html_url":"https://github.com/facebook/AsyncDisplayKit/pull/1816#discussion_r69672804","pull_request_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1816","_links":{"self":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments/69672804"},"html":{"href":"https://github.com/facebook/AsyncDisplayKit/pull/1816#discussion_r69672804"},"pull_request":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1816"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1816","id":75198836,"html_url":"https://github.com/facebook/AsyncDisplayKit/pull/1816","diff_url":"https://github.com/facebook/AsyncDisplayKit/pull/1816.diff","patch_url":"https://github.com/facebook/AsyncDisplayKit/pull/1816.patch","issue_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1816","number":1816,"state":"open","locked":false,"title":"[ASCellNode] Fix selection / highlight implementation","user":{"login":"hannahmbanana","id":3419380,"avatar_url":"https://avatars.githubusercontent.com/u/3419380?v=3","gravatar_id":"","url":"https://api.github.com/users/hannahmbanana","html_url":"https://github.com/hannahmbanana","followers_url":"https://api.github.com/users/hannahmbanana/followers","following_url":"https://api.github.com/users/hannahmbanana/following{/other_user}","gists_url":"https://api.github.com/users/hannahmbanana/gists{/gist_id}","starred_url":"https://api.github.com/users/hannahmbanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannahmbanana/subscriptions","organizations_url":"https://api.github.com/users/hannahmbanana/orgs","repos_url":"https://api.github.com/users/hannahmbanana/repos","events_url":"https://api.github.com/users/hannahmbanana/events{/privacy}","received_events_url":"https://api.github.com/users/hannahmbanana/received_events","type":"User","site_admin":false},"body":"Addresses Issue #892:\r\n\r\nThe issue is that two truths existed for the selected/highlighted state of the collection / table:\r\n1. UIKit retains the selected / highlighted states of its cells, even as they are reused (e.g. it saves these values as cells move offscreen so they can be reset once a cell is comes back onscreen).\r\n2. ASCellNode hold their selected / highlight state in their own properties as well.\r\n\r\nWhen a UIKit _ASCollectionViewCell has its node reset as it comes back onscreen, it copies the UIKit cell values and overwrites the selected / highlighted state on the ASCellNode. This fact combined with the fact that setting selected / highlighted on the node, had no mechanism to change the UIKit selected state, meant that it is currently not possible to change the actual selected state by setting on the node. \r\n\r\nI believe the reason this hadn't been noticed, is because the most common use of the ASCellNode selection occurring by user touch, not to change the selection state of the node programatically. For programmatic selection, developers usually call the collection / table select / deselect method. So even though this pattern is uncommon, thankfully one community member noticed it!\r\n\r\nImplementation:\r\n- Renamed ASCellNodeLayoutDelegate to ASCellNodeInteractionDelegate \r\n- Added 2 new methods to the delegate which are called by ASCellNode when selected / highlighted are set.\r\n- Delegate (table / collection) then calls selectItemAtIndexPath / deslectItemAtIndexPath\r\n- Added conditions to chekc if the value provided to setSelected: / setHighlighted: has actually changed in order to avoid duplicate calls. \r\n- Changed ASCellNode getter methods to be consistent with UIKit's naming:  isSelected / isHighlighted (deprecated the other versions)\r\n- yay unit tests!","created_at":"2016-06-25T07:45:28Z","updated_at":"2016-07-06T04:06:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"487e9fcecc69fd1be5e4a1e35f03738a90a3ee3e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1816/commits","review_comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1816/comments","review_comment_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1816/comments","statuses_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/3994f2089c0ef7e8881522e5baf77fa103488e08","head":{"label":"hannahmbanana:selectionBug","ref":"selectionBug","sha":"3994f2089c0ef7e8881522e5baf77fa103488e08","user":{"login":"hannahmbanana","id":3419380,"avatar_url":"https://avatars.githubusercontent.com/u/3419380?v=3","gravatar_id":"","url":"https://api.github.com/users/hannahmbanana","html_url":"https://github.com/hannahmbanana","followers_url":"https://api.github.com/users/hannahmbanana/followers","following_url":"https://api.github.com/users/hannahmbanana/following{/other_user}","gists_url":"https://api.github.com/users/hannahmbanana/gists{/gist_id}","starred_url":"https://api.github.com/users/hannahmbanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannahmbanana/subscriptions","organizations_url":"https://api.github.com/users/hannahmbanana/orgs","repos_url":"https://api.github.com/users/hannahmbanana/repos","events_url":"https://api.github.com/users/hannahmbanana/events{/privacy}","received_events_url":"https://api.github.com/users/hannahmbanana/received_events","type":"User","site_admin":false},"repo":{"id":37820758,"name":"AsyncDisplayKit","full_name":"hannahmbanana/AsyncDisplayKit","owner":{"login":"hannahmbanana","id":3419380,"avatar_url":"https://avatars.githubusercontent.com/u/3419380?v=3","gravatar_id":"","url":"https://api.github.com/users/hannahmbanana","html_url":"https://github.com/hannahmbanana","followers_url":"https://api.github.com/users/hannahmbanana/followers","following_url":"https://api.github.com/users/hannahmbanana/following{/other_user}","gists_url":"https://api.github.com/users/hannahmbanana/gists{/gist_id}","starred_url":"https://api.github.com/users/hannahmbanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannahmbanana/subscriptions","organizations_url":"https://api.github.com/users/hannahmbanana/orgs","repos_url":"https://api.github.com/users/hannahmbanana/repos","events_url":"https://api.github.com/users/hannahmbanana/events{/privacy}","received_events_url":"https://api.github.com/users/hannahmbanana/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hannahmbanana/AsyncDisplayKit","description":"Smooth asynchronous user interfaces for iOS apps.","fork":true,"url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit","forks_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/forks","keys_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/teams","hooks_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/hooks","issue_events_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/issues/events{/number}","events_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/events","assignees_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/assignees{/user}","branches_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/branches{/branch}","tags_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/tags","blobs_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/statuses/{sha}","languages_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/languages","stargazers_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/stargazers","contributors_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/contributors","subscribers_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/subscribers","subscription_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/subscription","commits_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/contents/{+path}","compare_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/merges","archive_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/downloads","issues_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/issues{/number}","pulls_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/pulls{/number}","milestones_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/milestones{/number}","notifications_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/labels{/name}","releases_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/releases{/id}","deployments_url":"https://api.github.com/repos/hannahmbanana/AsyncDisplayKit/deployments","created_at":"2015-06-21T18:34:33Z","updated_at":"2016-05-07T08:02:33Z","pushed_at":"2016-07-06T00:47:41Z","git_url":"git://github.com/hannahmbanana/AsyncDisplayKit.git","ssh_url":"git@github.com:hannahmbanana/AsyncDisplayKit.git","clone_url":"https://github.com/hannahmbanana/AsyncDisplayKit.git","svn_url":"https://github.com/hannahmbanana/AsyncDisplayKit","homepage":"http://asyncdisplaykit.org","size":50858,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"d8c0253321f8306eeb087017d3d610db6a8635a8","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":21265042,"name":"AsyncDisplayKit","full_name":"facebook/AsyncDisplayKit","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/AsyncDisplayKit","description":"Smooth asynchronous user interfaces for iOS apps.","fork":false,"url":"https://api.github.com/repos/facebook/AsyncDisplayKit","forks_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/forks","keys_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/teams","hooks_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/hooks","issue_events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/events","assignees_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/tags","blobs_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/languages","stargazers_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/stargazers","contributors_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/contributors","subscribers_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/subscribers","subscription_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/subscription","commits_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/merges","archive_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/downloads","issues_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/labels{/name}","releases_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/deployments","created_at":"2014-06-27T05:29:02Z","updated_at":"2016-07-06T03:42:14Z","pushed_at":"2016-07-06T01:48:17Z","git_url":"git://github.com/facebook/AsyncDisplayKit.git","ssh_url":"git@github.com:facebook/AsyncDisplayKit.git","clone_url":"https://github.com/facebook/AsyncDisplayKit.git","svn_url":"https://github.com/facebook/AsyncDisplayKit","homepage":"http://asyncdisplaykit.org","size":62168,"stargazers_count":8589,"watchers_count":8589,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1443,"mirror_url":null,"open_issues_count":118,"forks":1443,"open_issues":118,"watchers":8589,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1816"},"html":{"href":"https://github.com/facebook/AsyncDisplayKit/pull/1816"},"issue":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1816"},"comments":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1816/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1816/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/1816/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/3994f2089c0ef7e8881522e5baf77fa103488e08"}}}}
{"actor":{"display_login":"appleguy"}}