{"action":"closed","number":623,"pull_request":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/623","id":43090065,"html_url":"https://github.com/facebook/AsyncDisplayKit/pull/623","diff_url":"https://github.com/facebook/AsyncDisplayKit/pull/623.diff","patch_url":"https://github.com/facebook/AsyncDisplayKit/pull/623.patch","issue_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/623","number":623,"state":"closed","locked":false,"title":"ASLayoutSpec are temporarily mutable and have a more obj-c interface","user":{"login":"rcancro","id":285809,"avatar_url":"https://avatars.githubusercontent.com/u/285809?v=3","gravatar_id":"","url":"https://api.github.com/users/rcancro","html_url":"https://github.com/rcancro","followers_url":"https://api.github.com/users/rcancro/followers","following_url":"https://api.github.com/users/rcancro/following{/other_user}","gists_url":"https://api.github.com/users/rcancro/gists{/gist_id}","starred_url":"https://api.github.com/users/rcancro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcancro/subscriptions","organizations_url":"https://api.github.com/users/rcancro/orgs","repos_url":"https://api.github.com/users/rcancro/repos","events_url":"https://api.github.com/users/rcancro/events{/privacy}","received_events_url":"https://api.github.com/users/rcancro/received_events","type":"User","site_admin":false},"body":"`ASLayoutSpec` was given an isMutable property the is set to YES on initialization. `ASDisplayNode`'s `calculateLayoutThatFits:` immediately sets this flag to NO upon return of `layoutSpecThatFits`, meaning that the spec is only mutable within `layoutSpecThatFits`.\r\n\r\nThis allows for an easier to work with interface for the layout specs. For example, a stack spec can now be created like:\r\n\r\n```\r\n  ASStackLayoutSpec *stackSpec = [[ASStackLayoutSpec alloc] init];\r\n  stackSpec.direction = ASStackLayoutDirectionHorizontal;\r\n  stackSpec.spacing = kInnerPadding;\r\n  [stackSpec addChildren:@[_imageNode, _textNode]];\r\n```\r\n\r\nI also made the interface more Objective-C like. For example, I replaced all of the class new methods with more objective-c like names:\r\n```\r\n+ (instancetype)newWithInsets:(UIEdgeInsets)insets child:(id<ASLayoutable>)child;\r\n```\r\nbecame:\r\n```\r\n+ (instancetype)insetLayoutSpecWithInsets:(UIEdgeInsets)insets child:(id<ASLayoutable>)child;\r\n``` \r\n\r\nFeedback is welcome! Should `ASLayoutSpec` have an `addChild` method? \r\n\r\nhttps://github.com/facebook/AsyncDisplayKit/issues/605","created_at":"2015-08-21T23:15:02Z","updated_at":"2015-08-23T18:31:07Z","closed_at":"2015-08-23T18:31:07Z","merged_at":"2015-08-23T18:31:07Z","merge_commit_sha":"2e43f8f7cdf6d0e61452f14ac6ded57b00595c0c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/623/commits","review_comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/623/comments","review_comment_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/623/comments","statuses_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/680305704a57be924813a7810daef718cabbb33c","head":{"label":"rcancro:layoutSpec","ref":"layoutSpec","sha":"680305704a57be924813a7810daef718cabbb33c","user":{"login":"rcancro","id":285809,"avatar_url":"https://avatars.githubusercontent.com/u/285809?v=3","gravatar_id":"","url":"https://api.github.com/users/rcancro","html_url":"https://github.com/rcancro","followers_url":"https://api.github.com/users/rcancro/followers","following_url":"https://api.github.com/users/rcancro/following{/other_user}","gists_url":"https://api.github.com/users/rcancro/gists{/gist_id}","starred_url":"https://api.github.com/users/rcancro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcancro/subscriptions","organizations_url":"https://api.github.com/users/rcancro/orgs","repos_url":"https://api.github.com/users/rcancro/repos","events_url":"https://api.github.com/users/rcancro/events{/privacy}","received_events_url":"https://api.github.com/users/rcancro/received_events","type":"User","site_admin":false},"repo":{"id":39976815,"name":"AsyncDisplayKit","full_name":"rcancro/AsyncDisplayKit","owner":{"login":"rcancro","id":285809,"avatar_url":"https://avatars.githubusercontent.com/u/285809?v=3","gravatar_id":"","url":"https://api.github.com/users/rcancro","html_url":"https://github.com/rcancro","followers_url":"https://api.github.com/users/rcancro/followers","following_url":"https://api.github.com/users/rcancro/following{/other_user}","gists_url":"https://api.github.com/users/rcancro/gists{/gist_id}","starred_url":"https://api.github.com/users/rcancro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rcancro/subscriptions","organizations_url":"https://api.github.com/users/rcancro/orgs","repos_url":"https://api.github.com/users/rcancro/repos","events_url":"https://api.github.com/users/rcancro/events{/privacy}","received_events_url":"https://api.github.com/users/rcancro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rcancro/AsyncDisplayKit","description":"Smooth asynchronous user interfaces for iOS apps.","fork":true,"url":"https://api.github.com/repos/rcancro/AsyncDisplayKit","forks_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/forks","keys_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/teams","hooks_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/hooks","issue_events_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/issues/events{/number}","events_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/events","assignees_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/assignees{/user}","branches_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/branches{/branch}","tags_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/tags","blobs_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/git/refs{/sha}","trees_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/statuses/{sha}","languages_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/languages","stargazers_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/stargazers","contributors_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/contributors","subscribers_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/subscribers","subscription_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/subscription","commits_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/commits{/sha}","git_commits_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/git/commits{/sha}","comments_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/comments{/number}","issue_comment_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/issues/comments{/number}","contents_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/contents/{+path}","compare_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/merges","archive_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/downloads","issues_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/issues{/number}","pulls_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/pulls{/number}","milestones_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/milestones{/number}","notifications_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/labels{/name}","releases_url":"https://api.github.com/repos/rcancro/AsyncDisplayKit/releases{/id}","created_at":"2015-07-30T23:28:33Z","updated_at":"2015-07-30T23:28:35Z","pushed_at":"2015-08-23T02:15:12Z","git_url":"git://github.com/rcancro/AsyncDisplayKit.git","ssh_url":"git@github.com:rcancro/AsyncDisplayKit.git","clone_url":"https://github.com/rcancro/AsyncDisplayKit.git","svn_url":"https://github.com/rcancro/AsyncDisplayKit","homepage":"http://asyncdisplaykit.org","size":2384,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"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":"60cf43766b8064ab26832f60df6eba9f27c2e962","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}","created_at":"2014-06-27T05:29:02Z","updated_at":"2015-08-23T17:33:00Z","pushed_at":"2015-08-23T18:31:07Z","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":5872,"stargazers_count":5501,"watchers_count":5501,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":707,"mirror_url":null,"open_issues_count":93,"forks":707,"open_issues":93,"watchers":5501,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/623"},"html":{"href":"https://github.com/facebook/AsyncDisplayKit/pull/623"},"issue":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/623"},"comments":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/623/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/623/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/pulls/623/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/AsyncDisplayKit/statuses/680305704a57be924813a7810daef718cabbb33c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"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},"comments":4,"review_comments":12,"commits":2,"additions":351,"deletions":193,"changed_files":33}}