Skip to content

Commit

Permalink
Merge pull request #44 from MetaCell/feature/ESCKAN-59_2
Browse files Browse the repository at this point in the history
new changes to the header
  • Loading branch information
ddelpiano authored Jul 5, 2024
2 parents b0a9c11 + 838ce8a commit c5d2272
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 28 deletions.
9 changes: 5 additions & 4 deletions src/components/common/Heatmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import { OTHER_PHENOTYPE_LABEL } from '../../settings.ts';
import { useDataContext } from '../../context/DataContext.ts';

const { gray50, primaryPurple500, gray100A, gray500 } = vars;
const { gray50, primaryPurple500, gray100A, gray500, primaryPurple600 } = vars;

interface HeatmapGridProps {
xAxis: string[];
Expand Down Expand Up @@ -219,12 +219,13 @@ const HeatmapGrid: FC<HeatmapGridProps> = ({
height: '2rem',
marginRight: '0.5rem',
borderRadius: '0.25rem',
border: `0.0625rem solid ${gray500}`,
border: `0.0625rem solid ${primaryPurple600}`,
color: primaryPurple600,
},
}}
>
<Button onClick={() => handleExpandAll()}>Expand All</Button>
<Button onClick={() => handleCompressAll()}>Compress All</Button>
<Button onClick={() => handleExpandAll()}>Open All</Button>
<Button onClick={() => handleCompressAll()}>Close All</Button>
</ButtonGroup>
<Box mb={1.5} pl="17.375rem">
<Typography
Expand Down
5 changes: 5 additions & 0 deletions src/components/connections/SummaryDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ const SummaryDetails = ({

// Details shown in the dropdown - from composer
const detailsObject = [
{
label: 'Name',
value: connectionDetails?.id || '-',
icon: undefined,
},
{
label: 'Laterality',
value: connectionDetails?.laterality || '-',
Expand Down
48 changes: 24 additions & 24 deletions src/components/connections/SummaryHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import {
Stack,
} from '@mui/material';
import { vars } from '../../theme/variables';
import IconButton from '@mui/material/IconButton';
import { CloseArrows, ArrowRight, ArrowLeft, HelpCircle } from '../icons';
import { ArrowRight } from '../icons';
import Breadcrumbs from '@mui/material/Breadcrumbs';
import { SummaryType, KsRecord } from '../common/Types';
import { useDataContext } from '../../context/DataContext.ts';
Expand Down Expand Up @@ -37,11 +36,6 @@ const SummaryHeader = ({

const { selectedConnectionSummary } = useDataContext();

function getConnectionId() {
return Object.keys(knowledgeStatementsMap)[connectionPage - 1] || '';
}
const connectionId = getConnectionId();

const handleUpClick = () => {
if (connectionPage < totalUniqueKS) {
setConnectionPage(connectionPage + 1);
Expand Down Expand Up @@ -91,38 +85,49 @@ const SummaryHeader = ({
variant="outlined"
sx={{
'& .MuiButtonBase-root': {
width: '2rem',
width: '7.8rem',
height: '2rem',
borderRadius: '0.25rem',
border: `0.0625rem solid ${primaryPurple600}`,
color: primaryPurple600,
marginRight: '1rem',
},
}}
>
<IconButton onClick={() => setShowDetails(SummaryType.Summary)}>
<CloseArrows />
</IconButton>
<IconButton
<Button onClick={() => setShowDetails(SummaryType.Summary)}>
Back to Summary
</Button>
<Button
sx={{
width: '4rem !important',
marginLeft: '.25rem',
}}
onClick={handleDownClick}
>
<ArrowLeft />
</IconButton>
<IconButton
Previous
</Button>
<Typography
variant="subtitle1"
color={gray500}
style={{ width: '8rem' }}
>
Connection {connectionPage} of {totalUniqueKS}
</Typography>
<Button
sx={{
width: '4rem !important',
marginLeft: '.25rem',
}}
onClick={handleUpClick}
>
<ArrowRight />
</IconButton>
Next
</Button>
</ButtonGroup>
)}

<Breadcrumbs separator={<ArrowRight />} aria-label="breadcrumb">
{showDetails === SummaryType.DetailedSummary ? (
<Typography>{connectionId}</Typography>
<></>
) : (
<Typography>Summary</Typography>
)}
Expand All @@ -137,12 +142,7 @@ const SummaryHeader = ({
}}
>
{showDetails === SummaryType.DetailedSummary ? (
<>
<Typography variant="subtitle1" color={gray500}>
Displaying connection {connectionPage} of {totalUniqueKS}
</Typography>
<HelpCircle />
</>
<></>
) : (
<>
<Box
Expand Down

0 comments on commit c5d2272

Please sign in to comment.