Skip to content

Commit

Permalink
Add precision oncology therapies page (#1022)
Browse files Browse the repository at this point in the history
- Add precision oncology therapies page, but hide until paper is out 
- Update team page
- Fix oncokb/oncokb#3549
  • Loading branch information
zhx828 authored Sep 28, 2023
1 parent d055f74 commit 8a8f4c8
Show file tree
Hide file tree
Showing 17 changed files with 2,080 additions and 444 deletions.
1 change: 1 addition & 0 deletions src/main/webapp/app/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class Header extends React.Component<IHeaderProps> {
],
},
{ title: 'Actionable Genes', link: PAGE_ROUTE.ACTIONABLE_GENE },
// { title: 'Precision Oncology Therapies', link: PAGE_ROUTE.PO_TX },
{ title: 'Cancer Genes', link: PAGE_ROUTE.CANCER_GENES },
{
title: 'API / License',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@ import styles from './DownloadButton.module.scss';
interface IDownloadButton {
href: string;
className?: string;
size?: 'sm' | 'lg';
download?: string | boolean; // We can override the default filename by providing a string
}

// Naturally the Button component has href property which will convert the component to a A tag
// But in the scenario downloading PDF file, we need to specify the download property
export const DownloadButton: React.FunctionComponent<IDownloadButton> = props => {
const { href, download, className } = props;

const { href, download, className, size } = props;
const buttonSizeClassName = size ? `btn-${size}` : '';
return (
<a
href={href}
download={download || true}
className={`btn btn-primary ${className} ${styles.aTag}`}
className={`btn btn-primary ${buttonSizeClassName} ${className} ${styles.aTag}`}
>
<i className={'fa fa-cloud-download mr-1'} />
{props.children}
Expand Down
5 changes: 4 additions & 1 deletion src/main/webapp/app/components/oncokbSearch/OncoKBSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ export default class OncoKBSearch extends React.Component<IOncoKBSearch, {}> {
placeholder(styles) {
return {
...styles,
width: '100%',
width: '90%',
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
lineHeight: '30px',
textAlign: 'center',
};
Expand Down
5 changes: 3 additions & 2 deletions src/main/webapp/app/components/oncokbTable/OncoKBTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface ITableWithSearchBox<T> extends Partial<TableProps<T>> {
columns: SearchColumn<T>[];
loading?: boolean;
filters?: React.FunctionComponent;
className?: string;
}

@observer
Expand Down Expand Up @@ -84,11 +85,11 @@ export default class OncoKBTable<T> extends React.Component<
)}
<div className="mt-2">
<ReactTable
{...this.props}
showPagination={this.props.showPagination}
className={`-striped -highlight oncokbReactTable ${
this.props.fixedHeight ? 'fixedHeight' : ''
}`}
{...this.props}
} ${this.props.className}`}
data={this.filteredData}
/>
</div>
Expand Down
13 changes: 9 additions & 4 deletions src/main/webapp/app/config/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,16 @@ export enum PAGE_TITLE {
export enum PAGE_ROUTE {
LOGIN = '/login',
LOGOUT = '/logout',
DATA_ACCESS = '/dataAccess',
API_ACCESS = '/apiAccess',
LEGACY_DATA_ACCESS = '/dataAccess',
DATA_ACCESS = '/data-access',
LEGACY_API_ACCESS = '/apiAccess',
API_ACCESS = '/api-access',
FAQ_ACCESS = '/faq',
CANCER_GENES = '/cancerGenes',
ACTIONABLE_GENE = '/actionableGenes',
LEGACY_CANCER_GENES = '/cancerGenes',
CANCER_GENES = '/cancer-genes',
LEGACY_ACTIONABLE_GENE = '/actionableGenes',
ACTIONABLE_GENE = '/actionable-genes',
PO_TX = '/precision-oncology-therapies',
GENE_HEADER = '/gene',
GENE = '/gene/:hugoSymbol',
ALTERATION = '/gene/:hugoSymbol/:alteration',
Expand Down
8 changes: 6 additions & 2 deletions src/main/webapp/app/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ b {
.navbar-nav {
& > .nav-item {
color: white;
line-height: 2.75rem;
border-bottom: 0.3rem solid $nav-bg-color;
line-height: 1rem;
border-bottom: 0.5rem solid $nav-bg-color;

&.active {
border-bottom-color: $oncokb-darker-blue;
Expand All @@ -77,6 +77,10 @@ b {
}
}

& > .nav-item:first-line {
line-height: 2.75rem;
}

& .nav-link {
padding-left: $navbar-nav-link-padding-x;
padding-right: $navbar-nav-link-padding-x;
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/pages/menus/menu-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class MenuItem extends React.Component<IMenuItem> {
const { to, icon, id, children } = this.props;

return (
<DropdownItem as={Link} to={to} id={id}>
<DropdownItem as={Link} to={to} id={id} style={{ lineHeight: '2.75rem' }}>
<i className={`fa fa-${icon} fa-fw mr-1`} /> {children}
</DropdownItem>
);
Expand Down
Loading

0 comments on commit 8a8f4c8

Please sign in to comment.