Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zhx828 committed Oct 18, 2024
1 parent f80c6d7 commit 9e1a0c7
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 8 deletions.
13 changes: 13 additions & 0 deletions src/main/webapp/app/components/searchOption/SearchOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
sortByLevelWithLevels,
} from 'app/shared/utils/ReactTableUtils';
import WithSeparator from 'react-with-separator';
import { COLOR_GERMLINE, COLOR_SOMATIC } from 'app/config/theme';

export enum SearchOptionType {
GENE = 'GENE',
Expand Down Expand Up @@ -50,6 +51,18 @@ const GeneSearchOption: React.FunctionComponent<{
return (
<>
<div className={'d-flex'}>
{props.data.annotation && (
<b
style={{
color:
props.data.annotation.toLowerCase() === 'germline'
? COLOR_GERMLINE
: COLOR_SOMATIC,
}}
>
{props.data.annotation}:{' '}
</b>
)}
<Highlighter
searchWords={[props.search]}
textToHighlight={`${props.data.gene.hugoSymbol} (Entrez Gene: ${props.data.gene.entrezGeneId})`}
Expand Down
5 changes: 5 additions & 0 deletions src/main/webapp/app/config/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ export const COLOR_ERROR = '#dc3545';

export const COLOR_ICON_WITH_INFO = COLOR_BLACK;
export const COLOR_ICON_WITHOUT_INFO = COLOR_LIGHT_GREY;

export const COLOR_SOMATIC = COLOR_BLUE;
export const COLOR_SOMATIC_SHADE = "#F0F5FF"
export const COLOR_GERMLINE = "#D2A106"
export const COLOR_GERMLINE_SHADE = "#FCF4D6"
8 changes: 8 additions & 0 deletions src/main/webapp/app/pages/genePage/GenomicIndicatorTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import React from 'react';
import { Evidence } from 'app/shared/api/generated/OncoKbAPI';
import { getAlterationName } from 'app/shared/utils/Utils';
import { LongText } from 'app/oncokb-frontend-commons/src/components/LongText';

export const GenomicIndicatorTable: React.FunctionComponent<{
data: Evidence[];
Expand All @@ -17,13 +18,20 @@ export const GenomicIndicatorTable: React.FunctionComponent<{
{
Header: <span>Name</span>,
accessor: 'knownEffect',
width: 400,
},
{
Header: <span>Description</span>,
accessor: 'description',
Cell(row: { original: Evidence }) {
return (
<LongText text={row.original.description} cutoff={180}/>
);
},
},
{
Header: <span>Associated Variants</span>,
width: 200,
Cell(row: { original: Evidence }) {
return (
<span>
Expand Down
14 changes: 7 additions & 7 deletions src/main/webapp/app/pages/genePage/SomaticGermlineGenePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import { findLast } from 'app/shared/utils/LodashUtils';
import { Helmet } from 'react-helmet-async';
import { NcbiLink } from 'app/shared/links/NcbiLink';
import GeneAliasesDescription from 'app/shared/texts/GeneAliasesDescription';
import { COLOR_GREY } from 'app/config/theme';
import { COLOR_GERMLINE, COLOR_GERMLINE_SHADE, COLOR_GREY, COLOR_SOMATIC, COLOR_SOMATIC_SHADE } from 'app/config/theme';
import LoETile from 'app/components/infoTile/LoETile';
import GeneticTypeTabs, {
GENETIC_TYPE,
Expand Down Expand Up @@ -101,7 +101,7 @@ const NoContent: FunctionComponent<{
geneticType: GENETIC_TYPE;
}> = props => {
return (
<div>
<div className={'my-5'}>
<h4>
There are no {props.geneticType} mutations annotated in this gene.
</h4>
Expand Down Expand Up @@ -660,20 +660,20 @@ export default class SomaticGermlineGenePage extends React.Component<
hugoSymbol={this.store.hugoSymbol}
geneticType={this.selectedGeneticType}
/>
{this.hasContent ? (
{this.hasContent && (
<StickyMiniNavBar
title={`${this.store.hugoSymbol} (${
this.isGermline ? 'Germline' : 'Somatic'
})`}
linkUnderlineColor={
this.isGermline ? '#D2A106' : '#0968C3'
this.isGermline ? COLOR_GERMLINE : COLOR_SOMATIC
}
stickyBackgroundColor={
this.isGermline ? '#FCF4D6' : '#F0F5FF'
this.isGermline
? COLOR_GERMLINE_SHADE
: COLOR_SOMATIC_SHADE
}
/>
) : (
<div style={{ marginTop: '1rem' }}></div>
)}
<Container>
<Row className={`justify-content-center`}>
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/app/shared/nav/StickyMiniNavBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default function StickyMiniNavBar({
borderBottomStyle: 'solid',
borderBottomWidth: '4px',
fontFamily: isInSection ? 'Gotham Bold' : 'Gotham Book',
padding: '7px 0px',
padding: '7px 0px 3px 0',
}}
>
{label}
Expand Down

0 comments on commit 9e1a0c7

Please sign in to comment.