{"action":"created","comment":{"url":"https://api.github.com/repos/material-components/material-components-ios/pulls/comments/301741776","pull_request_review_id":259695173,"id":301741776,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwMTc0MTc3Ng==","diff_hunk":"@@ -558,11 +558,40 @@ - (void)updateBannerFont {\n }\n \n - (void)updateTextFont {\n-  UIFont *textFont = self.textLabel.font;\n-  if (self.mdc_adjustsFontForContentSizeCategory && textFont.mdc_scalingCurve) {\n-    textFont = [textFont mdc_scaledFontForTraitEnvironment:self];\n+  if (self.mdc_adjustsFontForContentSizeCategory) {\n+    NSAttributedString *attributedText = self.textLabel.attributedText;\n+    NSMutableAttributedString *mutableAttributedText = [attributedText mutableCopy];\n+    UIFont *textFont = self.textLabel.font;\n+    if (textFont.mdc_scalingCurve) {\n+      textFont = [textFont mdc_scaledFontForTraitEnvironment:self];\n+    }\n+    self.textLabel.font = textFont;\n+    [mutableAttributedText beginEditing];\n+    __block BOOL hasScalableFont = NO;\n+    __weak typeof(self) weakSelf = self;\n+    [mutableAttributedText\n+        enumerateAttribute:NSFontAttributeName\n+                   inRange:NSMakeRange(0, mutableAttributedText.length)\n+                   options:0\n+                usingBlock:^(id value, NSRange range, BOOL *stop) {\n+                  if (value) {\n+                    UIFont *previousFont = (UIFont *)value;\n+                    if (previousFont.mdc_scalingCurve) {\n+                      hasScalableFont = YES;\n+                      UIFont *scaledFont =\n+                          [previousFont mdc_scaledFontForTraitEnvironment:weakSelf];","path":"components/Banner/src/MDCBannerView.m","position":null,"original_position":37,"commit_id":"5ed3632d0ba4658c7ba55f653cbd2b38dee6d895","original_commit_id":"3b12b72d5a62e8bd480bf88cceedeae9cee56e8b","user":{"login":"wenyuzhang666","id":8836258,"node_id":"MDQ6VXNlcjg4MzYyNTg=","avatar_url":"https://avatars3.githubusercontent.com/u/8836258?v=4","gravatar_id":"","url":"https://api.github.com/users/wenyuzhang666","html_url":"https://github.com/wenyuzhang666","followers_url":"https://api.github.com/users/wenyuzhang666/followers","following_url":"https://api.github.com/users/wenyuzhang666/following{/other_user}","gists_url":"https://api.github.com/users/wenyuzhang666/gists{/gist_id}","starred_url":"https://api.github.com/users/wenyuzhang666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenyuzhang666/subscriptions","organizations_url":"https://api.github.com/users/wenyuzhang666/orgs","repos_url":"https://api.github.com/users/wenyuzhang666/repos","events_url":"https://api.github.com/users/wenyuzhang666/events{/privacy}","received_events_url":"https://api.github.com/users/wenyuzhang666/received_events","type":"User","site_admin":false},"body":"Discussed offline (`mdc_scaledFontForTraitEnvironment` only takes nonnull). Addressed in 5ed3632d0ba4658c7ba55f653cbd2b38dee6d895.","created_at":"2019-07-09T18:51:57Z","updated_at":"2019-07-09T18:51:58Z","html_url":"https://github.com/material-components/material-components-ios/pull/7820#discussion_r301741776","pull_request_url":"https://api.github.com/repos/material-components/material-components-ios/pulls/7820","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/comments/301741776"},"html":{"href":"https://github.com/material-components/material-components-ios/pull/7820#discussion_r301741776"},"pull_request":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/7820"}},"in_reply_to_id":301697490},"pull_request":{"url":"https://api.github.com/repos/material-components/material-components-ios/pulls/7820","id":295578057,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk1NTc4MDU3","html_url":"https://github.com/material-components/material-components-ios/pull/7820","diff_url":"https://github.com/material-components/material-components-ios/pull/7820.diff","patch_url":"https://github.com/material-components/material-components-ios/pull/7820.patch","issue_url":"https://api.github.com/repos/material-components/material-components-ios/issues/7820","number":7820,"state":"open","locked":false,"title":"[Banner] fix dynamic type support for attributed string.","user":{"login":"wenyuzhang666","id":8836258,"node_id":"MDQ6VXNlcjg4MzYyNTg=","avatar_url":"https://avatars3.githubusercontent.com/u/8836258?v=4","gravatar_id":"","url":"https://api.github.com/users/wenyuzhang666","html_url":"https://github.com/wenyuzhang666","followers_url":"https://api.github.com/users/wenyuzhang666/followers","following_url":"https://api.github.com/users/wenyuzhang666/following{/other_user}","gists_url":"https://api.github.com/users/wenyuzhang666/gists{/gist_id}","starred_url":"https://api.github.com/users/wenyuzhang666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenyuzhang666/subscriptions","organizations_url":"https://api.github.com/users/wenyuzhang666/orgs","repos_url":"https://api.github.com/users/wenyuzhang666/repos","events_url":"https://api.github.com/users/wenyuzhang666/events{/privacy}","received_events_url":"https://api.github.com/users/wenyuzhang666/received_events","type":"User","site_admin":false},"body":"close #7819 \r\n\r\nPreviously, Banner only looks at the font on the textLabel to make dynamic type changes. After the change, an attributed string displayed on a banner is able to auto adjust its size based on content sizing category.\r\n\r\n|Before|After|\r\n|---|---|\r\n|![Simulator Screen Shot - iPhone 8 - 2019-07-09 at 00 27 58](https://user-images.githubusercontent.com/8836258/60859393-75a4ed80-a1e0-11e9-8a45-81e3edbf5910.png)| ![Simulator Screen Shot - iPhone 8 - 2019-07-09 at 00 19 02](https://user-images.githubusercontent.com/8836258/60859313-23fc6300-a1e0-11e9-9ac4-9e6ba62c6557.png)|\r\n\r\n","created_at":"2019-07-09T04:26:26Z","updated_at":"2019-07-09T18:51:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a681ac026de8b66edbbe3142f8dffec2cd5c65f8","assignee":null,"assignees":[],"requested_reviewers":[{"login":"yarneo","id":4066863,"node_id":"MDQ6VXNlcjQwNjY4NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/4066863?v=4","gravatar_id":"","url":"https://api.github.com/users/yarneo","html_url":"https://github.com/yarneo","followers_url":"https://api.github.com/users/yarneo/followers","following_url":"https://api.github.com/users/yarneo/following{/other_user}","gists_url":"https://api.github.com/users/yarneo/gists{/gist_id}","starred_url":"https://api.github.com/users/yarneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarneo/subscriptions","organizations_url":"https://api.github.com/users/yarneo/orgs","repos_url":"https://api.github.com/users/yarneo/repos","events_url":"https://api.github.com/users/yarneo/events{/privacy}","received_events_url":"https://api.github.com/users/yarneo/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":1037429303,"node_id":"MDU6TGFiZWwxMDM3NDI5MzAz","url":"https://api.github.com/repos/material-components/material-components-ios/labels/[Banner]","name":"[Banner]","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/7820/commits","review_comments_url":"https://api.github.com/repos/material-components/material-components-ios/pulls/7820/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/7820/comments","statuses_url":"https://api.github.com/repos/material-components/material-components-ios/statuses/5ed3632d0ba4658c7ba55f653cbd2b38dee6d895","head":{"label":"wenyuzhang666:banner_attributed_text","ref":"banner_attributed_text","sha":"5ed3632d0ba4658c7ba55f653cbd2b38dee6d895","user":{"login":"wenyuzhang666","id":8836258,"node_id":"MDQ6VXNlcjg4MzYyNTg=","avatar_url":"https://avatars3.githubusercontent.com/u/8836258?v=4","gravatar_id":"","url":"https://api.github.com/users/wenyuzhang666","html_url":"https://github.com/wenyuzhang666","followers_url":"https://api.github.com/users/wenyuzhang666/followers","following_url":"https://api.github.com/users/wenyuzhang666/following{/other_user}","gists_url":"https://api.github.com/users/wenyuzhang666/gists{/gist_id}","starred_url":"https://api.github.com/users/wenyuzhang666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenyuzhang666/subscriptions","organizations_url":"https://api.github.com/users/wenyuzhang666/orgs","repos_url":"https://api.github.com/users/wenyuzhang666/repos","events_url":"https://api.github.com/users/wenyuzhang666/events{/privacy}","received_events_url":"https://api.github.com/users/wenyuzhang666/received_events","type":"User","site_admin":false},"repo":{"id":144311627,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQzMTE2Mjc=","name":"material-components-ios","full_name":"wenyuzhang666/material-components-ios","private":false,"owner":{"login":"wenyuzhang666","id":8836258,"node_id":"MDQ6VXNlcjg4MzYyNTg=","avatar_url":"https://avatars3.githubusercontent.com/u/8836258?v=4","gravatar_id":"","url":"https://api.github.com/users/wenyuzhang666","html_url":"https://github.com/wenyuzhang666","followers_url":"https://api.github.com/users/wenyuzhang666/followers","following_url":"https://api.github.com/users/wenyuzhang666/following{/other_user}","gists_url":"https://api.github.com/users/wenyuzhang666/gists{/gist_id}","starred_url":"https://api.github.com/users/wenyuzhang666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wenyuzhang666/subscriptions","organizations_url":"https://api.github.com/users/wenyuzhang666/orgs","repos_url":"https://api.github.com/users/wenyuzhang666/repos","events_url":"https://api.github.com/users/wenyuzhang666/events{/privacy}","received_events_url":"https://api.github.com/users/wenyuzhang666/received_events","type":"User","site_admin":false},"html_url":"https://github.com/wenyuzhang666/material-components-ios","description":"Modular and customizable Material Design UI components for iOS","fork":true,"url":"https://api.github.com/repos/wenyuzhang666/material-components-ios","forks_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/forks","keys_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/teams","hooks_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/hooks","issue_events_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/issues/events{/number}","events_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/events","assignees_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/assignees{/user}","branches_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/branches{/branch}","tags_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/tags","blobs_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/languages","stargazers_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/stargazers","contributors_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/contributors","subscribers_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/subscribers","subscription_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/subscription","commits_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/contents/{+path}","compare_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/merges","archive_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/downloads","issues_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/issues{/number}","pulls_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/labels{/name}","releases_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/releases{/id}","deployments_url":"https://api.github.com/repos/wenyuzhang666/material-components-ios/deployments","created_at":"2018-08-10T16:53:18Z","updated_at":"2019-06-27T21:39:20Z","pushed_at":"2019-07-09T18:49:58Z","git_url":"git://github.com/wenyuzhang666/material-components-ios.git","ssh_url":"git@github.com:wenyuzhang666/material-components-ios.git","clone_url":"https://github.com/wenyuzhang666/material-components-ios.git","svn_url":"https://github.com/wenyuzhang666/material-components-ios","homepage":"","size":146083,"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":"9e8165694e4dfe4921281308161c8a622adecfe5","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-07-09T14:24:34Z","pushed_at":"2019-07-09T18:50:01Z","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":145594,"stargazers_count":3538,"watchers_count":3538,"language":"Objective-C","has_issues":true,"has_projects":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":594,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1092,"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":594,"open_issues":1092,"watchers":3538,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/7820"},"html":{"href":"https://github.com/material-components/material-components-ios/pull/7820"},"issue":{"href":"https://api.github.com/repos/material-components/material-components-ios/issues/7820"},"comments":{"href":"https://api.github.com/repos/material-components/material-components-ios/issues/7820/comments"},"review_comments":{"href":"https://api.github.com/repos/material-components/material-components-ios/pulls/7820/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/7820/commits"},"statuses":{"href":"https://api.github.com/repos/material-components/material-components-ios/statuses/5ed3632d0ba4658c7ba55f653cbd2b38dee6d895"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"wenyuzhang666"}}