{"action":"created","comment":{"url":"https://api.github.com/repos/keboola/kbc-ui/pulls/comments/205770050","pull_request_review_id":141108744,"id":205770050,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTc3MDA1MA==","diff_hunk":"@@ -0,0 +1,121 @@\n+import React from 'react';\n+import _ from 'underscore';\n+import {Input} from './../../../../../../react/common/KbcBootstrap';\n+import Select from 'react-select';\n+\n+export default React.createClass({\n+\n+  propTypes: {\n+    key: React.PropTypes.string.isRequired,\n+    datatype: React.PropTypes.object.isRequired,\n+    datatypesMap: React.PropTypes.object.isRequired,\n+    disabled: React.PropTypes.bool.isRequired,\n+    onChange: React.PropTypes.func.isRequired\n+  },\n+\n+  getInitialState() {\n+    return {\n+      hovered: false\n+    };\n+  },\n+\n+  lengthEnabled() {\n+    const selectedType = this.props.datatypesMap.filter((datatype) => {\n+      return datatype.get('name') === this.props.datatype.get('type');\n+    });\n+    return selectedType.get(this.props.datatype.get('type')).get('size');\n+  },\n+\n+  handleTypeChange(newType) {\n+    return this.props.onChange(this.props.datatype.set('type', newType.value));\n+  },\n+\n+  handleLengthChange(e) {\n+    return this.props.onChange(this.props.datatype.set('length', e.target.value));\n+  },\n+\n+  handleNullableChange(e) {\n+    if (e.target.checked) {\n+      return this.props.onChange(this.props.datatype.set('convertEmptyValuesToNull'), true);\n+    } else {\n+      return this.props.onChange(this.props.datatype.set('convertEmptyValuesToNull'), false);\n+    }\n+  },\n+\n+  getTypeOptions() {\n+    return _.map(_.keys(this.props.datatypesMap.toJS()), (option) => {\n+      return {\n+        label: option,\n+        value: option\n+      };\n+    });\n+  },\n+\n+  setHoveredTrue() {\n+    return this.setState({\n+      hovered: true\n+    });\n+  },\n+\n+  setHoveredFalse() {\n+    return this.setState({\n+      hovered: false\n+    });\n+  },\n+\n+  getCheckboxLabel() {\n+    if (this.state.hovered) {\n+      return (\n+        <span>Empty values as <code>null</code></span>\n+      );\n+    } else {\n+      return (\n+        <span>&nbsp;<code/></span>","path":"src/scripts/modules/transformations/react/components/mapping/input/DatatypeFormRow.jsx","position":73,"original_position":73,"commit_id":"ee7c28a2d338b9e47ae4cd9ffd9e40e62fdddeb6","original_commit_id":"ee7c28a2d338b9e47ae4cd9ffd9e40e62fdddeb6","user":{"login":"pivnicek","id":569139,"node_id":"MDQ6VXNlcjU2OTEzOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/569139?v=4","gravatar_id":"","url":"https://api.github.com/users/pivnicek","html_url":"https://github.com/pivnicek","followers_url":"https://api.github.com/users/pivnicek/followers","following_url":"https://api.github.com/users/pivnicek/following{/other_user}","gists_url":"https://api.github.com/users/pivnicek/gists{/gist_id}","starred_url":"https://api.github.com/users/pivnicek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivnicek/subscriptions","organizations_url":"https://api.github.com/users/pivnicek/orgs","repos_url":"https://api.github.com/users/pivnicek/repos","events_url":"https://api.github.com/users/pivnicek/events{/privacy}","received_events_url":"https://api.github.com/users/pivnicek/received_events","type":"User","site_admin":false},"body":"it's the only way I could figure to maintain height consistency.  If you take it out and check the hover you'll see why :-)","created_at":"2018-07-27T13:20:50Z","updated_at":"2018-07-27T13:20:51Z","html_url":"https://github.com/keboola/kbc-ui/pull/1676#discussion_r205770050","pull_request_url":"https://api.github.com/repos/keboola/kbc-ui/pulls/1676","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/keboola/kbc-ui/pulls/comments/205770050"},"html":{"href":"https://github.com/keboola/kbc-ui/pull/1676#discussion_r205770050"},"pull_request":{"href":"https://api.github.com/repos/keboola/kbc-ui/pulls/1676"}},"in_reply_to_id":205748132},"pull_request":{"url":"https://api.github.com/repos/keboola/kbc-ui/pulls/1676","id":188064947,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg4MDY0OTQ3","html_url":"https://github.com/keboola/kbc-ui/pull/1676","diff_url":"https://github.com/keboola/kbc-ui/pull/1676.diff","patch_url":"https://github.com/keboola/kbc-ui/pull/1676.patch","issue_url":"https://api.github.com/repos/keboola/kbc-ui/issues/1676","number":1676,"state":"open","locked":false,"title":"[R4R] Add suggested datatypes for transformation inputs","user":{"login":"pivnicek","id":569139,"node_id":"MDQ6VXNlcjU2OTEzOQ==","avatar_url":"https://avatars1.githubusercontent.com/u/569139?v=4","gravatar_id":"","url":"https://api.github.com/users/pivnicek","html_url":"https://github.com/pivnicek","followers_url":"https://api.github.com/users/pivnicek/followers","following_url":"https://api.github.com/users/pivnicek/following{/other_user}","gists_url":"https://api.github.com/users/pivnicek/gists{/gist_id}","starred_url":"https://api.github.com/users/pivnicek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivnicek/subscriptions","organizations_url":"https://api.github.com/users/pivnicek/orgs","repos_url":"https://api.github.com/users/pivnicek/repos","events_url":"https://api.github.com/users/pivnicek/events{/privacy}","received_events_url":"https://api.github.com/users/pivnicek/received_events","type":"User","site_admin":false},"body":"Fixes #1677 and #1719 \r\n\r\nProposed changes:\r\n\r\n- Change the datatypes section of the input mapping to be a table with the ability to set type for each column individually.  If types are already known from an extractor, set those as default.\r\n","created_at":"2018-05-15T09:25:36Z","updated_at":"2018-07-27T13:20:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14edbebc9e67e1c257aad5cf6fdbb43dd84d5e3a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"janmichek","id":15363559,"node_id":"MDQ6VXNlcjE1MzYzNTU5","avatar_url":"https://avatars2.githubusercontent.com/u/15363559?v=4","gravatar_id":"","url":"https://api.github.com/users/janmichek","html_url":"https://github.com/janmichek","followers_url":"https://api.github.com/users/janmichek/followers","following_url":"https://api.github.com/users/janmichek/following{/other_user}","gists_url":"https://api.github.com/users/janmichek/gists{/gist_id}","starred_url":"https://api.github.com/users/janmichek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janmichek/subscriptions","organizations_url":"https://api.github.com/users/janmichek/orgs","repos_url":"https://api.github.com/users/janmichek/repos","events_url":"https://api.github.com/users/janmichek/events{/privacy}","received_events_url":"https://api.github.com/users/janmichek/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/keboola/kbc-ui/pulls/1676/commits","review_comments_url":"https://api.github.com/repos/keboola/kbc-ui/pulls/1676/comments","review_comment_url":"https://api.github.com/repos/keboola/kbc-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keboola/kbc-ui/issues/1676/comments","statuses_url":"https://api.github.com/repos/keboola/kbc-ui/statuses/ee7c28a2d338b9e47ae4cd9ffd9e40e62fdddeb6","head":{"label":"keboola:piv-select-types","ref":"piv-select-types","sha":"ee7c28a2d338b9e47ae4cd9ffd9e40e62fdddeb6","user":{"login":"keboola","id":1424387,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MjQzODc=","avatar_url":"https://avatars1.githubusercontent.com/u/1424387?v=4","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"repo":{"id":26681387,"node_id":"MDEwOlJlcG9zaXRvcnkyNjY4MTM4Nw==","name":"kbc-ui","full_name":"keboola/kbc-ui","owner":{"login":"keboola","id":1424387,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MjQzODc=","avatar_url":"https://avatars1.githubusercontent.com/u/1424387?v=4","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keboola/kbc-ui","description":"User interface for Keboola Connection","fork":false,"url":"https://api.github.com/repos/keboola/kbc-ui","forks_url":"https://api.github.com/repos/keboola/kbc-ui/forks","keys_url":"https://api.github.com/repos/keboola/kbc-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keboola/kbc-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keboola/kbc-ui/teams","hooks_url":"https://api.github.com/repos/keboola/kbc-ui/hooks","issue_events_url":"https://api.github.com/repos/keboola/kbc-ui/issues/events{/number}","events_url":"https://api.github.com/repos/keboola/kbc-ui/events","assignees_url":"https://api.github.com/repos/keboola/kbc-ui/assignees{/user}","branches_url":"https://api.github.com/repos/keboola/kbc-ui/branches{/branch}","tags_url":"https://api.github.com/repos/keboola/kbc-ui/tags","blobs_url":"https://api.github.com/repos/keboola/kbc-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keboola/kbc-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keboola/kbc-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/keboola/kbc-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keboola/kbc-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/keboola/kbc-ui/languages","stargazers_url":"https://api.github.com/repos/keboola/kbc-ui/stargazers","contributors_url":"https://api.github.com/repos/keboola/kbc-ui/contributors","subscribers_url":"https://api.github.com/repos/keboola/kbc-ui/subscribers","subscription_url":"https://api.github.com/repos/keboola/kbc-ui/subscription","commits_url":"https://api.github.com/repos/keboola/kbc-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/keboola/kbc-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/keboola/kbc-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/keboola/kbc-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/keboola/kbc-ui/contents/{+path}","compare_url":"https://api.github.com/repos/keboola/kbc-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keboola/kbc-ui/merges","archive_url":"https://api.github.com/repos/keboola/kbc-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keboola/kbc-ui/downloads","issues_url":"https://api.github.com/repos/keboola/kbc-ui/issues{/number}","pulls_url":"https://api.github.com/repos/keboola/kbc-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/keboola/kbc-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/keboola/kbc-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keboola/kbc-ui/labels{/name}","releases_url":"https://api.github.com/repos/keboola/kbc-ui/releases{/id}","deployments_url":"https://api.github.com/repos/keboola/kbc-ui/deployments","created_at":"2014-11-15T13:56:22Z","updated_at":"2018-07-26T14:51:10Z","pushed_at":"2018-07-27T13:12:37Z","git_url":"git://github.com/keboola/kbc-ui.git","ssh_url":"git@github.com:keboola/kbc-ui.git","clone_url":"https://github.com/keboola/kbc-ui.git","svn_url":"https://github.com/keboola/kbc-ui","homepage":"","size":16058,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":263,"license":null,"forks":9,"open_issues":263,"watchers":16,"default_branch":"master"}},"base":{"label":"keboola:master","ref":"master","sha":"82b0247f518efb10a663ff5958612e96a554febd","user":{"login":"keboola","id":1424387,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MjQzODc=","avatar_url":"https://avatars1.githubusercontent.com/u/1424387?v=4","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"repo":{"id":26681387,"node_id":"MDEwOlJlcG9zaXRvcnkyNjY4MTM4Nw==","name":"kbc-ui","full_name":"keboola/kbc-ui","owner":{"login":"keboola","id":1424387,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MjQzODc=","avatar_url":"https://avatars1.githubusercontent.com/u/1424387?v=4","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keboola/kbc-ui","description":"User interface for Keboola Connection","fork":false,"url":"https://api.github.com/repos/keboola/kbc-ui","forks_url":"https://api.github.com/repos/keboola/kbc-ui/forks","keys_url":"https://api.github.com/repos/keboola/kbc-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keboola/kbc-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keboola/kbc-ui/teams","hooks_url":"https://api.github.com/repos/keboola/kbc-ui/hooks","issue_events_url":"https://api.github.com/repos/keboola/kbc-ui/issues/events{/number}","events_url":"https://api.github.com/repos/keboola/kbc-ui/events","assignees_url":"https://api.github.com/repos/keboola/kbc-ui/assignees{/user}","branches_url":"https://api.github.com/repos/keboola/kbc-ui/branches{/branch}","tags_url":"https://api.github.com/repos/keboola/kbc-ui/tags","blobs_url":"https://api.github.com/repos/keboola/kbc-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keboola/kbc-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keboola/kbc-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/keboola/kbc-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keboola/kbc-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/keboola/kbc-ui/languages","stargazers_url":"https://api.github.com/repos/keboola/kbc-ui/stargazers","contributors_url":"https://api.github.com/repos/keboola/kbc-ui/contributors","subscribers_url":"https://api.github.com/repos/keboola/kbc-ui/subscribers","subscription_url":"https://api.github.com/repos/keboola/kbc-ui/subscription","commits_url":"https://api.github.com/repos/keboola/kbc-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/keboola/kbc-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/keboola/kbc-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/keboola/kbc-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/keboola/kbc-ui/contents/{+path}","compare_url":"https://api.github.com/repos/keboola/kbc-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keboola/kbc-ui/merges","archive_url":"https://api.github.com/repos/keboola/kbc-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keboola/kbc-ui/downloads","issues_url":"https://api.github.com/repos/keboola/kbc-ui/issues{/number}","pulls_url":"https://api.github.com/repos/keboola/kbc-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/keboola/kbc-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/keboola/kbc-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keboola/kbc-ui/labels{/name}","releases_url":"https://api.github.com/repos/keboola/kbc-ui/releases{/id}","deployments_url":"https://api.github.com/repos/keboola/kbc-ui/deployments","created_at":"2014-11-15T13:56:22Z","updated_at":"2018-07-26T14:51:10Z","pushed_at":"2018-07-27T13:12:37Z","git_url":"git://github.com/keboola/kbc-ui.git","ssh_url":"git@github.com:keboola/kbc-ui.git","clone_url":"https://github.com/keboola/kbc-ui.git","svn_url":"https://github.com/keboola/kbc-ui","homepage":"","size":16058,"stargazers_count":16,"watchers_count":16,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":263,"license":null,"forks":9,"open_issues":263,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keboola/kbc-ui/pulls/1676"},"html":{"href":"https://github.com/keboola/kbc-ui/pull/1676"},"issue":{"href":"https://api.github.com/repos/keboola/kbc-ui/issues/1676"},"comments":{"href":"https://api.github.com/repos/keboola/kbc-ui/issues/1676/comments"},"review_comments":{"href":"https://api.github.com/repos/keboola/kbc-ui/pulls/1676/comments"},"review_comment":{"href":"https://api.github.com/repos/keboola/kbc-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keboola/kbc-ui/pulls/1676/commits"},"statuses":{"href":"https://api.github.com/repos/keboola/kbc-ui/statuses/ee7c28a2d338b9e47ae4cd9ffd9e40e62fdddeb6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pivnicek"}}