{"action":"created","comment":{"url":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/comments/333983462","pull_request_review_id":300674680,"id":333983462,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzMzk4MzQ2Mg==","diff_hunk":"@@ -2,68 +2,77 @@ import React from 'react';\n import VerticalTabs from 'uikit/VerticalTabs';\n import { css } from 'uikit';\n import Typography from 'uikit/Typography';\n-import DnaLoader from 'uikit/DnaLoader';\n import { ClinicalSubmissionEntityFile } from '../types';\n import FileRecordTable from './FileRecordTable';\n import { Col } from 'react-grid-system';\n-import Button from 'uikit/Button';\n import { useToaster } from 'global/hooks/toaster';\n+import NoData from 'uikit/NoData';\n+import ErrorNotification from '../ErrorNotification';\n+import Button from 'uikit/Button';\n \n export default ({\n   fileStates,\n-  loading,\n+  clearDataError,\n }: {\n   fileStates: Array<ClinicalSubmissionEntityFile>;\n-  loading: boolean;\n+  clearDataError: (file: ClinicalSubmissionEntityFile) => Promise<any>;\n }) => {\n   const toaster = useToaster();\n-  const [selectedFile, setSelectedFile] = React.useState<ClinicalSubmissionEntityFile>(\n-    fileStates[0],\n-  );\n-  const onFileClick = fileState => e => {\n-    setSelectedFile(fileState);\n+  const [selectedFileIndex, setSelectedFileIndex] = React.useState<number>(0);\n+  const onFileClick = (clinicalType: string) => e => {\n+    setSelectedFileIndex(fileStates.findIndex(file => clinicalType === file.clinicalType));\n   };\n+  const selectedFile = fileStates[selectedFileIndex];\n   const onClearClick = () => {\n     toaster.addToast({\n       title: 'DUMMY',\n       content: \"I'm just a dummy placeholder behaviour\",\n     });\n   };\n-  return loading ? (\n-    <div\n+  const onErrorClearClick = () => {\n+    clearDataError(selectedFile);\n+  };\n+  const shouldShowError = !!selectedFile && !!selectedFile.schemaErrors.length;","path":"components/pages/submission-system/program-clinical-submission/FilesNavigator/index.tsx","position":45,"original_position":45,"commit_id":"a85273a4a93f1e3091879dbb0c526e5ecd31a9ff","original_commit_id":"ba5acde1aa5673373a1987bd5f02f577eb6938b7","user":{"login":"hlminh2000","id":11821106,"node_id":"MDQ6VXNlcjExODIxMTA2","avatar_url":"https://avatars3.githubusercontent.com/u/11821106?v=4","gravatar_id":"","url":"https://api.github.com/users/hlminh2000","html_url":"https://github.com/hlminh2000","followers_url":"https://api.github.com/users/hlminh2000/followers","following_url":"https://api.github.com/users/hlminh2000/following{/other_user}","gists_url":"https://api.github.com/users/hlminh2000/gists{/gist_id}","starred_url":"https://api.github.com/users/hlminh2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlminh2000/subscriptions","organizations_url":"https://api.github.com/users/hlminh2000/orgs","repos_url":"https://api.github.com/users/hlminh2000/repos","events_url":"https://api.github.com/users/hlminh2000/events{/privacy}","received_events_url":"https://api.github.com/users/hlminh2000/received_events","type":"User","site_admin":false},"body":"`schemaErrors` is a non-optional field of `typeof selectedFile`, so that would likely be a back-end issue","created_at":"2019-10-11T13:12:41Z","updated_at":"2019-10-11T13:12:41Z","html_url":"https://github.com/icgc-argo/platform-ui/pull/723#discussion_r333983462","pull_request_url":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/723","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/comments/333983462"},"html":{"href":"https://github.com/icgc-argo/platform-ui/pull/723#discussion_r333983462"},"pull_request":{"href":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/723"}},"in_reply_to_id":333726541},"pull_request":{"url":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/723","id":324798151,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI0Nzk4MTUx","html_url":"https://github.com/icgc-argo/platform-ui/pull/723","diff_url":"https://github.com/icgc-argo/platform-ui/pull/723.diff","patch_url":"https://github.com/icgc-argo/platform-ui/pull/723.patch","issue_url":"https://api.github.com/repos/icgc-argo/platform-ui/issues/723","number":723,"state":"open","locked":false,"title":"Feat/clinical submission data","user":{"login":"hlminh2000","id":11821106,"node_id":"MDQ6VXNlcjExODIxMTA2","avatar_url":"https://avatars3.githubusercontent.com/u/11821106?v=4","gravatar_id":"","url":"https://api.github.com/users/hlminh2000","html_url":"https://github.com/hlminh2000","followers_url":"https://api.github.com/users/hlminh2000/followers","following_url":"https://api.github.com/users/hlminh2000/following{/other_user}","gists_url":"https://api.github.com/users/hlminh2000/gists{/gist_id}","starred_url":"https://api.github.com/users/hlminh2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hlminh2000/subscriptions","organizations_url":"https://api.github.com/users/hlminh2000/orgs","repos_url":"https://api.github.com/users/hlminh2000/repos","events_url":"https://api.github.com/users/hlminh2000/events{/privacy}","received_events_url":"https://api.github.com/users/hlminh2000/received_events","type":"User","site_admin":false},"body":"**Description of changes**\r\n\r\nClinical submission page mostly working, **EXCEPT**:\r\n- Proper rendering of the approval modal\r\n- Listing of clinical entities that have not been uploaded (needs a back-end update, but UI already handles this.)\r\n- Downloading tsv templates (I will be using the above back-end update for this to avoid making compound query)\r\n\r\nSome system-wide update:\r\n- new uikit `FileSelectButton` component\r\n\r\n**Type of Change**\r\n\r\n- [ ] Bug\r\n- [ ] Styling\r\n- [x] New Feature\r\n\r\n**Checklist before requesting review:**\r\n\r\n- [ ] Matches design:\r\n\r\n  - component sizes, spacing, and styles\r\n  - font size, weight, colour\r\n  - spelling has been double checked\r\n\r\n- [ ] New uikit components have Storybook stories\r\n- [ ] Feature is minimally responsive.\r\n- [x] Manual testing of UI feature.\r\n- [ ] Selenium test is completed and passing.\r\n","created_at":"2019-10-04T18:27:00Z","updated_at":"2019-10-11T13:12:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1196ada2bb7d77a7307b8bde9c54e20fcd35496","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/723/commits","review_comments_url":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/723/comments","review_comment_url":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/icgc-argo/platform-ui/issues/723/comments","statuses_url":"https://api.github.com/repos/icgc-argo/platform-ui/statuses/a85273a4a93f1e3091879dbb0c526e5ecd31a9ff","head":{"label":"icgc-argo:feat/clinical_submission_data","ref":"feat/clinical_submission_data","sha":"a85273a4a93f1e3091879dbb0c526e5ecd31a9ff","user":{"login":"icgc-argo","id":38898492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4ODk4NDky","avatar_url":"https://avatars0.githubusercontent.com/u/38898492?v=4","gravatar_id":"","url":"https://api.github.com/users/icgc-argo","html_url":"https://github.com/icgc-argo","followers_url":"https://api.github.com/users/icgc-argo/followers","following_url":"https://api.github.com/users/icgc-argo/following{/other_user}","gists_url":"https://api.github.com/users/icgc-argo/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-argo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-argo/subscriptions","organizations_url":"https://api.github.com/users/icgc-argo/orgs","repos_url":"https://api.github.com/users/icgc-argo/repos","events_url":"https://api.github.com/users/icgc-argo/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-argo/received_events","type":"Organization","site_admin":false},"repo":{"id":178882214,"node_id":"MDEwOlJlcG9zaXRvcnkxNzg4ODIyMTQ=","name":"platform-ui","full_name":"icgc-argo/platform-ui","private":false,"owner":{"login":"icgc-argo","id":38898492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4ODk4NDky","avatar_url":"https://avatars0.githubusercontent.com/u/38898492?v=4","gravatar_id":"","url":"https://api.github.com/users/icgc-argo","html_url":"https://github.com/icgc-argo","followers_url":"https://api.github.com/users/icgc-argo/followers","following_url":"https://api.github.com/users/icgc-argo/following{/other_user}","gists_url":"https://api.github.com/users/icgc-argo/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-argo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-argo/subscriptions","organizations_url":"https://api.github.com/users/icgc-argo/orgs","repos_url":"https://api.github.com/users/icgc-argo/repos","events_url":"https://api.github.com/users/icgc-argo/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-argo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/icgc-argo/platform-ui","description":"Argo UI","fork":false,"url":"https://api.github.com/repos/icgc-argo/platform-ui","forks_url":"https://api.github.com/repos/icgc-argo/platform-ui/forks","keys_url":"https://api.github.com/repos/icgc-argo/platform-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/icgc-argo/platform-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/icgc-argo/platform-ui/teams","hooks_url":"https://api.github.com/repos/icgc-argo/platform-ui/hooks","issue_events_url":"https://api.github.com/repos/icgc-argo/platform-ui/issues/events{/number}","events_url":"https://api.github.com/repos/icgc-argo/platform-ui/events","assignees_url":"https://api.github.com/repos/icgc-argo/platform-ui/assignees{/user}","branches_url":"https://api.github.com/repos/icgc-argo/platform-ui/branches{/branch}","tags_url":"https://api.github.com/repos/icgc-argo/platform-ui/tags","blobs_url":"https://api.github.com/repos/icgc-argo/platform-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/icgc-argo/platform-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/icgc-argo/platform-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/icgc-argo/platform-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/icgc-argo/platform-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/icgc-argo/platform-ui/languages","stargazers_url":"https://api.github.com/repos/icgc-argo/platform-ui/stargazers","contributors_url":"https://api.github.com/repos/icgc-argo/platform-ui/contributors","subscribers_url":"https://api.github.com/repos/icgc-argo/platform-ui/subscribers","subscription_url":"https://api.github.com/repos/icgc-argo/platform-ui/subscription","commits_url":"https://api.github.com/repos/icgc-argo/platform-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/icgc-argo/platform-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/icgc-argo/platform-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/icgc-argo/platform-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/icgc-argo/platform-ui/contents/{+path}","compare_url":"https://api.github.com/repos/icgc-argo/platform-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/icgc-argo/platform-ui/merges","archive_url":"https://api.github.com/repos/icgc-argo/platform-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/icgc-argo/platform-ui/downloads","issues_url":"https://api.github.com/repos/icgc-argo/platform-ui/issues{/number}","pulls_url":"https://api.github.com/repos/icgc-argo/platform-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/icgc-argo/platform-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/icgc-argo/platform-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/icgc-argo/platform-ui/labels{/name}","releases_url":"https://api.github.com/repos/icgc-argo/platform-ui/releases{/id}","deployments_url":"https://api.github.com/repos/icgc-argo/platform-ui/deployments","created_at":"2019-04-01T14:34:11Z","updated_at":"2019-10-09T21:40:53Z","pushed_at":"2019-10-11T13:00:29Z","git_url":"git://github.com/icgc-argo/platform-ui.git","ssh_url":"git@github.com:icgc-argo/platform-ui.git","clone_url":"https://github.com/icgc-argo/platform-ui.git","svn_url":"https://github.com/icgc-argo/platform-ui","homepage":"","size":3095,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":66,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":1,"open_issues":66,"watchers":0,"default_branch":"develop"}},"base":{"label":"icgc-argo:develop","ref":"develop","sha":"188ee35cff6feda6ab9519595958abb51ab5afc1","user":{"login":"icgc-argo","id":38898492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4ODk4NDky","avatar_url":"https://avatars0.githubusercontent.com/u/38898492?v=4","gravatar_id":"","url":"https://api.github.com/users/icgc-argo","html_url":"https://github.com/icgc-argo","followers_url":"https://api.github.com/users/icgc-argo/followers","following_url":"https://api.github.com/users/icgc-argo/following{/other_user}","gists_url":"https://api.github.com/users/icgc-argo/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-argo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-argo/subscriptions","organizations_url":"https://api.github.com/users/icgc-argo/orgs","repos_url":"https://api.github.com/users/icgc-argo/repos","events_url":"https://api.github.com/users/icgc-argo/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-argo/received_events","type":"Organization","site_admin":false},"repo":{"id":178882214,"node_id":"MDEwOlJlcG9zaXRvcnkxNzg4ODIyMTQ=","name":"platform-ui","full_name":"icgc-argo/platform-ui","private":false,"owner":{"login":"icgc-argo","id":38898492,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM4ODk4NDky","avatar_url":"https://avatars0.githubusercontent.com/u/38898492?v=4","gravatar_id":"","url":"https://api.github.com/users/icgc-argo","html_url":"https://github.com/icgc-argo","followers_url":"https://api.github.com/users/icgc-argo/followers","following_url":"https://api.github.com/users/icgc-argo/following{/other_user}","gists_url":"https://api.github.com/users/icgc-argo/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-argo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-argo/subscriptions","organizations_url":"https://api.github.com/users/icgc-argo/orgs","repos_url":"https://api.github.com/users/icgc-argo/repos","events_url":"https://api.github.com/users/icgc-argo/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-argo/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/icgc-argo/platform-ui","description":"Argo UI","fork":false,"url":"https://api.github.com/repos/icgc-argo/platform-ui","forks_url":"https://api.github.com/repos/icgc-argo/platform-ui/forks","keys_url":"https://api.github.com/repos/icgc-argo/platform-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/icgc-argo/platform-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/icgc-argo/platform-ui/teams","hooks_url":"https://api.github.com/repos/icgc-argo/platform-ui/hooks","issue_events_url":"https://api.github.com/repos/icgc-argo/platform-ui/issues/events{/number}","events_url":"https://api.github.com/repos/icgc-argo/platform-ui/events","assignees_url":"https://api.github.com/repos/icgc-argo/platform-ui/assignees{/user}","branches_url":"https://api.github.com/repos/icgc-argo/platform-ui/branches{/branch}","tags_url":"https://api.github.com/repos/icgc-argo/platform-ui/tags","blobs_url":"https://api.github.com/repos/icgc-argo/platform-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/icgc-argo/platform-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/icgc-argo/platform-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/icgc-argo/platform-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/icgc-argo/platform-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/icgc-argo/platform-ui/languages","stargazers_url":"https://api.github.com/repos/icgc-argo/platform-ui/stargazers","contributors_url":"https://api.github.com/repos/icgc-argo/platform-ui/contributors","subscribers_url":"https://api.github.com/repos/icgc-argo/platform-ui/subscribers","subscription_url":"https://api.github.com/repos/icgc-argo/platform-ui/subscription","commits_url":"https://api.github.com/repos/icgc-argo/platform-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/icgc-argo/platform-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/icgc-argo/platform-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/icgc-argo/platform-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/icgc-argo/platform-ui/contents/{+path}","compare_url":"https://api.github.com/repos/icgc-argo/platform-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/icgc-argo/platform-ui/merges","archive_url":"https://api.github.com/repos/icgc-argo/platform-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/icgc-argo/platform-ui/downloads","issues_url":"https://api.github.com/repos/icgc-argo/platform-ui/issues{/number}","pulls_url":"https://api.github.com/repos/icgc-argo/platform-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/icgc-argo/platform-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/icgc-argo/platform-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/icgc-argo/platform-ui/labels{/name}","releases_url":"https://api.github.com/repos/icgc-argo/platform-ui/releases{/id}","deployments_url":"https://api.github.com/repos/icgc-argo/platform-ui/deployments","created_at":"2019-04-01T14:34:11Z","updated_at":"2019-10-09T21:40:53Z","pushed_at":"2019-10-11T13:00:29Z","git_url":"git://github.com/icgc-argo/platform-ui.git","ssh_url":"git@github.com:icgc-argo/platform-ui.git","clone_url":"https://github.com/icgc-argo/platform-ui.git","svn_url":"https://github.com/icgc-argo/platform-ui","homepage":"","size":3095,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":66,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":1,"open_issues":66,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/723"},"html":{"href":"https://github.com/icgc-argo/platform-ui/pull/723"},"issue":{"href":"https://api.github.com/repos/icgc-argo/platform-ui/issues/723"},"comments":{"href":"https://api.github.com/repos/icgc-argo/platform-ui/issues/723/comments"},"review_comments":{"href":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/723/comments"},"review_comment":{"href":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/icgc-argo/platform-ui/pulls/723/commits"},"statuses":{"href":"https://api.github.com/repos/icgc-argo/platform-ui/statuses/a85273a4a93f1e3091879dbb0c526e5ecd31a9ff"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"hlminh2000"}}