{"action":"created","comment":{"url":"https://api.github.com/repos/material-components/material-components-ios/pulls/comments/295583542","pull_request_review_id":252044592,"id":295583542,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5NTU4MzU0Mg==","diff_hunk":"@@ -16,4 +16,51 @@\n \n @implementation MDCTabBarView\n \n+#pragma mark - Properties\n+\n+- (void)setItems:(NSArray<UITabBarItem *> *)items {\n+  NSAssert([NSThread isMainThread], @\"Item array may only be set on the main thread\");\n+  NSParameterAssert(items != nil);\n+\n+  if (_items != items && ![_items isEqual:items]) {\n+    _items = [items copy];\n+\n+    // Determine new selected item, defaulting to the first item.\n+    UITabBarItem *newSelectedItem = _items.firstObject;","path":"components/Tabs2/src/MDCTabBarView.m","position":14,"original_position":14,"commit_id":"fcc5382c9e5cdfa5777369af37525c0e7693894f","original_commit_id":"fcc5382c9e5cdfa5777369af37525c0e7693894f","user":{"login":"jverkoey","id":45670,"node_id":"MDQ6VXNlcjQ1Njcw","avatar_url":"https://avatars0.githubusercontent.com/u/45670?v=4","gravatar_id":"","url":"https://api.github.com/users/jverkoey","html_url":"https://github.com/jverkoey","followers_url":"https://api.github.com/users/jverkoey/followers","following_url":"https://api.github.com/users/jverkoey/following{/other_user}","gists_url":"https://api.github.com/users/jverkoey/gists{/gist_id}","starred_url":"https://api.github.com/users/jverkoey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jverkoey/subscriptions","organizations_url":"https://api.github.com/users/jverkoey/orgs","repos_url":"https://api.github.com/users/jverkoey/repos","events_url":"https://api.github.com/users/jverkoey/events{/privacy}","received_events_url":"https://api.github.com/users/jverkoey/received_events","type":"User","site_admin":false},"body":"Something like so, just for consistency validation in terms of expected behavior:\r\n\r\n```objc\r\n- (void)testUITabBarSelectedItemBecomesNilWhenRemovedFromItems {\r\n  // Given\r\n  UITabBar *tabBar = [[UITabBar alloc] initWithFrame:CGRectZero];\r\n  UITabBarItem * item1 = [[UITabBarItem alloc] initWithTitle:@\"Hi\" image:nil tag:1];\r\n  UITabBarItem * item2 = [[UITabBarItem alloc] initWithTitle:@\"Hi\" image:nil tag:2];\r\n  UITabBarItem * item3 = [[UITabBarItem alloc] initWithTitle:@\"Hi\" image:nil tag:3];\r\n  tabBar.items = @[item1, item2 ];\r\n  tabBar.selectedItem = item1;\r\n\r\n  // When\r\n  tabBar.items = @[item1 ];\r\n\r\n  // Then\r\n  XCTAssertNil(tabBar.selectedItem);\r\n```","created_at":"2019-06-20T01:28:19Z","updated_at":"2019-06-20T01:28:19Z","html_url":"https://github.com/material-components/material-components-ios/pull/7656#discussion_r295583542","pull_request_url":"https://api.github.com/repos/material-components/material-components-ios/pulls/7656","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/comments/295583542"},"html":{"href":"https://github.com/material-components/material-components-ios/pull/7656#discussion_r295583542"},"pull_request":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/7656"}},"in_reply_to_id":295564418},"pull_request":{"url":"https://api.github.com/repos/material-components/material-components-ios/pulls/7656","id":289912494,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjg5OTEyNDk0","html_url":"https://github.com/material-components/material-components-ios/pull/7656","diff_url":"https://github.com/material-components/material-components-ios/pull/7656.diff","patch_url":"https://github.com/material-components/material-components-ios/pull/7656.patch","issue_url":"https://api.github.com/repos/material-components/material-components-ios/issues/7656","number":7656,"state":"open","locked":false,"title":"[Tabs2] Add items and selectedItems API to the MDCTabBarView","user":{"login":"leonmz","id":16440801,"node_id":"MDQ6VXNlcjE2NDQwODAx","avatar_url":"https://avatars1.githubusercontent.com/u/16440801?v=4","gravatar_id":"","url":"https://api.github.com/users/leonmz","html_url":"https://github.com/leonmz","followers_url":"https://api.github.com/users/leonmz/followers","following_url":"https://api.github.com/users/leonmz/following{/other_user}","gists_url":"https://api.github.com/users/leonmz/gists{/gist_id}","starred_url":"https://api.github.com/users/leonmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonmz/subscriptions","organizations_url":"https://api.github.com/users/leonmz/orgs","repos_url":"https://api.github.com/users/leonmz/repos","events_url":"https://api.github.com/users/leonmz/events{/privacy}","received_events_url":"https://api.github.com/users/leonmz/received_events","type":"User","site_admin":false},"body":"Implement the items and selectedItems properties in the MDCTabBarView.\r\nAdds test for these two properties.\r\n\r\ncloses #7646 ","created_at":"2019-06-19T23:22:55Z","updated_at":"2019-06-20T01:28:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"06749d05e80537ec47d8ef6c73064692f1ec8faa","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mikefan1991","id":14349592,"node_id":"MDQ6VXNlcjE0MzQ5NTky","avatar_url":"https://avatars2.githubusercontent.com/u/14349592?v=4","gravatar_id":"","url":"https://api.github.com/users/mikefan1991","html_url":"https://github.com/mikefan1991","followers_url":"https://api.github.com/users/mikefan1991/followers","following_url":"https://api.github.com/users/mikefan1991/following{/other_user}","gists_url":"https://api.github.com/users/mikefan1991/gists{/gist_id}","starred_url":"https://api.github.com/users/mikefan1991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikefan1991/subscriptions","organizations_url":"https://api.github.com/users/mikefan1991/orgs","repos_url":"https://api.github.com/users/mikefan1991/repos","events_url":"https://api.github.com/users/mikefan1991/events{/privacy}","received_events_url":"https://api.github.com/users/mikefan1991/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1413409568,"node_id":"MDU6TGFiZWwxNDEzNDA5NTY4","url":"https://api.github.com/repos/material-components/material-components-ios/labels/[Tabs2]","name":"[Tabs2]","color":"ededed","default":false},{"id":273191333,"node_id":"MDU6TGFiZWwyNzMxOTEzMzM=","url":"https://api.github.com/repos/material-components/material-components-ios/labels/cla:%20yes","name":"cla: yes","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/material-components/material-components-ios/pulls/7656/commits","review_comments_url":"https://api.github.com/repos/material-components/material-components-ios/pulls/7656/comments","review_comment_url":"https://api.github.com/repos/material-components/material-components-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/material-components/material-components-ios/issues/7656/comments","statuses_url":"https://api.github.com/repos/material-components/material-components-ios/statuses/fcc5382c9e5cdfa5777369af37525c0e7693894f","head":{"label":"leonmz:addSelectAPI","ref":"addSelectAPI","sha":"fcc5382c9e5cdfa5777369af37525c0e7693894f","user":{"login":"leonmz","id":16440801,"node_id":"MDQ6VXNlcjE2NDQwODAx","avatar_url":"https://avatars1.githubusercontent.com/u/16440801?v=4","gravatar_id":"","url":"https://api.github.com/users/leonmz","html_url":"https://github.com/leonmz","followers_url":"https://api.github.com/users/leonmz/followers","following_url":"https://api.github.com/users/leonmz/following{/other_user}","gists_url":"https://api.github.com/users/leonmz/gists{/gist_id}","starred_url":"https://api.github.com/users/leonmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonmz/subscriptions","organizations_url":"https://api.github.com/users/leonmz/orgs","repos_url":"https://api.github.com/users/leonmz/repos","events_url":"https://api.github.com/users/leonmz/events{/privacy}","received_events_url":"https://api.github.com/users/leonmz/received_events","type":"User","site_admin":false},"repo":{"id":192787553,"node_id":"MDEwOlJlcG9zaXRvcnkxOTI3ODc1NTM=","name":"material-components-ios","full_name":"leonmz/material-components-ios","private":false,"owner":{"login":"leonmz","id":16440801,"node_id":"MDQ6VXNlcjE2NDQwODAx","avatar_url":"https://avatars1.githubusercontent.com/u/16440801?v=4","gravatar_id":"","url":"https://api.github.com/users/leonmz","html_url":"https://github.com/leonmz","followers_url":"https://api.github.com/users/leonmz/followers","following_url":"https://api.github.com/users/leonmz/following{/other_user}","gists_url":"https://api.github.com/users/leonmz/gists{/gist_id}","starred_url":"https://api.github.com/users/leonmz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leonmz/subscriptions","organizations_url":"https://api.github.com/users/leonmz/orgs","repos_url":"https://api.github.com/users/leonmz/repos","events_url":"https://api.github.com/users/leonmz/events{/privacy}","received_events_url":"https://api.github.com/users/leonmz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/leonmz/material-components-ios","description":"Modular and customizable Material Design UI components for iOS","fork":true,"url":"https://api.github.com/repos/leonmz/material-components-ios","forks_url":"https://api.github.com/repos/leonmz/material-components-ios/forks","keys_url":"https://api.github.com/repos/leonmz/material-components-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/leonmz/material-components-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/leonmz/material-components-ios/teams","hooks_url":"https://api.github.com/repos/leonmz/material-components-ios/hooks","issue_events_url":"https://api.github.com/repos/leonmz/material-components-ios/issues/events{/number}","events_url":"https://api.github.com/repos/leonmz/material-components-ios/events","assignees_url":"https://api.github.com/repos/leonmz/material-components-ios/assignees{/user}","branches_url":"https://api.github.com/repos/leonmz/material-components-ios/branches{/branch}","tags_url":"https://api.github.com/repos/leonmz/material-components-ios/tags","blobs_url":"https://api.github.com/repos/leonmz/material-components-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/leonmz/material-components-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/leonmz/material-components-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/leonmz/material-components-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/leonmz/material-components-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/leonmz/material-components-ios/languages","stargazers_url":"https://api.github.com/repos/leonmz/material-components-ios/stargazers","contributors_url":"https://api.github.com/repos/leonmz/material-components-ios/contributors","subscribers_url":"https://api.github.com/repos/leonmz/material-components-ios/subscribers","subscription_url":"https://api.github.com/repos/leonmz/material-components-ios/subscription","commits_url":"https://api.github.com/repos/leonmz/material-components-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/leonmz/material-components-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/leonmz/material-components-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/leonmz/material-components-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/leonmz/material-components-ios/contents/{+path}","compare_url":"https://api.github.com/repos/leonmz/material-components-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/leonmz/material-components-ios/merges","archive_url":"https://api.github.com/repos/leonmz/material-components-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/leonmz/material-components-ios/downloads","issues_url":"https://api.github.com/repos/leonmz/material-components-ios/issues{/number}","pulls_url":"https://api.github.com/repos/leonmz/material-components-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/leonmz/material-components-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/leonmz/material-components-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/leonmz/material-components-ios/labels{/name}","releases_url":"https://api.github.com/repos/leonmz/material-components-ios/releases{/id}","deployments_url":"https://api.github.com/repos/leonmz/material-components-ios/deployments","created_at":"2019-06-19T18:52:01Z","updated_at":"2019-06-19T18:52:13Z","pushed_at":"2019-06-19T23:18:42Z","git_url":"git://github.com/leonmz/material-components-ios.git","ssh_url":"git@github.com:leonmz/material-components-ios.git","clone_url":"https://github.com/leonmz/material-components-ios.git","svn_url":"https://github.com/leonmz/material-components-ios","homepage":"","size":143488,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"material-components:develop","ref":"develop","sha":"b243d5e8426f970da3c83f2fe2979be426b01256","user":{"login":"material-components","id":19478152,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDc4MTUy","avatar_url":"https://avatars3.githubusercontent.com/u/19478152?v=4","gravatar_id":"","url":"https://api.github.com/users/material-components","html_url":"https://github.com/material-components","followers_url":"https://api.github.com/users/material-components/followers","following_url":"https://api.github.com/users/material-components/following{/other_user}","gists_url":"https://api.github.com/users/material-components/gists{/gist_id}","starred_url":"https://api.github.com/users/material-components/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/material-components/subscriptions","organizations_url":"https://api.github.com/users/material-components/orgs","repos_url":"https://api.github.com/users/material-components/repos","events_url":"https://api.github.com/users/material-components/events{/privacy}","received_events_url":"https://api.github.com/users/material-components/received_events","type":"Organization","site_admin":false},"repo":{"id":43820219,"node_id":"MDEwOlJlcG9zaXRvcnk0MzgyMDIxOQ==","name":"material-components-ios","full_name":"material-components/material-components-ios","private":false,"owner":{"login":"material-components","id":19478152,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NDc4MTUy","avatar_url":"https://avatars3.githubusercontent.com/u/19478152?v=4","gravatar_id":"","url":"https://api.github.com/users/material-components","html_url":"https://github.com/material-components","followers_url":"https://api.github.com/users/material-components/followers","following_url":"https://api.github.com/users/material-components/following{/other_user}","gists_url":"https://api.github.com/users/material-components/gists{/gist_id}","starred_url":"https://api.github.com/users/material-components/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/material-components/subscriptions","organizations_url":"https://api.github.com/users/material-components/orgs","repos_url":"https://api.github.com/users/material-components/repos","events_url":"https://api.github.com/users/material-components/events{/privacy}","received_events_url":"https://api.github.com/users/material-components/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/material-components/material-components-ios","description":"Modular and customizable Material Design UI components for iOS","fork":false,"url":"https://api.github.com/repos/material-components/material-components-ios","forks_url":"https://api.github.com/repos/material-components/material-components-ios/forks","keys_url":"https://api.github.com/repos/material-components/material-components-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/material-components/material-components-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/material-components/material-components-ios/teams","hooks_url":"https://api.github.com/repos/material-components/material-components-ios/hooks","issue_events_url":"https://api.github.com/repos/material-components/material-components-ios/issues/events{/number}","events_url":"https://api.github.com/repos/material-components/material-components-ios/events","assignees_url":"https://api.github.com/repos/material-components/material-components-ios/assignees{/user}","branches_url":"https://api.github.com/repos/material-components/material-components-ios/branches{/branch}","tags_url":"https://api.github.com/repos/material-components/material-components-ios/tags","blobs_url":"https://api.github.com/repos/material-components/material-components-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/material-components/material-components-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/material-components/material-components-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/material-components/material-components-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/material-components/material-components-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/material-components/material-components-ios/languages","stargazers_url":"https://api.github.com/repos/material-components/material-components-ios/stargazers","contributors_url":"https://api.github.com/repos/material-components/material-components-ios/contributors","subscribers_url":"https://api.github.com/repos/material-components/material-components-ios/subscribers","subscription_url":"https://api.github.com/repos/material-components/material-components-ios/subscription","commits_url":"https://api.github.com/repos/material-components/material-components-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/material-components/material-components-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/material-components/material-components-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/material-components/material-components-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/material-components/material-components-ios/contents/{+path}","compare_url":"https://api.github.com/repos/material-components/material-components-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/material-components/material-components-ios/merges","archive_url":"https://api.github.com/repos/material-components/material-components-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/material-components/material-components-ios/downloads","issues_url":"https://api.github.com/repos/material-components/material-components-ios/issues{/number}","pulls_url":"https://api.github.com/repos/material-components/material-components-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/material-components/material-components-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/material-components/material-components-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/material-components/material-components-ios/labels{/name}","releases_url":"https://api.github.com/repos/material-components/material-components-ios/releases{/id}","deployments_url":"https://api.github.com/repos/material-components/material-components-ios/deployments","created_at":"2015-10-07T14:12:39Z","updated_at":"2019-06-19T22:27:15Z","pushed_at":"2019-06-20T01:14:22Z","git_url":"git://github.com/material-components/material-components-ios.git","ssh_url":"git@github.com:material-components/material-components-ios.git","clone_url":"https://github.com/material-components/material-components-ios.git","svn_url":"https://github.com/material-components/material-components-ios","homepage":"","size":143485,"stargazers_count":3516,"watchers_count":3516,"language":"Objective-C","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":579,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1067,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":579,"open_issues":1067,"watchers":3516,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/7656"},"html":{"href":"https://github.com/material-components/material-components-ios/pull/7656"},"issue":{"href":"https://api.github.com/repos/material-components/material-components-ios/issues/7656"},"comments":{"href":"https://api.github.com/repos/material-components/material-components-ios/issues/7656/comments"},"review_comments":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/7656/comments"},"review_comment":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/7656/commits"},"statuses":{"href":"https://api.github.com/repos/material-components/material-components-ios/statuses/fcc5382c9e5cdfa5777369af37525c0e7693894f"}},"author_association":"NONE"}}
{"actor":{"display_login":"jverkoey"}}