{"action":"created","comment":{"url":"https://api.github.com/repos/toggl/mobileapp/pulls/comments/151166569","pull_request_review_id":76830396,"id":151166569,"diff_hunk":"@@ -0,0 +1,108 @@\n+﻿\n+using System;\n+using Foundation;\n+using MvvmCross.Platform.Core;\n+using MvvmCross.Plugins.Color.iOS;\n+using Toggl.Foundation.MvvmCross.Helper;\n+using UIKit;\n+\n+namespace Toggl.Daneel.Views\n+{\n+    [Register(nameof(TextViewWithPlaceholder))]\n+    public class TextViewWithPlaceholder : UITextView, IUITextViewDelegate\n+    {\n+        protected readonly int defaultPlaceholderSize = 14;\n+        protected readonly UIColor defaultPlaceholderColor = Color.Common.Placeholder.ToNativeColor();\n+\n+        public event EventHandler TextChanged;\n+\n+        public UIColor PlaceholderColor { get; set; }\n+        public int PlaceholderSize { get; set; }\n+\n+        private bool isFocused;\n+\n+        private string text;\n+        public override string Text\n+        {\n+            get => text;\n+            set\n+            {\n+                if (text == value)\n+                    return;\n+                \n+                text = value;\n+                updateAttributedText(value);\n+                TextChanged.Raise(this);\n+            }\n+        }\n+\n+        public string PlaceholderText { get; set; }\n+\n+        private UIStringAttributes defaultTextAttributes => new UIStringAttributes\n+        {\n+            ParagraphStyle = new NSMutableParagraphStyle { Alignment = base.TextAlignment },\n+            Font = UIFont.SystemFontOfSize(Font.PointSize)\n+        };\n+\n+        private UIStringAttributes placeholderAttributes => new UIStringAttributes","path":"Toggl.Daneel/Views/TextViewWithPlaceholder.cs","position":47,"original_position":47,"commit_id":"b625d87b8c2ab267172c7147338d2dcedd20529c","original_commit_id":"b625d87b8c2ab267172c7147338d2dcedd20529c","user":{"login":"arturs105","id":15633003,"avatar_url":"https://avatars0.githubusercontent.com/u/15633003?v=4","gravatar_id":"","url":"https://api.github.com/users/arturs105","html_url":"https://github.com/arturs105","followers_url":"https://api.github.com/users/arturs105/followers","following_url":"https://api.github.com/users/arturs105/following{/other_user}","gists_url":"https://api.github.com/users/arturs105/gists{/gist_id}","starred_url":"https://api.github.com/users/arturs105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arturs105/subscriptions","organizations_url":"https://api.github.com/users/arturs105/orgs","repos_url":"https://api.github.com/users/arturs105/repos","events_url":"https://api.github.com/users/arturs105/events{/privacy}","received_events_url":"https://api.github.com/users/arturs105/received_events","type":"User","site_admin":false},"body":"Same as above.","created_at":"2017-11-15T15:51:55Z","updated_at":"2017-11-15T15:51:55Z","html_url":"https://github.com/toggl/mobileapp/pull/965#discussion_r151166569","pull_request_url":"https://api.github.com/repos/toggl/mobileapp/pulls/965","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/comments/151166569"},"html":{"href":"https://github.com/toggl/mobileapp/pull/965#discussion_r151166569"},"pull_request":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/965"}},"in_reply_to_id":151155167},"pull_request":{"url":"https://api.github.com/repos/toggl/mobileapp/pulls/965","id":152700997,"html_url":"https://github.com/toggl/mobileapp/pull/965","diff_url":"https://github.com/toggl/mobileapp/pull/965.diff","patch_url":"https://github.com/toggl/mobileapp/pull/965.patch","issue_url":"https://api.github.com/repos/toggl/mobileapp/issues/965","number":965,"state":"open","locked":false,"title":"Textview placeholder","user":{"login":"kornelijepetak","id":7033216,"avatar_url":"https://avatars2.githubusercontent.com/u/7033216?v=4","gravatar_id":"","url":"https://api.github.com/users/kornelijepetak","html_url":"https://github.com/kornelijepetak","followers_url":"https://api.github.com/users/kornelijepetak/followers","following_url":"https://api.github.com/users/kornelijepetak/following{/other_user}","gists_url":"https://api.github.com/users/kornelijepetak/gists{/gist_id}","starred_url":"https://api.github.com/users/kornelijepetak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kornelijepetak/subscriptions","organizations_url":"https://api.github.com/users/kornelijepetak/orgs","repos_url":"https://api.github.com/users/kornelijepetak/repos","events_url":"https://api.github.com/users/kornelijepetak/events{/privacy}","received_events_url":"https://api.github.com/users/kornelijepetak/received_events","type":"User","site_admin":false},"body":"Closes #783.\r\n\r\nAdds a placeholder to a TextView by inheriting from TextView and using attributed strings.\r\nPlaceholder shows only when its `Text` is empty and the control does not have a focus.\r\nThe `Text` property is bindable through custom `TargetBinding`.\r\n\r\nPlease do a thorough functional testing!\r\n\r\nSupports changing (in a non-bindable manner):\r\n\r\n* `PlaceholderText`\r\n* `PlaceholderColor`\r\n* `PlaceholderSize`","created_at":"2017-11-15T07:16:45Z","updated_at":"2017-11-15T15:51:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b65c35a0747b83fd69b112c21849ecb59d4c2eb","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/toggl/mobileapp/pulls/965/commits","review_comments_url":"https://api.github.com/repos/toggl/mobileapp/pulls/965/comments","review_comment_url":"https://api.github.com/repos/toggl/mobileapp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/toggl/mobileapp/issues/965/comments","statuses_url":"https://api.github.com/repos/toggl/mobileapp/statuses/b625d87b8c2ab267172c7147338d2dcedd20529c","head":{"label":"toggl:textview-placeholder","ref":"textview-placeholder","sha":"b625d87b8c2ab267172c7147338d2dcedd20529c","user":{"login":"toggl","id":316475,"avatar_url":"https://avatars3.githubusercontent.com/u/316475?v=4","gravatar_id":"","url":"https://api.github.com/users/toggl","html_url":"https://github.com/toggl","followers_url":"https://api.github.com/users/toggl/followers","following_url":"https://api.github.com/users/toggl/following{/other_user}","gists_url":"https://api.github.com/users/toggl/gists{/gist_id}","starred_url":"https://api.github.com/users/toggl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toggl/subscriptions","organizations_url":"https://api.github.com/users/toggl/orgs","repos_url":"https://api.github.com/users/toggl/repos","events_url":"https://api.github.com/users/toggl/events{/privacy}","received_events_url":"https://api.github.com/users/toggl/received_events","type":"Organization","site_admin":false},"repo":{"id":87079363,"name":"mobileapp","full_name":"toggl/mobileapp","owner":{"login":"toggl","id":316475,"avatar_url":"https://avatars3.githubusercontent.com/u/316475?v=4","gravatar_id":"","url":"https://api.github.com/users/toggl","html_url":"https://github.com/toggl","followers_url":"https://api.github.com/users/toggl/followers","following_url":"https://api.github.com/users/toggl/following{/other_user}","gists_url":"https://api.github.com/users/toggl/gists{/gist_id}","starred_url":"https://api.github.com/users/toggl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toggl/subscriptions","organizations_url":"https://api.github.com/users/toggl/orgs","repos_url":"https://api.github.com/users/toggl/repos","events_url":"https://api.github.com/users/toggl/events{/privacy}","received_events_url":"https://api.github.com/users/toggl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/toggl/mobileapp","description":"Toggl's new mobile app","fork":false,"url":"https://api.github.com/repos/toggl/mobileapp","forks_url":"https://api.github.com/repos/toggl/mobileapp/forks","keys_url":"https://api.github.com/repos/toggl/mobileapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/toggl/mobileapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/toggl/mobileapp/teams","hooks_url":"https://api.github.com/repos/toggl/mobileapp/hooks","issue_events_url":"https://api.github.com/repos/toggl/mobileapp/issues/events{/number}","events_url":"https://api.github.com/repos/toggl/mobileapp/events","assignees_url":"https://api.github.com/repos/toggl/mobileapp/assignees{/user}","branches_url":"https://api.github.com/repos/toggl/mobileapp/branches{/branch}","tags_url":"https://api.github.com/repos/toggl/mobileapp/tags","blobs_url":"https://api.github.com/repos/toggl/mobileapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/toggl/mobileapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/toggl/mobileapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/toggl/mobileapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/toggl/mobileapp/statuses/{sha}","languages_url":"https://api.github.com/repos/toggl/mobileapp/languages","stargazers_url":"https://api.github.com/repos/toggl/mobileapp/stargazers","contributors_url":"https://api.github.com/repos/toggl/mobileapp/contributors","subscribers_url":"https://api.github.com/repos/toggl/mobileapp/subscribers","subscription_url":"https://api.github.com/repos/toggl/mobileapp/subscription","commits_url":"https://api.github.com/repos/toggl/mobileapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/toggl/mobileapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/toggl/mobileapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/toggl/mobileapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/toggl/mobileapp/contents/{+path}","compare_url":"https://api.github.com/repos/toggl/mobileapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/toggl/mobileapp/merges","archive_url":"https://api.github.com/repos/toggl/mobileapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/toggl/mobileapp/downloads","issues_url":"https://api.github.com/repos/toggl/mobileapp/issues{/number}","pulls_url":"https://api.github.com/repos/toggl/mobileapp/pulls{/number}","milestones_url":"https://api.github.com/repos/toggl/mobileapp/milestones{/number}","notifications_url":"https://api.github.com/repos/toggl/mobileapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/toggl/mobileapp/labels{/name}","releases_url":"https://api.github.com/repos/toggl/mobileapp/releases{/id}","deployments_url":"https://api.github.com/repos/toggl/mobileapp/deployments","created_at":"2017-04-03T13:48:06Z","updated_at":"2017-11-13T14:00:34Z","pushed_at":"2017-11-15T15:41:10Z","git_url":"git://github.com/toggl/mobileapp.git","ssh_url":"git@github.com:toggl/mobileapp.git","clone_url":"https://github.com/toggl/mobileapp.git","svn_url":"https://github.com/toggl/mobileapp","homepage":null,"size":2965,"stargazers_count":34,"watchers_count":34,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":83,"forks":14,"open_issues":83,"watchers":34,"default_branch":"develop"}},"base":{"label":"toggl:develop","ref":"develop","sha":"8513cf8848f3375275fcddfda1bd121d9cef5d6e","user":{"login":"toggl","id":316475,"avatar_url":"https://avatars3.githubusercontent.com/u/316475?v=4","gravatar_id":"","url":"https://api.github.com/users/toggl","html_url":"https://github.com/toggl","followers_url":"https://api.github.com/users/toggl/followers","following_url":"https://api.github.com/users/toggl/following{/other_user}","gists_url":"https://api.github.com/users/toggl/gists{/gist_id}","starred_url":"https://api.github.com/users/toggl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toggl/subscriptions","organizations_url":"https://api.github.com/users/toggl/orgs","repos_url":"https://api.github.com/users/toggl/repos","events_url":"https://api.github.com/users/toggl/events{/privacy}","received_events_url":"https://api.github.com/users/toggl/received_events","type":"Organization","site_admin":false},"repo":{"id":87079363,"name":"mobileapp","full_name":"toggl/mobileapp","owner":{"login":"toggl","id":316475,"avatar_url":"https://avatars3.githubusercontent.com/u/316475?v=4","gravatar_id":"","url":"https://api.github.com/users/toggl","html_url":"https://github.com/toggl","followers_url":"https://api.github.com/users/toggl/followers","following_url":"https://api.github.com/users/toggl/following{/other_user}","gists_url":"https://api.github.com/users/toggl/gists{/gist_id}","starred_url":"https://api.github.com/users/toggl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toggl/subscriptions","organizations_url":"https://api.github.com/users/toggl/orgs","repos_url":"https://api.github.com/users/toggl/repos","events_url":"https://api.github.com/users/toggl/events{/privacy}","received_events_url":"https://api.github.com/users/toggl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/toggl/mobileapp","description":"Toggl's new mobile app","fork":false,"url":"https://api.github.com/repos/toggl/mobileapp","forks_url":"https://api.github.com/repos/toggl/mobileapp/forks","keys_url":"https://api.github.com/repos/toggl/mobileapp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/toggl/mobileapp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/toggl/mobileapp/teams","hooks_url":"https://api.github.com/repos/toggl/mobileapp/hooks","issue_events_url":"https://api.github.com/repos/toggl/mobileapp/issues/events{/number}","events_url":"https://api.github.com/repos/toggl/mobileapp/events","assignees_url":"https://api.github.com/repos/toggl/mobileapp/assignees{/user}","branches_url":"https://api.github.com/repos/toggl/mobileapp/branches{/branch}","tags_url":"https://api.github.com/repos/toggl/mobileapp/tags","blobs_url":"https://api.github.com/repos/toggl/mobileapp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/toggl/mobileapp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/toggl/mobileapp/git/refs{/sha}","trees_url":"https://api.github.com/repos/toggl/mobileapp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/toggl/mobileapp/statuses/{sha}","languages_url":"https://api.github.com/repos/toggl/mobileapp/languages","stargazers_url":"https://api.github.com/repos/toggl/mobileapp/stargazers","contributors_url":"https://api.github.com/repos/toggl/mobileapp/contributors","subscribers_url":"https://api.github.com/repos/toggl/mobileapp/subscribers","subscription_url":"https://api.github.com/repos/toggl/mobileapp/subscription","commits_url":"https://api.github.com/repos/toggl/mobileapp/commits{/sha}","git_commits_url":"https://api.github.com/repos/toggl/mobileapp/git/commits{/sha}","comments_url":"https://api.github.com/repos/toggl/mobileapp/comments{/number}","issue_comment_url":"https://api.github.com/repos/toggl/mobileapp/issues/comments{/number}","contents_url":"https://api.github.com/repos/toggl/mobileapp/contents/{+path}","compare_url":"https://api.github.com/repos/toggl/mobileapp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/toggl/mobileapp/merges","archive_url":"https://api.github.com/repos/toggl/mobileapp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/toggl/mobileapp/downloads","issues_url":"https://api.github.com/repos/toggl/mobileapp/issues{/number}","pulls_url":"https://api.github.com/repos/toggl/mobileapp/pulls{/number}","milestones_url":"https://api.github.com/repos/toggl/mobileapp/milestones{/number}","notifications_url":"https://api.github.com/repos/toggl/mobileapp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/toggl/mobileapp/labels{/name}","releases_url":"https://api.github.com/repos/toggl/mobileapp/releases{/id}","deployments_url":"https://api.github.com/repos/toggl/mobileapp/deployments","created_at":"2017-04-03T13:48:06Z","updated_at":"2017-11-13T14:00:34Z","pushed_at":"2017-11-15T15:41:10Z","git_url":"git://github.com/toggl/mobileapp.git","ssh_url":"git@github.com:toggl/mobileapp.git","clone_url":"https://github.com/toggl/mobileapp.git","svn_url":"https://github.com/toggl/mobileapp","homepage":null,"size":2965,"stargazers_count":34,"watchers_count":34,"language":"C#","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":83,"forks":14,"open_issues":83,"watchers":34,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/965"},"html":{"href":"https://github.com/toggl/mobileapp/pull/965"},"issue":{"href":"https://api.github.com/repos/toggl/mobileapp/issues/965"},"comments":{"href":"https://api.github.com/repos/toggl/mobileapp/issues/965/comments"},"review_comments":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/965/comments"},"review_comment":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/toggl/mobileapp/pulls/965/commits"},"statuses":{"href":"https://api.github.com/repos/toggl/mobileapp/statuses/b625d87b8c2ab267172c7147338d2dcedd20529c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"arturs105"}}