Skip to content

Commit

Permalink
Merge pull request #368 from bcgsc/feat/DEVSU-2092-VUS-autocol-layout
Browse files Browse the repository at this point in the history
[DEVSU-2092] VUS autoGrid layout
  • Loading branch information
kttkjl authored Oct 23, 2023
2 parents 3a2b46a + 6345886 commit f8b11c4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
7 changes: 7 additions & 0 deletions app/views/ReportView/components/RapidSummary/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@
&__none {
padding: 16px;
}

&__unknown-significance {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
grid-gap: 1rem;
margin: 1rem 0;
}
}

.rapid-summary--print {
Expand Down
48 changes: 24 additions & 24 deletions app/views/ReportView/components/RapidSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -591,31 +591,31 @@ const RapidSummary = ({

const unknownSignificanceSection = useMemo(() => {
if (unknownSignificanceResults?.length > 0) {
const sortedVUS = unknownSignificanceResults.sort(({ displayName: displayNameA }, { displayName: displayNameB }) => {
if (displayNameA < displayNameB) {
return -1;
}
if (displayNameA > displayNameB) {
return 1;
}
return 0;
});

return (
<Box display="flex" flexDirection="row" flexWrap="wrap" margin="1rem 0 1rem 0">
{
(unknownSignificanceResults).sort(({ displayName: displayNameA }, { displayName: displayNameB }) => {
if (displayNameA < displayNameB) {
return -1;
}
if (displayNameA > displayNameB) {
return 1;
}
return 0;
}).map((entry) => (
<Box
display="inline-block"
padding={1}
minWidth="150px"
key={entry.ident}
>
<Typography variant="h6" fontWeight="fontWeightBold">
{getGenomicEvent({ data: entry })}
</Typography>
</Box>
))
}
</Box>
<section className="rapid-summary__unknown-significance">
{sortedVUS.map((entry) => (
<Box
display="inline-block"
padding={1}
minWidth="150px"
key={entry.ident}
>
<Typography variant="h6">
{getGenomicEvent({ data: entry })}
</Typography>
</Box>
))}
</section>
);
}
return (
Expand Down

0 comments on commit f8b11c4

Please sign in to comment.