{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react-native/pulls/comments/51478372","id":51478372,"diff_hunk":"@@ -0,0 +1,159 @@\n+/**\n+ * Copyright (c) 2015-present, Facebook, Inc.\n+ * All rights reserved.\n+ *\n+ * This source code is licensed under the BSD-style license found in the\n+ * LICENSE file in the root directory of this source tree. An additional grant\n+ * of patent rights can be found in the PATENTS file in the same directory.\n+ *\n+ * @providesModule StatusBar\n+ * @flow\n+ */\n+'use strict';\n+\n+const React = require('React');\n+const ColorPropType = require('ColorPropType');\n+const Platform = require('Platform');\n+\n+const processColor = require('processColor');\n+\n+if (Platform.OS === 'ios') {\n+  var RCTStatusBarManager = require('NativeModules').StatusBarManager;\n+} else if (Platform.OS === 'android') {\n+  var RCTStatusBarManager = require('NativeModules').StatusBarAndroid;\n+}\n+\n+import type ReactElement from 'ReactElement';\n+\n+type DefaultProps = {\n+  animated: boolean;\n+};\n+\n+const StatusBar = React.createClass({\n+  statics: {\n+    _propsStack: [],\n+  },\n+\n+  propTypes: {\n+    /**\n+     * If the status bar is hidden.\n+     */\n+    hidden: React.PropTypes.bool,\n+    /**\n+     * If the transition between status bar property changes should be animated.\n+     * Supported for color, barStyle and hidden.\n+     */\n+    animated: React.PropTypes.bool,","path":"Libraries/Components/StatusBar/StatusBar.js","position":46,"original_position":46,"commit_id":"fb704bd321683cc0382e770f912776346c514aaa","original_commit_id":"fb704bd321683cc0382e770f912776346c514aaa","user":{"login":"nicklockwood","id":546885,"avatar_url":"https://avatars.githubusercontent.com/u/546885?v=3","gravatar_id":"","url":"https://api.github.com/users/nicklockwood","html_url":"https://github.com/nicklockwood","followers_url":"https://api.github.com/users/nicklockwood/followers","following_url":"https://api.github.com/users/nicklockwood/following{/other_user}","gists_url":"https://api.github.com/users/nicklockwood/gists{/gist_id}","starred_url":"https://api.github.com/users/nicklockwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicklockwood/subscriptions","organizations_url":"https://api.github.com/users/nicklockwood/orgs","repos_url":"https://api.github.com/users/nicklockwood/repos","events_url":"https://api.github.com/users/nicklockwood/events{/privacy}","received_events_url":"https://api.github.com/users/nicklockwood/received_events","type":"User","site_admin":false},"body":"I don't think that works. It makes it sound like \"hidden\" refers to the transition, not the other way around.","created_at":"2016-02-01T20:49:50Z","updated_at":"2016-02-01T20:49:50Z","html_url":"https://github.com/facebook/react-native/pull/5360#discussion_r51478372","pull_request_url":"https://api.github.com/repos/facebook/react-native/pulls/5360","_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments/51478372"},"html":{"href":"https://github.com/facebook/react-native/pull/5360#discussion_r51478372"},"pull_request":{"href":"https://api.github.com/repos/facebook/react-native/pulls/5360"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/react-native/pulls/5360","id":56261271,"html_url":"https://github.com/facebook/react-native/pull/5360","diff_url":"https://github.com/facebook/react-native/pull/5360.diff","patch_url":"https://github.com/facebook/react-native/pull/5360.patch","issue_url":"https://api.github.com/repos/facebook/react-native/issues/5360","number":5360,"state":"open","locked":false,"title":"[WIP] Cross platform status bar API","user":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"body":"I started working on improving the `StatusBar` API and make it work on Android. I added support for `setColor`, `setTranslucent` (the status bar is still visible but the app can draw under) and `setHidden` on Android. Looking for feedback on how to improve the API before I put more time on this :).\r\n\r\nRight now I went for a cross platform API and functions that don't exist on a platform are just a no-op but I'm not sure it is the best choice since at the moment what is supported is very different between both platforms. I was wondering what you guys think and if it would be better off as 2 different modules.\r\n\r\nIt is also possible to port some of the features I added for Android to iOS even if there is no 'standard' way to do it. Like `setColor` could be implemented by drawing a colored view under the status bar and translucent by adding/removing some padding.","created_at":"2016-01-16T19:42:22Z","updated_at":"2016-02-01T20:49:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee2af7aad86d54695404383b3467fc84f8d1c74d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react-native/pulls/5360/commits","review_comments_url":"https://api.github.com/repos/facebook/react-native/pulls/5360/comments","review_comment_url":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/5360/comments","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/fb704bd321683cc0382e770f912776346c514aaa","head":{"label":"janicduplessis:statusbar","ref":"statusbar","sha":"fb704bd321683cc0382e770f912776346c514aaa","user":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"repo":{"id":33167181,"name":"react-native","full_name":"janicduplessis/react-native","owner":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/janicduplessis/react-native","description":"A framework for building native apps with React.","fork":true,"url":"https://api.github.com/repos/janicduplessis/react-native","forks_url":"https://api.github.com/repos/janicduplessis/react-native/forks","keys_url":"https://api.github.com/repos/janicduplessis/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/janicduplessis/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/janicduplessis/react-native/teams","hooks_url":"https://api.github.com/repos/janicduplessis/react-native/hooks","issue_events_url":"https://api.github.com/repos/janicduplessis/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/janicduplessis/react-native/events","assignees_url":"https://api.github.com/repos/janicduplessis/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/janicduplessis/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/janicduplessis/react-native/tags","blobs_url":"https://api.github.com/repos/janicduplessis/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/janicduplessis/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/janicduplessis/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/janicduplessis/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/janicduplessis/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/janicduplessis/react-native/languages","stargazers_url":"https://api.github.com/repos/janicduplessis/react-native/stargazers","contributors_url":"https://api.github.com/repos/janicduplessis/react-native/contributors","subscribers_url":"https://api.github.com/repos/janicduplessis/react-native/subscribers","subscription_url":"https://api.github.com/repos/janicduplessis/react-native/subscription","commits_url":"https://api.github.com/repos/janicduplessis/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/janicduplessis/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/janicduplessis/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/janicduplessis/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/janicduplessis/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/janicduplessis/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/janicduplessis/react-native/merges","archive_url":"https://api.github.com/repos/janicduplessis/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/janicduplessis/react-native/downloads","issues_url":"https://api.github.com/repos/janicduplessis/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/janicduplessis/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/janicduplessis/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/janicduplessis/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/janicduplessis/react-native/labels{/name}","releases_url":"https://api.github.com/repos/janicduplessis/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/janicduplessis/react-native/deployments","created_at":"2015-03-31T05:43:42Z","updated_at":"2016-01-27T20:33:47Z","pushed_at":"2016-01-30T21:03:05Z","git_url":"git://github.com/janicduplessis/react-native.git","ssh_url":"git@github.com:janicduplessis/react-native.git","clone_url":"https://github.com/janicduplessis/react-native.git","svn_url":"https://github.com/janicduplessis/react-native","homepage":"http://facebook.github.io/react-native/","size":33096,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"7e5247c041cbf6a302f9392f87f1897aa83c31dd","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":29028775,"name":"react-native","full_name":"facebook/react-native","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react-native","description":"A framework for building native apps with React.","fork":false,"url":"https://api.github.com/repos/facebook/react-native","forks_url":"https://api.github.com/repos/facebook/react-native/forks","keys_url":"https://api.github.com/repos/facebook/react-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react-native/teams","hooks_url":"https://api.github.com/repos/facebook/react-native/hooks","issue_events_url":"https://api.github.com/repos/facebook/react-native/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react-native/events","assignees_url":"https://api.github.com/repos/facebook/react-native/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react-native/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react-native/tags","blobs_url":"https://api.github.com/repos/facebook/react-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react-native/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react-native/languages","stargazers_url":"https://api.github.com/repos/facebook/react-native/stargazers","contributors_url":"https://api.github.com/repos/facebook/react-native/contributors","subscribers_url":"https://api.github.com/repos/facebook/react-native/subscribers","subscription_url":"https://api.github.com/repos/facebook/react-native/subscription","commits_url":"https://api.github.com/repos/facebook/react-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react-native/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react-native/merges","archive_url":"https://api.github.com/repos/facebook/react-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react-native/downloads","issues_url":"https://api.github.com/repos/facebook/react-native/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react-native/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react-native/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react-native/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react-native/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react-native/deployments","created_at":"2015-01-09T18:10:16Z","updated_at":"2016-02-01T20:37:34Z","pushed_at":"2016-02-01T20:48:37Z","git_url":"git://github.com/facebook/react-native.git","ssh_url":"git@github.com:facebook/react-native.git","clone_url":"https://github.com/facebook/react-native.git","svn_url":"https://github.com/facebook/react-native","homepage":"http://facebook.github.io/react-native/","size":73848,"stargazers_count":26650,"watchers_count":26650,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4758,"mirror_url":null,"open_issues_count":1041,"forks":4758,"open_issues":1041,"watchers":26650,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react-native/pulls/5360"},"html":{"href":"https://github.com/facebook/react-native/pull/5360"},"issue":{"href":"https://api.github.com/repos/facebook/react-native/issues/5360"},"comments":{"href":"https://api.github.com/repos/facebook/react-native/issues/5360/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react-native/pulls/5360/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react-native/pulls/5360/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react-native/statuses/fb704bd321683cc0382e770f912776346c514aaa"}}}}