{"action":"created","comment":{"url":"https://api.github.com/repos/material-components/material-components-ios/pulls/comments/286030319","pull_request_review_id":240052260,"id":286030319,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI4NjAzMDMxOQ==","diff_hunk":"@@ -0,0 +1,252 @@\n+// Copyright 2019-present the Material Components for iOS authors. All Rights Reserved.\n+//\n+// Licensed under the Apache License, Version 2.0 (the \"License\");\n+// you may not use this file except in compliance with the License.\n+// You may obtain a copy of the License at\n+//\n+// http://www.apache.org/licenses/LICENSE-2.0\n+//\n+// Unless required by applicable law or agreed to in writing, software\n+// distributed under the License is distributed on an \"AS IS\" BASIS,\n+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+// See the License for the specific language governing permissions and\n+// limitations under the License.\n+\n+#import \"MaterialSnapshot.h\"\n+\n+#import <CoreGraphics/CoreGraphics.h>\n+#import <UIKit/UIKit.h>\n+\n+#import \"MaterialButtons.h\"\n+#import \"MaterialTypography.h\"\n+\n+/** A @c MDCButton test fake to override the @c traitCollection to test for dynamic type. */\n+@interface MDCFakeDynamicTypeButton : MDCButton\n+@property(nonatomic, strong) UITraitCollection *traitCollectionOverride;\n+@end\n+\n+@implementation MDCFakeDynamicTypeButton\n+\n+- (UITraitCollection *)traitCollection {\n+  return self.traitCollectionOverride ?: [super traitCollection];\n+}\n+\n+@end\n+\n+/**\n+ Used to test dynamic type visual differences based on different @c UIContentSizeCategory\n+ values.\n+ */\n+@interface ButtonDynamicTypeSnapshotTests : MDCSnapshotTestCase\n+@property(nonatomic, strong, nullable) MDCFakeDynamicTypeButton *button;\n+@end\n+\n+@implementation ButtonDynamicTypeSnapshotTests\n+\n+- (void)setUp {\n+  [super setUp];\n+\n+  // Uncomment below to recreate all the goldens (or add the following line to the specific\n+  // test you wish to recreate the golden for).\n+  //  self.recordMode = YES;\n+\n+  self.button = [[MDCFakeDynamicTypeButton alloc] init];\n+  [self.button setTitle:@\"Material\" forState:UIControlStateNormal];\n+  self.button.mdc_adjustsFontForContentSizeCategory = YES;\n+  self.button.mdc_legacyFontScaling = NO;\n+  MDCFontScaler *fontScaler = [MDCFontScaler scalerForMaterialTextStyle:MDCTextStyleHeadline1];\n+  UIFont *buttonFont = [UIFont systemFontOfSize:14];\n+  buttonFont = [fontScaler scaledFontWithFont:buttonFont];\n+  buttonFont = [buttonFont mdc_scaledFontAtDefaultSize];\n+  [self.button setTitleFont:buttonFont forState:UIControlStateNormal];\n+}\n+\n+- (void)tearDown {\n+  self.button = nil;\n+\n+  [super tearDown];\n+}\n+\n+- (void)generateSnapshotAndVerifyForView:(UIView *)view {\n+  [view sizeToFit];\n+  UIView *snapshotView = [view mdc_addToBackgroundView];\n+  [self snapshotVerifyView:snapshotView];\n+}\n+\n+","path":"components/Buttons/tests/snapshot/ButtonDynamicTypeSnapshotTests.m","position":76,"original_position":76,"commit_id":"606e33c4edacdacdae4cf98ca827123c71e9b8a6","original_commit_id":"606e33c4edacdacdae4cf98ca827123c71e9b8a6","user":{"login":"material-automation","id":19738546,"node_id":"MDQ6VXNlcjE5NzM4NTQ2","avatar_url":"https://avatars2.githubusercontent.com/u/19738546?v=4","gravatar_id":"","url":"https://api.github.com/users/material-automation","html_url":"https://github.com/material-automation","followers_url":"https://api.github.com/users/material-automation/followers","following_url":"https://api.github.com/users/material-automation/following{/other_user}","gists_url":"https://api.github.com/users/material-automation/gists{/gist_id}","starred_url":"https://api.github.com/users/material-automation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/material-automation/subscriptions","organizations_url":"https://api.github.com/users/material-automation/orgs","repos_url":"https://api.github.com/users/material-automation/repos","events_url":"https://api.github.com/users/material-automation/events{/privacy}","received_events_url":"https://api.github.com/users/material-automation/received_events","type":"User","site_admin":false},"body":"clang-format suggested the following change:\n\n\n```\n-\n```\n\n<!-- identifier: clang-format -->\n<!-- File: components/Buttons/tests/snapshot/ButtonDynamicTypeSnapshotTests.m -->","created_at":"2019-05-21T13:40:45Z","updated_at":"2019-05-21T13:40:46Z","html_url":"https://github.com/material-components/material-components-ios/pull/7429#discussion_r286030319","pull_request_url":"https://api.github.com/repos/material-components/material-components-ios/pulls/7429","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/comments/286030319"},"html":{"href":"https://github.com/material-components/material-components-ios/pull/7429#discussion_r286030319"},"pull_request":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/7429"}}},"pull_request":{"url":"https://api.github.com/repos/material-components/material-components-ios/pulls/7429","id":280776522,"node_id":"MDExOlB1bGxSZXF1ZXN0MjgwNzc2NTIy","html_url":"https://github.com/material-components/material-components-ios/pull/7429","diff_url":"https://github.com/material-components/material-components-ios/pull/7429.diff","patch_url":"https://github.com/material-components/material-components-ios/pull/7429.patch","issue_url":"https://api.github.com/repos/material-components/material-components-ios/issues/7429","number":7429,"state":"open","locked":false,"title":"{WIP}[Buttons] Buttons snapshot","user":{"login":"codeman7","id":7131294,"node_id":"MDQ6VXNlcjcxMzEyOTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7131294?v=4","gravatar_id":"","url":"https://api.github.com/users/codeman7","html_url":"https://github.com/codeman7","followers_url":"https://api.github.com/users/codeman7/followers","following_url":"https://api.github.com/users/codeman7/following{/other_user}","gists_url":"https://api.github.com/users/codeman7/gists{/gist_id}","starred_url":"https://api.github.com/users/codeman7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeman7/subscriptions","organizations_url":"https://api.github.com/users/codeman7/orgs","repos_url":"https://api.github.com/users/codeman7/repos","events_url":"https://api.github.com/users/codeman7/events{/privacy}","received_events_url":"https://api.github.com/users/codeman7/received_events","type":"User","site_admin":false},"body":"### Thanks for starting a pull request on Material Components!\r\n\r\n#### Don't forget:\r\n- [ ] Identify the component the PR relates to in brackets in the title. ```[Buttons] Updated documentation```\r\n- [ ] Link to GitHub issues it solves. ```closes #1234```\r\n- [ ] Sign the CLA bot. You can do this once the pull request is opened.\r\n\r\n[Contributing](./contributing/README.md#pull-requests) has more information and tips for a great\r\npull request.\r\n","created_at":"2019-05-21T13:11:33Z","updated_at":"2019-05-21T13:40:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"80287fa98b7f7676b0445de19fa2384943a31b34","assignee":null,"assignees":[],"requested_reviewers":[{"login":"randallli","id":943565,"node_id":"MDQ6VXNlcjk0MzU2NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/943565?v=4","gravatar_id":"","url":"https://api.github.com/users/randallli","html_url":"https://github.com/randallli","followers_url":"https://api.github.com/users/randallli/followers","following_url":"https://api.github.com/users/randallli/following{/other_user}","gists_url":"https://api.github.com/users/randallli/gists{/gist_id}","starred_url":"https://api.github.com/users/randallli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/randallli/subscriptions","organizations_url":"https://api.github.com/users/randallli/orgs","repos_url":"https://api.github.com/users/randallli/repos","events_url":"https://api.github.com/users/randallli/events{/privacy}","received_events_url":"https://api.github.com/users/randallli/received_events","type":"User","site_admin":false}],"requested_teams":[{"name":"Core iOS team","id":2781508,"node_id":"MDQ6VGVhbTI3ODE1MDg=","slug":"core-ios-team","description":"The core team of Material Components for iOS","privacy":"closed","url":"https://api.github.com/teams/2781508","html_url":"https://github.com/orgs/material-components/teams/core-ios-team","members_url":"https://api.github.com/teams/2781508/members{/member}","repositories_url":"https://api.github.com/teams/2781508/repos","permission":"pull"}],"labels":[{"id":321577458,"node_id":"MDU6TGFiZWwzMjE1Nzc0NTg=","url":"https://api.github.com/repos/material-components/material-components-ios/labels/[Buttons]","name":"[Buttons]","color":"eeeeee","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/7429/commits","review_comments_url":"https://api.github.com/repos/material-components/material-components-ios/pulls/7429/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/7429/comments","statuses_url":"https://api.github.com/repos/material-components/material-components-ios/statuses/606e33c4edacdacdae4cf98ca827123c71e9b8a6","head":{"label":"codeman7:buttons-snapshot","ref":"buttons-snapshot","sha":"606e33c4edacdacdae4cf98ca827123c71e9b8a6","user":{"login":"codeman7","id":7131294,"node_id":"MDQ6VXNlcjcxMzEyOTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7131294?v=4","gravatar_id":"","url":"https://api.github.com/users/codeman7","html_url":"https://github.com/codeman7","followers_url":"https://api.github.com/users/codeman7/followers","following_url":"https://api.github.com/users/codeman7/following{/other_user}","gists_url":"https://api.github.com/users/codeman7/gists{/gist_id}","starred_url":"https://api.github.com/users/codeman7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeman7/subscriptions","organizations_url":"https://api.github.com/users/codeman7/orgs","repos_url":"https://api.github.com/users/codeman7/repos","events_url":"https://api.github.com/users/codeman7/events{/privacy}","received_events_url":"https://api.github.com/users/codeman7/received_events","type":"User","site_admin":false},"repo":{"id":153677219,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM2NzcyMTk=","name":"material-components-ios","full_name":"codeman7/material-components-ios","private":false,"owner":{"login":"codeman7","id":7131294,"node_id":"MDQ6VXNlcjcxMzEyOTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7131294?v=4","gravatar_id":"","url":"https://api.github.com/users/codeman7","html_url":"https://github.com/codeman7","followers_url":"https://api.github.com/users/codeman7/followers","following_url":"https://api.github.com/users/codeman7/following{/other_user}","gists_url":"https://api.github.com/users/codeman7/gists{/gist_id}","starred_url":"https://api.github.com/users/codeman7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeman7/subscriptions","organizations_url":"https://api.github.com/users/codeman7/orgs","repos_url":"https://api.github.com/users/codeman7/repos","events_url":"https://api.github.com/users/codeman7/events{/privacy}","received_events_url":"https://api.github.com/users/codeman7/received_events","type":"User","site_admin":false},"html_url":"https://github.com/codeman7/material-components-ios","description":"Modular and customizable Material Design UI components for iOS","fork":true,"url":"https://api.github.com/repos/codeman7/material-components-ios","forks_url":"https://api.github.com/repos/codeman7/material-components-ios/forks","keys_url":"https://api.github.com/repos/codeman7/material-components-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeman7/material-components-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeman7/material-components-ios/teams","hooks_url":"https://api.github.com/repos/codeman7/material-components-ios/hooks","issue_events_url":"https://api.github.com/repos/codeman7/material-components-ios/issues/events{/number}","events_url":"https://api.github.com/repos/codeman7/material-components-ios/events","assignees_url":"https://api.github.com/repos/codeman7/material-components-ios/assignees{/user}","branches_url":"https://api.github.com/repos/codeman7/material-components-ios/branches{/branch}","tags_url":"https://api.github.com/repos/codeman7/material-components-ios/tags","blobs_url":"https://api.github.com/repos/codeman7/material-components-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeman7/material-components-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeman7/material-components-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeman7/material-components-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeman7/material-components-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/codeman7/material-components-ios/languages","stargazers_url":"https://api.github.com/repos/codeman7/material-components-ios/stargazers","contributors_url":"https://api.github.com/repos/codeman7/material-components-ios/contributors","subscribers_url":"https://api.github.com/repos/codeman7/material-components-ios/subscribers","subscription_url":"https://api.github.com/repos/codeman7/material-components-ios/subscription","commits_url":"https://api.github.com/repos/codeman7/material-components-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeman7/material-components-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeman7/material-components-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeman7/material-components-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeman7/material-components-ios/contents/{+path}","compare_url":"https://api.github.com/repos/codeman7/material-components-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeman7/material-components-ios/merges","archive_url":"https://api.github.com/repos/codeman7/material-components-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeman7/material-components-ios/downloads","issues_url":"https://api.github.com/repos/codeman7/material-components-ios/issues{/number}","pulls_url":"https://api.github.com/repos/codeman7/material-components-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/codeman7/material-components-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/codeman7/material-components-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeman7/material-components-ios/labels{/name}","releases_url":"https://api.github.com/repos/codeman7/material-components-ios/releases{/id}","deployments_url":"https://api.github.com/repos/codeman7/material-components-ios/deployments","created_at":"2018-10-18T19:32:13Z","updated_at":"2019-05-20T19:22:20Z","pushed_at":"2019-05-21T13:38:44Z","git_url":"git://github.com/codeman7/material-components-ios.git","ssh_url":"git@github.com:codeman7/material-components-ios.git","clone_url":"https://github.com/codeman7/material-components-ios.git","svn_url":"https://github.com/codeman7/material-components-ios","homepage":"","size":142913,"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":"b2bb60c78982442a6b3163615b18a7dec269b6fc","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-05-21T07:54:48Z","pushed_at":"2019-05-21T13:40:03Z","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":142637,"stargazers_count":3458,"watchers_count":3458,"language":"Objective-C","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":561,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1020,"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":561,"open_issues":1020,"watchers":3458,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/7429"},"html":{"href":"https://github.com/material-components/material-components-ios/pull/7429"},"issue":{"href":"https://api.github.com/repos/material-components/material-components-ios/issues/7429"},"comments":{"href":"https://api.github.com/repos/material-components/material-components-ios/issues/7429/comments"},"review_comments":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/7429/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/7429/commits"},"statuses":{"href":"https://api.github.com/repos/material-components/material-components-ios/statuses/606e33c4edacdacdae4cf98ca827123c71e9b8a6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"material-automation"}}