-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: interpretation panel #149
Conversation
feat: zoom to gene functionality style: add clinical panel styles
style: center callout text
style: revert padding for gosling panel
@@ -186,6 +194,9 @@ function App(props: RouteComponentProps) { | |||
setSelectedSvId(''); | |||
leftReads.current = []; | |||
rightReads.current = []; | |||
|
|||
// Update the appearance of the clinical panel | |||
setIsClinicalPanelOpen(!!demo?.clinicalInfo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we respect the previous state of whether the clinical panel was opened? If I understand correctly, I think you are force-opening the clinical panel whenever the user selects a new demo. I think this could be disturbing to the user if they want the panel to be closed.
setIsClinicalPanelOpen(!!demo?.clinicalInfo); | |
setIsClinicalPanelOpen(!!demo?.clinicalInfo && isClinicalPanelOpen); |
@@ -963,7 +981,7 @@ function App(props: RouteComponentProps) { | |||
{!isMinimalMode && ( | |||
<div | |||
style={{ | |||
width: '100%', | |||
width: `calc(100% - ${0}px)`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this change was only for testing purposes?
width: `calc(100% - ${0}px)`, | |
width: '100%', |
@@ -899,6 +897,490 @@ a:hover { | |||
background-color: #e6e4e4; | |||
} | |||
|
|||
.clinical-panel-container { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could consider moving styles related to the clinical panel to a separate CSS file to prevent this file becoming longer, e.g., css/ClinicalPanel.css
@@ -31,6 +33,7 @@ export type SampleType = { | |||
cnFields?: [string, string, string]; | |||
thumbnail?: string; | |||
note?: string; | |||
clinicalInfo?: { [key: string]: DataRowProps[] }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something to consider in the next round of update is further narrowing down the type definitions.
export type ClinicalInfo = {
summary: SummaryItem[];
variants: VariantItem[];
signatures: SignatureItem[];
}
export type SummaryItem = {
label: string;
value: string;
}
export type VariantItem = {
gene: string;
type?: string; // if we know all the possible types, we can narrow down further, i.e., type: "Germline" | "homozygous loss" | ...;
cDNA?: string;
chr: string;
start: string; // ideally this should be number
end: string; // ideally this should be number
position: string; // ideally this should be number
handleClick?: () => void;
}
export type SignatureItem = {
type: string; // if we know all the possible types, we can narrow down further, i.e., type: "indels" | "point_mutations" | ...;
count: string; // this can be number
label: string;
hrDetect: boolean;
}
Implements interpretation panel for demo's with the clinical information field