{"action":"created","comment":{"url":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/comments/199966884","pull_request_review_id":134189273,"id":199966884,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTk2Njg4NA==","diff_hunk":"@@ -0,0 +1,116 @@\n+// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.\n+// See LICENSE.txt for license information.\n+\n+import PropTypes from 'prop-types';\n+import React from 'react';\n+import {TextInput} from 'react-native';\n+\n+// A component that can be used to make partially-controlled inputs that can be updated\n+// by changing the value prop without lagging the UI.\n+//\n+// We're using this in place of a connected TextInput due to changes made in RN v0.54\n+// that break input in Chinese and Japanese when using a connected TextInput. See\n+// https://github.com/facebook/react-native/issues/18403 for more information.\n+//\n+// In addition to that, there's also an ugly hack to change the key on the TextInput\n+// when this is triggered because that same version made setNativeProps work inconsistently.\n+// See https://github.com/facebook/react-native/issues/18272 for more information on that.\n+export default class QuickTextInput extends React.PureComponent {\n+    static propTypes = {\n+\n+        onChangeText: PropTypes.func,\n+\n+        /**\n+         * The string value displayed in this input\n+         */\n+        value: PropTypes.string.isRequired,\n+    };\n+\n+    static defaultProps = {\n+        delayInputUpdate: false,\n+        value: '',\n+    };\n+\n+    constructor(props) {\n+        super(props);\n+\n+        this.storedValue = props.value;\n+\n+        this.state = {\n+            key: 0,\n+        };\n+    }\n+\n+    componentDidMount() {\n+        this.updateInputFromProps();\n+    }\n+\n+    UNSAFE_componentWillReceiveProps(nextProps) { // eslint-disable-line camelcase","path":"app/components/quick_text_input.js","position":48,"original_position":48,"commit_id":"ac5aaea57088c7ea0a6aec203b85fa6ad1e4cbf4","original_commit_id":"ac5aaea57088c7ea0a6aec203b85fa6ad1e4cbf4","user":{"login":"enahum","id":6757047,"node_id":"MDQ6VXNlcjY3NTcwNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/6757047?v=4","gravatar_id":"","url":"https://api.github.com/users/enahum","html_url":"https://github.com/enahum","followers_url":"https://api.github.com/users/enahum/followers","following_url":"https://api.github.com/users/enahum/following{/other_user}","gists_url":"https://api.github.com/users/enahum/gists{/gist_id}","starred_url":"https://api.github.com/users/enahum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enahum/subscriptions","organizations_url":"https://api.github.com/users/enahum/orgs","repos_url":"https://api.github.com/users/enahum/repos","events_url":"https://api.github.com/users/enahum/events{/privacy}","received_events_url":"https://api.github.com/users/enahum/received_events","type":"User","site_admin":false},"body":"why not use `getDerivedStateFromProps` ??","created_at":"2018-07-03T22:28:05Z","updated_at":"2018-07-03T22:29:40Z","html_url":"https://github.com/mattermost/mattermost-mobile/pull/1871#discussion_r199966884","pull_request_url":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/1871","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/comments/199966884"},"html":{"href":"https://github.com/mattermost/mattermost-mobile/pull/1871#discussion_r199966884"},"pull_request":{"href":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/1871"}}},"pull_request":{"url":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/1871","id":199097215,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5MDk3MjE1","html_url":"https://github.com/mattermost/mattermost-mobile/pull/1871","diff_url":"https://github.com/mattermost/mattermost-mobile/pull/1871.diff","patch_url":"https://github.com/mattermost/mattermost-mobile/pull/1871.patch","issue_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/1871","number":1871,"state":"open","locked":false,"title":"MM-11116 Re-added QuickTextInput and added another hack on top of it","user":{"login":"hmhealey","id":3277310,"node_id":"MDQ6VXNlcjMyNzczMTA=","avatar_url":"https://avatars3.githubusercontent.com/u/3277310?v=4","gravatar_id":"","url":"https://api.github.com/users/hmhealey","html_url":"https://github.com/hmhealey","followers_url":"https://api.github.com/users/hmhealey/followers","following_url":"https://api.github.com/users/hmhealey/following{/other_user}","gists_url":"https://api.github.com/users/hmhealey/gists{/gist_id}","starred_url":"https://api.github.com/users/hmhealey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmhealey/subscriptions","organizations_url":"https://api.github.com/users/hmhealey/orgs","repos_url":"https://api.github.com/users/hmhealey/repos","events_url":"https://api.github.com/users/hmhealey/events{/privacy}","received_events_url":"https://api.github.com/users/hmhealey/received_events","type":"User","site_admin":false},"body":"I have no words for how ugly this hack is.\r\n\r\n#### Ticket Link\r\nhttps://mattermost.atlassian.net/browse/MM-11116\r\n\r\n#### Device Information\r\nThis PR was tested on: iOS Simulator","created_at":"2018-07-03T22:22:00Z","updated_at":"2018-07-03T22:29:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"61a57991b2d04bbbc2221d9484177c9df8a4682f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"saturninoabril","id":5334504,"node_id":"MDQ6VXNlcjUzMzQ1MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5334504?v=4","gravatar_id":"","url":"https://api.github.com/users/saturninoabril","html_url":"https://github.com/saturninoabril","followers_url":"https://api.github.com/users/saturninoabril/followers","following_url":"https://api.github.com/users/saturninoabril/following{/other_user}","gists_url":"https://api.github.com/users/saturninoabril/gists{/gist_id}","starred_url":"https://api.github.com/users/saturninoabril/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saturninoabril/subscriptions","organizations_url":"https://api.github.com/users/saturninoabril/orgs","repos_url":"https://api.github.com/users/saturninoabril/repos","events_url":"https://api.github.com/users/saturninoabril/events{/privacy}","received_events_url":"https://api.github.com/users/saturninoabril/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":460355259,"node_id":"MDU6TGFiZWw0NjAzNTUyNTk=","url":"https://api.github.com/repos/mattermost/mattermost-mobile/labels/1:%20Needs%20testing","name":"1: Needs testing","color":"5444a3","default":false},{"id":460355330,"node_id":"MDU6TGFiZWw0NjAzNTUzMzA=","url":"https://api.github.com/repos/mattermost/mattermost-mobile/labels/2:%20Dev%20Review","name":"2: Dev Review","color":"eb6420","default":false}],"milestone":{"url":"https://api.github.com/repos/mattermost/mattermost-mobile/milestones/9","html_url":"https://github.com/mattermost/mattermost-mobile/milestone/9","labels_url":"https://api.github.com/repos/mattermost/mattermost-mobile/milestones/9/labels","id":3280750,"node_id":"MDk6TWlsZXN0b25lMzI4MDc1MA==","number":9,"title":"1.9","description":"","creator":{"login":"enahum","id":6757047,"node_id":"MDQ6VXNlcjY3NTcwNDc=","avatar_url":"https://avatars1.githubusercontent.com/u/6757047?v=4","gravatar_id":"","url":"https://api.github.com/users/enahum","html_url":"https://github.com/enahum","followers_url":"https://api.github.com/users/enahum/followers","following_url":"https://api.github.com/users/enahum/following{/other_user}","gists_url":"https://api.github.com/users/enahum/gists{/gist_id}","starred_url":"https://api.github.com/users/enahum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enahum/subscriptions","organizations_url":"https://api.github.com/users/enahum/orgs","repos_url":"https://api.github.com/users/enahum/repos","events_url":"https://api.github.com/users/enahum/events{/privacy}","received_events_url":"https://api.github.com/users/enahum/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":102,"state":"open","created_at":"2018-04-19T11:07:00Z","updated_at":"2018-07-03T22:22:00Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/1871/commits","review_comments_url":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/1871/comments","review_comment_url":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/1871/comments","statuses_url":"https://api.github.com/repos/mattermost/mattermost-mobile/statuses/ac5aaea57088c7ea0a6aec203b85fa6ad1e4cbf4","head":{"label":"mattermost:mm11116a-1.9","ref":"mm11116a-1.9","sha":"ac5aaea57088c7ea0a6aec203b85fa6ad1e4cbf4","user":{"login":"mattermost","id":9828093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4MjgwOTM=","avatar_url":"https://avatars1.githubusercontent.com/u/9828093?v=4","gravatar_id":"","url":"https://api.github.com/users/mattermost","html_url":"https://github.com/mattermost","followers_url":"https://api.github.com/users/mattermost/followers","following_url":"https://api.github.com/users/mattermost/following{/other_user}","gists_url":"https://api.github.com/users/mattermost/gists{/gist_id}","starred_url":"https://api.github.com/users/mattermost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattermost/subscriptions","organizations_url":"https://api.github.com/users/mattermost/orgs","repos_url":"https://api.github.com/users/mattermost/repos","events_url":"https://api.github.com/users/mattermost/events{/privacy}","received_events_url":"https://api.github.com/users/mattermost/received_events","type":"Organization","site_admin":false},"repo":{"id":70265724,"node_id":"MDEwOlJlcG9zaXRvcnk3MDI2NTcyNA==","name":"mattermost-mobile","full_name":"mattermost/mattermost-mobile","owner":{"login":"mattermost","id":9828093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4MjgwOTM=","avatar_url":"https://avatars1.githubusercontent.com/u/9828093?v=4","gravatar_id":"","url":"https://api.github.com/users/mattermost","html_url":"https://github.com/mattermost","followers_url":"https://api.github.com/users/mattermost/followers","following_url":"https://api.github.com/users/mattermost/following{/other_user}","gists_url":"https://api.github.com/users/mattermost/gists{/gist_id}","starred_url":"https://api.github.com/users/mattermost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattermost/subscriptions","organizations_url":"https://api.github.com/users/mattermost/orgs","repos_url":"https://api.github.com/users/mattermost/repos","events_url":"https://api.github.com/users/mattermost/events{/privacy}","received_events_url":"https://api.github.com/users/mattermost/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mattermost/mattermost-mobile","description":"Next generation iOS and Android apps for Mattermost in React Native","fork":false,"url":"https://api.github.com/repos/mattermost/mattermost-mobile","forks_url":"https://api.github.com/repos/mattermost/mattermost-mobile/forks","keys_url":"https://api.github.com/repos/mattermost/mattermost-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattermost/mattermost-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattermost/mattermost-mobile/teams","hooks_url":"https://api.github.com/repos/mattermost/mattermost-mobile/hooks","issue_events_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/mattermost/mattermost-mobile/events","assignees_url":"https://api.github.com/repos/mattermost/mattermost-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/mattermost/mattermost-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/mattermost/mattermost-mobile/tags","blobs_url":"https://api.github.com/repos/mattermost/mattermost-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattermost/mattermost-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattermost/mattermost-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattermost/mattermost-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattermost/mattermost-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/mattermost/mattermost-mobile/languages","stargazers_url":"https://api.github.com/repos/mattermost/mattermost-mobile/stargazers","contributors_url":"https://api.github.com/repos/mattermost/mattermost-mobile/contributors","subscribers_url":"https://api.github.com/repos/mattermost/mattermost-mobile/subscribers","subscription_url":"https://api.github.com/repos/mattermost/mattermost-mobile/subscription","commits_url":"https://api.github.com/repos/mattermost/mattermost-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattermost/mattermost-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattermost/mattermost-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattermost/mattermost-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/mattermost/mattermost-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattermost/mattermost-mobile/merges","archive_url":"https://api.github.com/repos/mattermost/mattermost-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattermost/mattermost-mobile/downloads","issues_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/mattermost/mattermost-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/mattermost/mattermost-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattermost/mattermost-mobile/labels{/name}","releases_url":"https://api.github.com/repos/mattermost/mattermost-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/mattermost/mattermost-mobile/deployments","created_at":"2016-10-07T16:52:32Z","updated_at":"2018-07-03T17:18:14Z","pushed_at":"2018-07-03T22:22:00Z","git_url":"git://github.com/mattermost/mattermost-mobile.git","ssh_url":"git@github.com:mattermost/mattermost-mobile.git","clone_url":"https://github.com/mattermost/mattermost-mobile.git","svn_url":"https://github.com/mattermost/mattermost-mobile","homepage":"https://about.mattermost.com/","size":20600,"stargazers_count":448,"watchers_count":448,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":196,"mirror_url":null,"archived":false,"open_issues_count":29,"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":196,"open_issues":29,"watchers":448,"default_branch":"master"}},"base":{"label":"mattermost:release-1.9","ref":"release-1.9","sha":"952aeaf786c1d4f38e0bfd8c92a1d2dd8a559ab2","user":{"login":"mattermost","id":9828093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4MjgwOTM=","avatar_url":"https://avatars1.githubusercontent.com/u/9828093?v=4","gravatar_id":"","url":"https://api.github.com/users/mattermost","html_url":"https://github.com/mattermost","followers_url":"https://api.github.com/users/mattermost/followers","following_url":"https://api.github.com/users/mattermost/following{/other_user}","gists_url":"https://api.github.com/users/mattermost/gists{/gist_id}","starred_url":"https://api.github.com/users/mattermost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattermost/subscriptions","organizations_url":"https://api.github.com/users/mattermost/orgs","repos_url":"https://api.github.com/users/mattermost/repos","events_url":"https://api.github.com/users/mattermost/events{/privacy}","received_events_url":"https://api.github.com/users/mattermost/received_events","type":"Organization","site_admin":false},"repo":{"id":70265724,"node_id":"MDEwOlJlcG9zaXRvcnk3MDI2NTcyNA==","name":"mattermost-mobile","full_name":"mattermost/mattermost-mobile","owner":{"login":"mattermost","id":9828093,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk4MjgwOTM=","avatar_url":"https://avatars1.githubusercontent.com/u/9828093?v=4","gravatar_id":"","url":"https://api.github.com/users/mattermost","html_url":"https://github.com/mattermost","followers_url":"https://api.github.com/users/mattermost/followers","following_url":"https://api.github.com/users/mattermost/following{/other_user}","gists_url":"https://api.github.com/users/mattermost/gists{/gist_id}","starred_url":"https://api.github.com/users/mattermost/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattermost/subscriptions","organizations_url":"https://api.github.com/users/mattermost/orgs","repos_url":"https://api.github.com/users/mattermost/repos","events_url":"https://api.github.com/users/mattermost/events{/privacy}","received_events_url":"https://api.github.com/users/mattermost/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mattermost/mattermost-mobile","description":"Next generation iOS and Android apps for Mattermost in React Native","fork":false,"url":"https://api.github.com/repos/mattermost/mattermost-mobile","forks_url":"https://api.github.com/repos/mattermost/mattermost-mobile/forks","keys_url":"https://api.github.com/repos/mattermost/mattermost-mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattermost/mattermost-mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattermost/mattermost-mobile/teams","hooks_url":"https://api.github.com/repos/mattermost/mattermost-mobile/hooks","issue_events_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/events{/number}","events_url":"https://api.github.com/repos/mattermost/mattermost-mobile/events","assignees_url":"https://api.github.com/repos/mattermost/mattermost-mobile/assignees{/user}","branches_url":"https://api.github.com/repos/mattermost/mattermost-mobile/branches{/branch}","tags_url":"https://api.github.com/repos/mattermost/mattermost-mobile/tags","blobs_url":"https://api.github.com/repos/mattermost/mattermost-mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattermost/mattermost-mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattermost/mattermost-mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattermost/mattermost-mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattermost/mattermost-mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/mattermost/mattermost-mobile/languages","stargazers_url":"https://api.github.com/repos/mattermost/mattermost-mobile/stargazers","contributors_url":"https://api.github.com/repos/mattermost/mattermost-mobile/contributors","subscribers_url":"https://api.github.com/repos/mattermost/mattermost-mobile/subscribers","subscription_url":"https://api.github.com/repos/mattermost/mattermost-mobile/subscription","commits_url":"https://api.github.com/repos/mattermost/mattermost-mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattermost/mattermost-mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattermost/mattermost-mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattermost/mattermost-mobile/contents/{+path}","compare_url":"https://api.github.com/repos/mattermost/mattermost-mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattermost/mattermost-mobile/merges","archive_url":"https://api.github.com/repos/mattermost/mattermost-mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattermost/mattermost-mobile/downloads","issues_url":"https://api.github.com/repos/mattermost/mattermost-mobile/issues{/number}","pulls_url":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/mattermost/mattermost-mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/mattermost/mattermost-mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattermost/mattermost-mobile/labels{/name}","releases_url":"https://api.github.com/repos/mattermost/mattermost-mobile/releases{/id}","deployments_url":"https://api.github.com/repos/mattermost/mattermost-mobile/deployments","created_at":"2016-10-07T16:52:32Z","updated_at":"2018-07-03T17:18:14Z","pushed_at":"2018-07-03T22:22:00Z","git_url":"git://github.com/mattermost/mattermost-mobile.git","ssh_url":"git@github.com:mattermost/mattermost-mobile.git","clone_url":"https://github.com/mattermost/mattermost-mobile.git","svn_url":"https://github.com/mattermost/mattermost-mobile","homepage":"https://about.mattermost.com/","size":20600,"stargazers_count":448,"watchers_count":448,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":196,"mirror_url":null,"archived":false,"open_issues_count":29,"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":196,"open_issues":29,"watchers":448,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/1871"},"html":{"href":"https://github.com/mattermost/mattermost-mobile/pull/1871"},"issue":{"href":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/1871"},"comments":{"href":"https://api.github.com/repos/mattermost/mattermost-mobile/issues/1871/comments"},"review_comments":{"href":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/1871/comments"},"review_comment":{"href":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mattermost/mattermost-mobile/pulls/1871/commits"},"statuses":{"href":"https://api.github.com/repos/mattermost/mattermost-mobile/statuses/ac5aaea57088c7ea0a6aec203b85fa6ad1e4cbf4"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"enahum"}}