{"action":"opened","number":188,"pull_request":{"url":"https://api.github.com/repos/zeit/hyperterm/pulls/188","id":77724140,"html_url":"https://github.com/zeit/hyperterm/pull/188","diff_url":"https://github.com/zeit/hyperterm/pull/188.diff","patch_url":"https://github.com/zeit/hyperterm/pull/188.patch","issue_url":"https://api.github.com/repos/zeit/hyperterm/issues/188","number":188,"state":"open","locked":false,"title":"Example React Native implementation of hyperterm header","user":{"login":"necolas","id":239676,"avatar_url":"https://avatars.githubusercontent.com/u/239676?v=3","gravatar_id":"","url":"https://api.github.com/users/necolas","html_url":"https://github.com/necolas","followers_url":"https://api.github.com/users/necolas/followers","following_url":"https://api.github.com/users/necolas/following{/other_user}","gists_url":"https://api.github.com/users/necolas/gists{/gist_id}","starred_url":"https://api.github.com/users/necolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/necolas/subscriptions","organizations_url":"https://api.github.com/users/necolas/orgs","repos_url":"https://api.github.com/users/necolas/repos","events_url":"https://api.github.com/users/necolas/events{/privacy}","received_events_url":"https://api.github.com/users/necolas/received_events","type":"User","site_admin":false},"body":"Hey,\r\n\r\nHere's a rough example of how you could use React Native to build the terminal's header. There are a few warnings in the console about style properties React Native doesn't currently know about.\r\n\r\nYou'll notice that CSS pseudo-classes (e.g. `:hover`) aren't supported. However, it's quite common to track state like hover in JavaScript anyway (as you do in `Tab`).\r\n\r\nSomething else worth mentioning is that `View` is the main building block and has a column-based flexbox layout by default. It won't accept any text or font styles; those have to be applied to a `Text` element. A helpful pattern is to create a component that encapsulates the typography concerns, e.g., `<AppText color='white' size='normal'>bash</AppText>`.\r\n\r\nUser theming could be done with JS objects. Since you'd be working with objects and not strings, you can better control exactly what custom styles you apply to the components. For example, the color but not position of text nodes could be customizable:\r\n\r\n```\r\nexports.decorateConfig = (config) => {\r\n  return Object.assign({}, config, {\r\n    borderColor: 'yellow',\r\n    cursorColor: 'yellow',\r\n    css: Object.assign({}, config.css, {\r\n      tabText: {\r\n        color: 'yellow', // this style is a valid override\r\n        position: 'fixed' // this style is not, and you ignore it\r\n      },\r\n      tabsTitle: {\r\n        color: 'yellow'\r\n      }\r\n    })\r\n  });\r\n}\r\n```\r\n\r\n","created_at":"2016-07-17T01:47:09Z","updated_at":"2016-07-17T01:47:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1bcf00004c43401a88369e61393176ccdb2928d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zeit/hyperterm/pulls/188/commits","review_comments_url":"https://api.github.com/repos/zeit/hyperterm/pulls/188/comments","review_comment_url":"https://api.github.com/repos/zeit/hyperterm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zeit/hyperterm/issues/188/comments","statuses_url":"https://api.github.com/repos/zeit/hyperterm/statuses/cfcfc641e4a8f596f217625373cd695545cf5eff","head":{"label":"necolas:necolas/react-native-web-example","ref":"necolas/react-native-web-example","sha":"cfcfc641e4a8f596f217625373cd695545cf5eff","user":{"login":"necolas","id":239676,"avatar_url":"https://avatars.githubusercontent.com/u/239676?v=3","gravatar_id":"","url":"https://api.github.com/users/necolas","html_url":"https://github.com/necolas","followers_url":"https://api.github.com/users/necolas/followers","following_url":"https://api.github.com/users/necolas/following{/other_user}","gists_url":"https://api.github.com/users/necolas/gists{/gist_id}","starred_url":"https://api.github.com/users/necolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/necolas/subscriptions","organizations_url":"https://api.github.com/users/necolas/orgs","repos_url":"https://api.github.com/users/necolas/repos","events_url":"https://api.github.com/users/necolas/events{/privacy}","received_events_url":"https://api.github.com/users/necolas/received_events","type":"User","site_admin":false},"repo":{"id":63504443,"name":"hyperterm","full_name":"necolas/hyperterm","owner":{"login":"necolas","id":239676,"avatar_url":"https://avatars.githubusercontent.com/u/239676?v=3","gravatar_id":"","url":"https://api.github.com/users/necolas","html_url":"https://github.com/necolas","followers_url":"https://api.github.com/users/necolas/followers","following_url":"https://api.github.com/users/necolas/following{/other_user}","gists_url":"https://api.github.com/users/necolas/gists{/gist_id}","starred_url":"https://api.github.com/users/necolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/necolas/subscriptions","organizations_url":"https://api.github.com/users/necolas/orgs","repos_url":"https://api.github.com/users/necolas/repos","events_url":"https://api.github.com/users/necolas/events{/privacy}","received_events_url":"https://api.github.com/users/necolas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/necolas/hyperterm","description":null,"fork":true,"url":"https://api.github.com/repos/necolas/hyperterm","forks_url":"https://api.github.com/repos/necolas/hyperterm/forks","keys_url":"https://api.github.com/repos/necolas/hyperterm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/necolas/hyperterm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/necolas/hyperterm/teams","hooks_url":"https://api.github.com/repos/necolas/hyperterm/hooks","issue_events_url":"https://api.github.com/repos/necolas/hyperterm/issues/events{/number}","events_url":"https://api.github.com/repos/necolas/hyperterm/events","assignees_url":"https://api.github.com/repos/necolas/hyperterm/assignees{/user}","branches_url":"https://api.github.com/repos/necolas/hyperterm/branches{/branch}","tags_url":"https://api.github.com/repos/necolas/hyperterm/tags","blobs_url":"https://api.github.com/repos/necolas/hyperterm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/necolas/hyperterm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/necolas/hyperterm/git/refs{/sha}","trees_url":"https://api.github.com/repos/necolas/hyperterm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/necolas/hyperterm/statuses/{sha}","languages_url":"https://api.github.com/repos/necolas/hyperterm/languages","stargazers_url":"https://api.github.com/repos/necolas/hyperterm/stargazers","contributors_url":"https://api.github.com/repos/necolas/hyperterm/contributors","subscribers_url":"https://api.github.com/repos/necolas/hyperterm/subscribers","subscription_url":"https://api.github.com/repos/necolas/hyperterm/subscription","commits_url":"https://api.github.com/repos/necolas/hyperterm/commits{/sha}","git_commits_url":"https://api.github.com/repos/necolas/hyperterm/git/commits{/sha}","comments_url":"https://api.github.com/repos/necolas/hyperterm/comments{/number}","issue_comment_url":"https://api.github.com/repos/necolas/hyperterm/issues/comments{/number}","contents_url":"https://api.github.com/repos/necolas/hyperterm/contents/{+path}","compare_url":"https://api.github.com/repos/necolas/hyperterm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/necolas/hyperterm/merges","archive_url":"https://api.github.com/repos/necolas/hyperterm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/necolas/hyperterm/downloads","issues_url":"https://api.github.com/repos/necolas/hyperterm/issues{/number}","pulls_url":"https://api.github.com/repos/necolas/hyperterm/pulls{/number}","milestones_url":"https://api.github.com/repos/necolas/hyperterm/milestones{/number}","notifications_url":"https://api.github.com/repos/necolas/hyperterm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/necolas/hyperterm/labels{/name}","releases_url":"https://api.github.com/repos/necolas/hyperterm/releases{/id}","deployments_url":"https://api.github.com/repos/necolas/hyperterm/deployments","created_at":"2016-07-16T22:19:59Z","updated_at":"2016-07-16T22:20:00Z","pushed_at":"2016-07-17T01:28:41Z","git_url":"git://github.com/necolas/hyperterm.git","ssh_url":"git@github.com:necolas/hyperterm.git","clone_url":"https://github.com/necolas/hyperterm.git","svn_url":"https://github.com/necolas/hyperterm","homepage":null,"size":1091,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"zeit:master","ref":"master","sha":"e85f1658ef966433b6235807b8027720416c3b69","user":{"login":"zeit","id":14985020,"avatar_url":"https://avatars.githubusercontent.com/u/14985020?v=3","gravatar_id":"","url":"https://api.github.com/users/zeit","html_url":"https://github.com/zeit","followers_url":"https://api.github.com/users/zeit/followers","following_url":"https://api.github.com/users/zeit/following{/other_user}","gists_url":"https://api.github.com/users/zeit/gists{/gist_id}","starred_url":"https://api.github.com/users/zeit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeit/subscriptions","organizations_url":"https://api.github.com/users/zeit/orgs","repos_url":"https://api.github.com/users/zeit/repos","events_url":"https://api.github.com/users/zeit/events{/privacy}","received_events_url":"https://api.github.com/users/zeit/received_events","type":"Organization","site_admin":false},"repo":{"id":62367558,"name":"hyperterm","full_name":"zeit/hyperterm","owner":{"login":"zeit","id":14985020,"avatar_url":"https://avatars.githubusercontent.com/u/14985020?v=3","gravatar_id":"","url":"https://api.github.com/users/zeit","html_url":"https://github.com/zeit","followers_url":"https://api.github.com/users/zeit/followers","following_url":"https://api.github.com/users/zeit/following{/other_user}","gists_url":"https://api.github.com/users/zeit/gists{/gist_id}","starred_url":"https://api.github.com/users/zeit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeit/subscriptions","organizations_url":"https://api.github.com/users/zeit/orgs","repos_url":"https://api.github.com/users/zeit/repos","events_url":"https://api.github.com/users/zeit/events{/privacy}","received_events_url":"https://api.github.com/users/zeit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zeit/hyperterm","description":null,"fork":false,"url":"https://api.github.com/repos/zeit/hyperterm","forks_url":"https://api.github.com/repos/zeit/hyperterm/forks","keys_url":"https://api.github.com/repos/zeit/hyperterm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zeit/hyperterm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zeit/hyperterm/teams","hooks_url":"https://api.github.com/repos/zeit/hyperterm/hooks","issue_events_url":"https://api.github.com/repos/zeit/hyperterm/issues/events{/number}","events_url":"https://api.github.com/repos/zeit/hyperterm/events","assignees_url":"https://api.github.com/repos/zeit/hyperterm/assignees{/user}","branches_url":"https://api.github.com/repos/zeit/hyperterm/branches{/branch}","tags_url":"https://api.github.com/repos/zeit/hyperterm/tags","blobs_url":"https://api.github.com/repos/zeit/hyperterm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zeit/hyperterm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zeit/hyperterm/git/refs{/sha}","trees_url":"https://api.github.com/repos/zeit/hyperterm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zeit/hyperterm/statuses/{sha}","languages_url":"https://api.github.com/repos/zeit/hyperterm/languages","stargazers_url":"https://api.github.com/repos/zeit/hyperterm/stargazers","contributors_url":"https://api.github.com/repos/zeit/hyperterm/contributors","subscribers_url":"https://api.github.com/repos/zeit/hyperterm/subscribers","subscription_url":"https://api.github.com/repos/zeit/hyperterm/subscription","commits_url":"https://api.github.com/repos/zeit/hyperterm/commits{/sha}","git_commits_url":"https://api.github.com/repos/zeit/hyperterm/git/commits{/sha}","comments_url":"https://api.github.com/repos/zeit/hyperterm/comments{/number}","issue_comment_url":"https://api.github.com/repos/zeit/hyperterm/issues/comments{/number}","contents_url":"https://api.github.com/repos/zeit/hyperterm/contents/{+path}","compare_url":"https://api.github.com/repos/zeit/hyperterm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zeit/hyperterm/merges","archive_url":"https://api.github.com/repos/zeit/hyperterm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zeit/hyperterm/downloads","issues_url":"https://api.github.com/repos/zeit/hyperterm/issues{/number}","pulls_url":"https://api.github.com/repos/zeit/hyperterm/pulls{/number}","milestones_url":"https://api.github.com/repos/zeit/hyperterm/milestones{/number}","notifications_url":"https://api.github.com/repos/zeit/hyperterm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zeit/hyperterm/labels{/name}","releases_url":"https://api.github.com/repos/zeit/hyperterm/releases{/id}","deployments_url":"https://api.github.com/repos/zeit/hyperterm/deployments","created_at":"2016-07-01T06:01:21Z","updated_at":"2016-07-17T01:45:08Z","pushed_at":"2016-07-17T01:30:27Z","git_url":"git://github.com/zeit/hyperterm.git","ssh_url":"git@github.com:zeit/hyperterm.git","clone_url":"https://github.com/zeit/hyperterm.git","svn_url":"https://github.com/zeit/hyperterm","homepage":null,"size":1104,"stargazers_count":2731,"watchers_count":2731,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":116,"mirror_url":null,"open_issues_count":118,"forks":116,"open_issues":118,"watchers":2731,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zeit/hyperterm/pulls/188"},"html":{"href":"https://github.com/zeit/hyperterm/pull/188"},"issue":{"href":"https://api.github.com/repos/zeit/hyperterm/issues/188"},"comments":{"href":"https://api.github.com/repos/zeit/hyperterm/issues/188/comments"},"review_comments":{"href":"https://api.github.com/repos/zeit/hyperterm/pulls/188/comments"},"review_comment":{"href":"https://api.github.com/repos/zeit/hyperterm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zeit/hyperterm/pulls/188/commits"},"statuses":{"href":"https://api.github.com/repos/zeit/hyperterm/statuses/cfcfc641e4a8f596f217625373cd695545cf5eff"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":235,"deletions":223,"changed_files":6}}
{"actor":{"display_login":"necolas"}}