-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add somatic/germline gene page (#1181)
- Update gene info section - Add external link icon - Add InfoTile & GeneOriginTabs - Add genomic indicators - Add germline core proxy config --------- Co-authored-by: John Konecny <[email protected]>
- Loading branch information
Showing
95 changed files
with
3,176 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+44.2 KB
(110%)
screenshot-test/__baseline_snapshots__/About Page without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+107 Bytes
(100%)
...e_snapshots__/Account Settings Page without ROLE_API and not requested-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-162 Bytes
(100%)
...eline_snapshots__/Account Settings Page without ROLE_API and requested-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+84 Bytes
(100%)
screenshot-test/__baseline_snapshots__/Account Settings Page-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.24 KB
(100%)
...seline_snapshots__/Actionable Genes Page Levels Selected without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.14 KB
(100%)
...enshot-test/__baseline_snapshots__/Actionable Genes Page without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.08 KB
(98%)
...aseline_snapshots__/Alteration Page with Cancer Type - Heme with Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.36 KB
(99%)
...line_snapshots__/Alteration Page with Cancer Type - Heme without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-7.49 KB
(98%)
...seline_snapshots__/Alteration Page with Cancer Type - Solid with Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-9.16 KB
(96%)
...ine_snapshots__/Alteration Page with Cancer Type - Solid without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-693 Bytes
(100%)
...ine_snapshots__/Alteration Page with Cancer Type - With login - Mobile-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-591 Bytes
(100%)
..._snapshots__/Alteration Page with Cancer Type - Without login - Mobile-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.36 KB
(99%)
screenshot-test/__baseline_snapshots__/Alteration Page with Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.36 KB
(99%)
screenshot-test/__baseline_snapshots__/Alteration Page without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-643 Bytes
(100%)
screenshot-test/__baseline_snapshots__/Cancer Genes Page without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-576 Bytes
(99%)
screenshot-test/__baseline_snapshots__/Companies Information Page-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.27 KB
(100%)
screenshot-test/__baseline_snapshots__/Company Details Page-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.75 KB
(100%)
screenshot-test/__baseline_snapshots__/Company User Details Page-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1010 Bytes
(100%)
screenshot-test/__baseline_snapshots__/Gene Page with Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.32 KB
(100%)
screenshot-test/__baseline_snapshots__/Gene Page without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+738 Bytes
(100%)
...nshot-test/__baseline_snapshots__/HGVSg Page on VUE variant with Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.6 KB
(99%)
screenshot-test/__baseline_snapshots__/HGVSg Page with Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.19 KB
(100%)
screenshot-test/__baseline_snapshots__/HGVSg Page without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+309 Bytes
(100%)
screenshot-test/__baseline_snapshots__/Home Page DX without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1.39 KB
(99%)
screenshot-test/__baseline_snapshots__/Home Page PX without Login-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+414 Bytes
(100%)
screenshot-test/__baseline_snapshots__/Home Page without Login-snap.png
Oops, something went wrong.
Binary file modified
BIN
+28.7 KB
(110%)
screenshot-test/__baseline_snapshots__/LoE Page AAC without Login-snap.png
Oops, something went wrong.
Binary file modified
BIN
+52 Bytes
(100%)
screenshot-test/__baseline_snapshots__/LoE Page DX without Login-snap.png
Oops, something went wrong.
Binary file modified
BIN
+893 Bytes
(100%)
screenshot-test/__baseline_snapshots__/LoE Page PX without Login-snap.png
Oops, something went wrong.
Binary file modified
BIN
+48.2 KB
(110%)
screenshot-test/__baseline_snapshots__/LoE Page V1 without Login-snap.png
Oops, something went wrong.
Binary file modified
BIN
+44.2 KB
(110%)
screenshot-test/__baseline_snapshots__/LoE Page without Login-snap.png
Oops, something went wrong.
Binary file modified
BIN
+71 Bytes
(100%)
screenshot-test/__baseline_snapshots__/Login Page-snap.png
Oops, something went wrong.
Binary file modified
BIN
-317 Bytes
(100%)
...__baseline_snapshots__/Precision Oncology Therapies Page without Login-snap.png
Oops, something went wrong.
Binary file modified
BIN
-564 Bytes
(100%)
screenshot-test/__baseline_snapshots__/Team Page without Login-snap.png
Oops, something went wrong.
Binary file modified
BIN
-1.38 KB
(99%)
screenshot-test/__baseline_snapshots__/Terms Page without Login-snap.png
Oops, something went wrong.
Binary file modified
BIN
+539 Bytes
(100%)
...enshot-test/__baseline_snapshots__/Usage Analysis Page#Resource Detail-snap.png
Oops, something went wrong.
Binary file modified
BIN
+431 Bytes
(100%)
...shot-test/__baseline_snapshots__/Usage Analysis Page#Resource Overview-snap.png
Oops, something went wrong.
Binary file modified
BIN
+698 Bytes
(100%)
screenshot-test/__baseline_snapshots__/Usage Analysis Page#User Detail-snap.png
Oops, something went wrong.
Binary file modified
BIN
+411 Bytes
(100%)
screenshot-test/__baseline_snapshots__/Usage Analysis Page#User Overview-snap.png
Oops, something went wrong.
Binary file modified
BIN
+1.83 KB
(100%)
screenshot-test/__baseline_snapshots__/User Details Page-snap.png
Oops, something went wrong.
Binary file modified
BIN
-1.85 KB
(99%)
screenshot-test/__baseline_snapshots__/Users Infomation Page-snap.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,44 @@ | ||
import React from 'react'; | ||
import React, { FunctionComponent } from 'react'; | ||
import { Col, Row } from 'react-bootstrap'; | ||
import WindowStore from 'app/store/WindowStore'; | ||
import { RouterStore } from 'mobx-react-router'; | ||
import { PAGE_ROUTE } from 'app/config/constants'; | ||
import { GENETIC_TYPE } from 'app/components/geneticTypeTabs/GeneticTypeTabs'; | ||
import { parseGenePagePath } from 'app/shared/utils/UrlUtils'; | ||
|
||
const Container: FunctionComponent<{ | ||
inGenePage: boolean; | ||
}> = props => { | ||
if (props.inGenePage) { | ||
return <div>{props.children}</div>; | ||
} else { | ||
return ( | ||
<Row className={`justify-content-center`}> | ||
<Col md={11}>{props.children}</Col> | ||
</Row> | ||
); | ||
} | ||
}; | ||
const PageContainer: React.FunctionComponent<{ | ||
className?: string; | ||
routing: RouterStore; | ||
windowStore: WindowStore; | ||
}> = props => { | ||
const genePagePath = parseGenePagePath(props.routing.location.pathname); | ||
const inGenePage = genePagePath.geneticType !== undefined; | ||
return ( | ||
<Row className={`justify-content-center ${props.className}`}> | ||
<Col xl={10} lg={11}> | ||
{props.children} | ||
</Col> | ||
</Row> | ||
<div className={'view-wrapper'}> | ||
<div | ||
className={ | ||
inGenePage | ||
? '' | ||
: props.windowStore.isXLscreen | ||
? 'container' | ||
: 'container-fluid' | ||
} | ||
> | ||
<Container inGenePage={inGenePage}>{props.children}</Container> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
export default PageContainer; |
47 changes: 47 additions & 0 deletions
47
src/main/webapp/app/components/geneticTypeTabs/GeneticTypeTabs.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React, { FunctionComponent, useState } from 'react'; | ||
import styles from './genetic-type-tabs.module.scss'; | ||
import classnames from 'classnames'; | ||
import { RouterStore } from 'mobx-react-router'; | ||
|
||
export enum GENETIC_TYPE { | ||
SOMATIC = 'somatic', | ||
GERMLINE = 'germline', | ||
} | ||
|
||
const GeneticTypeTabs: FunctionComponent<{ | ||
routing: RouterStore; | ||
hugoSymbol: string; | ||
geneticType?: GENETIC_TYPE; | ||
onChange: (status: string) => void; | ||
}> = props => { | ||
const [selected, setSelected] = useState<GENETIC_TYPE>( | ||
props.geneticType || GENETIC_TYPE.SOMATIC | ||
); | ||
|
||
const ontoggle = (status: GENETIC_TYPE) => { | ||
setSelected(status); | ||
props.onChange(status); | ||
}; | ||
|
||
return ( | ||
<div className={styles.tabs}> | ||
{[GENETIC_TYPE.SOMATIC, GENETIC_TYPE.GERMLINE].map((geneOrigin, idx) => ( | ||
<div | ||
key={idx} | ||
style={{ width: '50%' }} | ||
className={ | ||
selected === geneOrigin | ||
? classnames(styles.tab, styles.selectedTab, 'font-bold') | ||
: classnames(styles.tab, styles.unselectedTab) | ||
} | ||
onClick={() => ontoggle(geneOrigin)} | ||
> | ||
{geneOrigin.substring(0, 1).toUpperCase()} | ||
{geneOrigin.toLowerCase().slice(1)} | ||
</div> | ||
))} | ||
</div> | ||
); | ||
}; | ||
|
||
export default GeneticTypeTabs; |
33 changes: 33 additions & 0 deletions
33
src/main/webapp/app/components/geneticTypeTabs/genetic-type-tabs.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@import '../../variables'; | ||
|
||
.tabs { | ||
display: flex; | ||
margin: 1.5rem 0 0 0; | ||
} | ||
|
||
.tab { | ||
text-align: center; | ||
padding: 0.75rem 0; | ||
border: 1px solid $oncokb-darker-blue; | ||
cursor: pointer; | ||
} | ||
|
||
.tab:first-child { | ||
border-left: 0; | ||
border-top-right-radius: 3px; | ||
} | ||
|
||
.tab:last-child { | ||
border-right: 0; | ||
border-top-left-radius: 3px; | ||
} | ||
|
||
.selectedTab { | ||
padding-top: 0.5rem; | ||
border-width: 3px 1px 0 1px; | ||
} | ||
|
||
.unselectedTab { | ||
background-color: $inactive; | ||
border-width: 0 0 1px 0; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/webapp/app/components/geneticTypeTag/GeneticTypeTag.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React, { FunctionComponent } from 'react'; | ||
import { GENETIC_TYPE } from 'app/components/geneticTypeTabs/GeneticTypeTabs'; | ||
import classnames from 'classnames'; | ||
import styles from './genetic-type-tag.module.scss'; | ||
import { capitalize } from 'cbioportal-frontend-commons'; | ||
|
||
const GeneticTypeTag: FunctionComponent<{ | ||
geneticType: GENETIC_TYPE; | ||
className?: string; | ||
}> = props => { | ||
return ( | ||
<span | ||
className={classnames( | ||
props.className, | ||
props.geneticType === GENETIC_TYPE.GERMLINE | ||
? styles.germlineTag | ||
: styles.somaticTag | ||
)} | ||
> | ||
{capitalize(props.geneticType)} | ||
</span> | ||
); | ||
}; | ||
|
||
export default GeneticTypeTag; |
25 changes: 25 additions & 0 deletions
25
src/main/webapp/app/components/geneticTypeTag/genetic-type-tag.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@import '../../variables'; | ||
|
||
.geneticTypeTag { | ||
font-weight: 500 !important; | ||
font-family: "Gotham Book"; | ||
display: inline-flex; | ||
padding: 0 var(--radius-8, 8px); | ||
justify-content: center; | ||
align-items: center; | ||
gap: var(--radius-8, 8px); | ||
border-radius: 56px; | ||
} | ||
|
||
.germlineTag { | ||
@extend .geneticTypeTag; | ||
color: $primary; | ||
border: var(--radius-2, 2px) solid var(--Color-11, $primary); | ||
background: #F0F5FF; | ||
} | ||
|
||
.somaticTag { | ||
@extend .geneticTypeTag; | ||
color: #FFFFFF; | ||
background: $primary; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React, { CSSProperties } from 'react'; | ||
import styles from './info-tile.module.scss'; | ||
import { COLOR_GREY } from 'app/config/theme'; | ||
import classnames from 'classnames'; | ||
|
||
export type Category = { | ||
title: string; | ||
content?: JSX.Element | string; | ||
className?: string; | ||
}; | ||
export type InfoTile = { | ||
title: string; | ||
categories: Category[]; | ||
className?: string; | ||
}; | ||
|
||
const Category: React.FunctionComponent<Category> = props => { | ||
const isNa = props.content === undefined || props.content === null; | ||
const isText = isNa || typeof props.content === 'string'; | ||
const style: CSSProperties = { height: '3rem' }; | ||
if (isText) { | ||
style.fontSize = '1.5rem'; | ||
style.fontFamily = 'Gotham Bold'; | ||
} | ||
return ( | ||
<div className={classnames(props.className, 'flex-grow-1')}> | ||
<div style={{ color: COLOR_GREY }} className={'mb-1'}> | ||
{props.title} | ||
</div> | ||
<div className={classnames('d-flex align-items-center')} style={style}> | ||
{props.content} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
const InfoTile: React.FunctionComponent<InfoTile> = props => { | ||
return props.categories.length > 0 ? ( | ||
<div className={classnames(styles.tile, 'mr-2', props.className)}> | ||
<div className={'h6 font-bold mb-2'}>{props.title}</div> | ||
<div className={'d-flex'}> | ||
{props.categories.map((category, idx) => ( | ||
<Category key={idx} {...category} className={styles.category} /> | ||
))} | ||
</div> | ||
</div> | ||
) : ( | ||
<></> | ||
); | ||
}; | ||
|
||
export default InfoTile; |
Oops, something went wrong.