{"action":"created","comment":{"url":"https://api.github.com/repos/novoda/spikes/pulls/comments/65214702","id":65214702,"diff_hunk":"@@ -0,0 +1,8 @@\n+<?xml version=\"1.0\" encoding=\"utf-8\"?>\n+<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n+  <item android:state_enabled=\"false\"\n+    android:drawable=\"@drawable/button_background_disabled2\" />","path":"ReactNative/ReactTwitter/android/app/src/main/res/drawable/buttonbackground2.xml","position":4,"original_position":4,"commit_id":"106240573d8af7e55c99470b0e552cdcd1d711de","original_commit_id":"106240573d8af7e55c99470b0e552cdcd1d711de","user":{"login":"gbasile","id":797790,"avatar_url":"https://avatars.githubusercontent.com/u/797790?v=3","gravatar_id":"","url":"https://api.github.com/users/gbasile","html_url":"https://github.com/gbasile","followers_url":"https://api.github.com/users/gbasile/followers","following_url":"https://api.github.com/users/gbasile/following{/other_user}","gists_url":"https://api.github.com/users/gbasile/gists{/gist_id}","starred_url":"https://api.github.com/users/gbasile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gbasile/subscriptions","organizations_url":"https://api.github.com/users/gbasile/orgs","repos_url":"https://api.github.com/users/gbasile/repos","events_url":"https://api.github.com/users/gbasile/events{/privacy}","received_events_url":"https://api.github.com/users/gbasile/received_events","type":"User","site_admin":false},"body":"We can delete this one button-background-normal1.png","created_at":"2016-05-31T16:16:18Z","updated_at":"2016-05-31T16:16:18Z","html_url":"https://github.com/novoda/spikes/pull/67#discussion_r65214702","pull_request_url":"https://api.github.com/repos/novoda/spikes/pulls/67","_links":{"self":{"href":"https://api.github.com/repos/novoda/spikes/pulls/comments/65214702"},"html":{"href":"https://github.com/novoda/spikes/pull/67#discussion_r65214702"},"pull_request":{"href":"https://api.github.com/repos/novoda/spikes/pulls/67"}}},"pull_request":{"url":"https://api.github.com/repos/novoda/spikes/pulls/67","id":72037569,"html_url":"https://github.com/novoda/spikes/pull/67","diff_url":"https://github.com/novoda/spikes/pull/67.diff","patch_url":"https://github.com/novoda/spikes/pull/67.patch","issue_url":"https://api.github.com/repos/novoda/spikes/issues/67","number":67,"state":"open","locked":false,"title":"React - PT 135 - Native button (Android mostly)","user":{"login":"eduardb","id":2426348,"avatar_url":"https://avatars.githubusercontent.com/u/2426348?v=3","gravatar_id":"","url":"https://api.github.com/users/eduardb","html_url":"https://github.com/eduardb","followers_url":"https://api.github.com/users/eduardb/followers","following_url":"https://api.github.com/users/eduardb/following{/other_user}","gists_url":"https://api.github.com/users/eduardb/gists{/gist_id}","starred_url":"https://api.github.com/users/eduardb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduardb/subscriptions","organizations_url":"https://api.github.com/users/eduardb/orgs","repos_url":"https://api.github.com/users/eduardb/repos","events_url":"https://api.github.com/users/eduardb/events{/privacy}","received_events_url":"https://api.github.com/users/eduardb/received_events","type":"User","site_admin":false},"body":"**TL;DR** Expose native UI components to react-native\r\n\r\n**Solution - Android** To expose a native UI button, a `ReactButtonManager` was added. This is responsible instantiating the exposed component (`ReactButton`), and set its properties. For automeasuring the button based on its content, a subclass of `LayoutShadowNode` is used, `ReactButtonShadowNode`. There we listen for properties that are relevant for the size, and measuring happens in the `measure()` method. The code was copied from `ReactTextShadowNode` (with comments as well :joy:) and slightly adapted to our use case.\r\n\r\n**RN side** A class wrapping the native component was created, with the properties exposed by it. The click listener is actually assigned to a `TouchableWithoutFeedback` element that wraps the native button, just to simplify things.\r\n\r\n**Screenshot**\r\n\r\n<img src=\"https://cloud.githubusercontent.com/assets/2426348/15679516/7b1c0cd2-2752-11e6-8781-51819c58f616.png\" width=\"360\">\r\n\r\nSorry for the ugly buttons, we are not designers 💃\r\n\r\n**On iOS, the component doesn't resize itself based on the content, that is something that it will be addressed in a feature PR, as this one was getting pretty big already anyway**\r\n\r\nPaired/worked in parallel with @gbasile ","created_at":"2016-05-31T15:36:02Z","updated_at":"2016-05-31T16:16:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0af7122b5fc713476cf33482184f11c4d864b94c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/novoda/spikes/pulls/67/commits","review_comments_url":"https://api.github.com/repos/novoda/spikes/pulls/67/comments","review_comment_url":"https://api.github.com/repos/novoda/spikes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/novoda/spikes/issues/67/comments","statuses_url":"https://api.github.com/repos/novoda/spikes/statuses/106240573d8af7e55c99470b0e552cdcd1d711de","head":{"label":"novoda:react/PT-135/android","ref":"react/PT-135/android","sha":"106240573d8af7e55c99470b0e552cdcd1d711de","user":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=3","gravatar_id":"","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"repo":{"id":13300550,"name":"spikes","full_name":"novoda/spikes","owner":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=3","gravatar_id":"","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/novoda/spikes","description":"Where ideas & concepts are born & incubated","fork":false,"url":"https://api.github.com/repos/novoda/spikes","forks_url":"https://api.github.com/repos/novoda/spikes/forks","keys_url":"https://api.github.com/repos/novoda/spikes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novoda/spikes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novoda/spikes/teams","hooks_url":"https://api.github.com/repos/novoda/spikes/hooks","issue_events_url":"https://api.github.com/repos/novoda/spikes/issues/events{/number}","events_url":"https://api.github.com/repos/novoda/spikes/events","assignees_url":"https://api.github.com/repos/novoda/spikes/assignees{/user}","branches_url":"https://api.github.com/repos/novoda/spikes/branches{/branch}","tags_url":"https://api.github.com/repos/novoda/spikes/tags","blobs_url":"https://api.github.com/repos/novoda/spikes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novoda/spikes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novoda/spikes/git/refs{/sha}","trees_url":"https://api.github.com/repos/novoda/spikes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novoda/spikes/statuses/{sha}","languages_url":"https://api.github.com/repos/novoda/spikes/languages","stargazers_url":"https://api.github.com/repos/novoda/spikes/stargazers","contributors_url":"https://api.github.com/repos/novoda/spikes/contributors","subscribers_url":"https://api.github.com/repos/novoda/spikes/subscribers","subscription_url":"https://api.github.com/repos/novoda/spikes/subscription","commits_url":"https://api.github.com/repos/novoda/spikes/commits{/sha}","git_commits_url":"https://api.github.com/repos/novoda/spikes/git/commits{/sha}","comments_url":"https://api.github.com/repos/novoda/spikes/comments{/number}","issue_comment_url":"https://api.github.com/repos/novoda/spikes/issues/comments{/number}","contents_url":"https://api.github.com/repos/novoda/spikes/contents/{+path}","compare_url":"https://api.github.com/repos/novoda/spikes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novoda/spikes/merges","archive_url":"https://api.github.com/repos/novoda/spikes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novoda/spikes/downloads","issues_url":"https://api.github.com/repos/novoda/spikes/issues{/number}","pulls_url":"https://api.github.com/repos/novoda/spikes/pulls{/number}","milestones_url":"https://api.github.com/repos/novoda/spikes/milestones{/number}","notifications_url":"https://api.github.com/repos/novoda/spikes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novoda/spikes/labels{/name}","releases_url":"https://api.github.com/repos/novoda/spikes/releases{/id}","deployments_url":"https://api.github.com/repos/novoda/spikes/deployments","created_at":"2013-10-03T14:31:43Z","updated_at":"2016-05-29T17:33:58Z","pushed_at":"2016-05-31T16:10:13Z","git_url":"git://github.com/novoda/spikes.git","ssh_url":"git@github.com:novoda/spikes.git","clone_url":"https://github.com/novoda/spikes.git","svn_url":"https://github.com/novoda/spikes","homepage":"","size":12684,"stargazers_count":43,"watchers_count":43,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":43,"default_branch":"master"}},"base":{"label":"novoda:react/PT-135/feature-branch","ref":"react/PT-135/feature-branch","sha":"b99d42a748fb9aaaeee0a2c509156f5fe5ceb4d9","user":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=3","gravatar_id":"","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"repo":{"id":13300550,"name":"spikes","full_name":"novoda/spikes","owner":{"login":"novoda","id":74874,"avatar_url":"https://avatars.githubusercontent.com/u/74874?v=3","gravatar_id":"","url":"https://api.github.com/users/novoda","html_url":"https://github.com/novoda","followers_url":"https://api.github.com/users/novoda/followers","following_url":"https://api.github.com/users/novoda/following{/other_user}","gists_url":"https://api.github.com/users/novoda/gists{/gist_id}","starred_url":"https://api.github.com/users/novoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novoda/subscriptions","organizations_url":"https://api.github.com/users/novoda/orgs","repos_url":"https://api.github.com/users/novoda/repos","events_url":"https://api.github.com/users/novoda/events{/privacy}","received_events_url":"https://api.github.com/users/novoda/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/novoda/spikes","description":"Where ideas & concepts are born & incubated","fork":false,"url":"https://api.github.com/repos/novoda/spikes","forks_url":"https://api.github.com/repos/novoda/spikes/forks","keys_url":"https://api.github.com/repos/novoda/spikes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novoda/spikes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novoda/spikes/teams","hooks_url":"https://api.github.com/repos/novoda/spikes/hooks","issue_events_url":"https://api.github.com/repos/novoda/spikes/issues/events{/number}","events_url":"https://api.github.com/repos/novoda/spikes/events","assignees_url":"https://api.github.com/repos/novoda/spikes/assignees{/user}","branches_url":"https://api.github.com/repos/novoda/spikes/branches{/branch}","tags_url":"https://api.github.com/repos/novoda/spikes/tags","blobs_url":"https://api.github.com/repos/novoda/spikes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novoda/spikes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novoda/spikes/git/refs{/sha}","trees_url":"https://api.github.com/repos/novoda/spikes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novoda/spikes/statuses/{sha}","languages_url":"https://api.github.com/repos/novoda/spikes/languages","stargazers_url":"https://api.github.com/repos/novoda/spikes/stargazers","contributors_url":"https://api.github.com/repos/novoda/spikes/contributors","subscribers_url":"https://api.github.com/repos/novoda/spikes/subscribers","subscription_url":"https://api.github.com/repos/novoda/spikes/subscription","commits_url":"https://api.github.com/repos/novoda/spikes/commits{/sha}","git_commits_url":"https://api.github.com/repos/novoda/spikes/git/commits{/sha}","comments_url":"https://api.github.com/repos/novoda/spikes/comments{/number}","issue_comment_url":"https://api.github.com/repos/novoda/spikes/issues/comments{/number}","contents_url":"https://api.github.com/repos/novoda/spikes/contents/{+path}","compare_url":"https://api.github.com/repos/novoda/spikes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novoda/spikes/merges","archive_url":"https://api.github.com/repos/novoda/spikes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novoda/spikes/downloads","issues_url":"https://api.github.com/repos/novoda/spikes/issues{/number}","pulls_url":"https://api.github.com/repos/novoda/spikes/pulls{/number}","milestones_url":"https://api.github.com/repos/novoda/spikes/milestones{/number}","notifications_url":"https://api.github.com/repos/novoda/spikes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novoda/spikes/labels{/name}","releases_url":"https://api.github.com/repos/novoda/spikes/releases{/id}","deployments_url":"https://api.github.com/repos/novoda/spikes/deployments","created_at":"2013-10-03T14:31:43Z","updated_at":"2016-05-29T17:33:58Z","pushed_at":"2016-05-31T16:10:13Z","git_url":"git://github.com/novoda/spikes.git","ssh_url":"git@github.com:novoda/spikes.git","clone_url":"https://github.com/novoda/spikes.git","svn_url":"https://github.com/novoda/spikes","homepage":"","size":12684,"stargazers_count":43,"watchers_count":43,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":43,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/novoda/spikes/pulls/67"},"html":{"href":"https://github.com/novoda/spikes/pull/67"},"issue":{"href":"https://api.github.com/repos/novoda/spikes/issues/67"},"comments":{"href":"https://api.github.com/repos/novoda/spikes/issues/67/comments"},"review_comments":{"href":"https://api.github.com/repos/novoda/spikes/pulls/67/comments"},"review_comment":{"href":"https://api.github.com/repos/novoda/spikes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/novoda/spikes/pulls/67/commits"},"statuses":{"href":"https://api.github.com/repos/novoda/spikes/statuses/106240573d8af7e55c99470b0e552cdcd1d711de"}}}}
{"actor":{"display_login":"gbasile"}}