-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add somatic/germline gene page #1181
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
57fab39
Support somatic/germline gene pages (#1169)
zhx828 360f35e
Add genomic indicators && Minor updates
zhx828 9d7c3c7
Merge pull request #1171 from zhx828/info-card
zhx828 30027f9
Fixed merge conflicts
jfkonecn 75b2bf2
Merge pull request #1172 from jfkonecn/feature/mini-bar
zhx828 f80c6d7
Adjusted mini-nav-bar height and border (#1173)
jfkonecn 9e1a0c7
Minor changes
zhx828 c286bc0
Merge pull request #1174 from zhx828/minor-germline-updates
zhx828 b8b2586
Add germline core proxy config
zhx828 b232810
Update screenshots
zhx828 29d30b6
Merge pull request #1176 from zhx828/minor-germline-updates
zhx828 846cd5b
Update based on the latest design
zhx828 9fe1c47
Merge pull request #1179 from zhx828/minor-germline-updates
zhx828 1a1265f
Show protein change and alelle state for germline page
zhx828 dec386f
Merge pull request #1180 from zhx828/minor-germline-updates
zhx828 84a79fd
Merge branch 'master' into feature/germline
zhx828 4781077
Minor updates
zhx828 17cfa77
Merge pull request #1184 from zhx828/minor-germline-updates
zhx828 a34e79a
Merge branch 'master' into feature/germline
zhx828 d8b2d3e
Update AnnotationStore.ts
zhx828 9e00606
Update screenshots
zhx828 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Would CSS media queries would this be simpler than using Javascript?
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.
Good question. Didn't look into, inherited from the original.
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.
For public website, we haven't really used the @media to manage the layout. I would stick to the classname for now.