Skip to content

Commit 3c9b058

Browse files
committed
Merge branch 'main' of https://github.com/allen-cell-animated/cell-catalog into fix/align-info-card
2 parents 8c2bb2f + 06edf4c commit 3c9b058

70 files changed

Lines changed: 194 additions & 77 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/component-queries/convert-data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export const convertFrontmatterToDiseaseCellLine = (
6565
return {
6666
cellLineId: cellLineNode.frontmatter.cell_line_id,
6767
certificateOfAnalysis: cellLineNode.frontmatter.certificate_of_analysis,
68-
healthCertificate: cellLineNode.frontmatter.hPSCreg_certificate_link,
68+
healthCertificate: cellLineNode.frontmatter.hpscreg_certificate_link,
6969
snp: cellLineNode.frontmatter.snp,
7070
status: cellLineNode.frontmatter.status,
7171
clones: cellLineNode.frontmatter.clones,
@@ -121,7 +121,7 @@ export const convertFrontmatterToNormalCellLines = ({
121121
structures: structures,
122122
status: cellLineNode.frontmatter.status,
123123
certificateOfAnalysis: cellLineNode.frontmatter.certificate_of_analysis,
124-
healthCertificate: cellLineNode.frontmatter.eu_hpsc_reg,
124+
healthCertificate: cellLineNode.frontmatter.hpscreg_certificate_link,
125125
orderLink: cellLineNode.frontmatter.order_link,
126126
orderPlasmid: cellLineNode.frontmatter.donor_plasmid,
127127
thumbnailImage: getThumbnail(

src/component-queries/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export interface NormalCellLineFrontmatter {
134134
};
135135
};
136136
certificate_of_analysis: string;
137-
eu_hpsc_reg: string;
137+
hpscreg_certificate_link: string;
138138
editing_design: {
139139
ncbi_isoforms: string;
140140
cr_rna: string;
@@ -217,7 +217,7 @@ export interface DiseaseCellLineFrontmatter {
217217
certificate_of_analysis: string;
218218
order_link: string;
219219
status: CellLineStatus;
220-
hPSCreg_certificate_link: string;
220+
hpscreg_certificate_link: string;
221221
images_and_videos?: MediaFrontmatter;
222222
editing_design?: {
223223
cr_rna_target_site: string;

src/components/CategorySections.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,20 @@ const CategorySections: React.FC<CategorySectionsProps> = ({
5858
[filteredList, selectedCategories],
5959
);
6060

61+
// Sort categories: non-empty first, empty last (preserves relative order)
62+
const sortedCategories = React.useMemo(() => {
63+
const nonEmpty: CategoryLabel[] = [];
64+
const empty: CategoryLabel[] = [];
65+
for (const cat of selectedCategories) {
66+
(buckets[cat]?.length ? nonEmpty : empty).push(cat);
67+
}
68+
return [...nonEmpty, ...empty];
69+
}, [selectedCategories, buckets]);
70+
6171
return (
6272
<>
63-
{selectedCategories.map((cat) => {
73+
{sortedCategories.map((cat) => {
6474
const data = buckets[cat] || [];
65-
if (!data.length) return null;
6675
return (
6776
<CellLineTable
6877
key={cat}

src/components/CellLineInfoCard/CellLineInfoCardBase.tsx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,21 @@ const CellLineInfoCardBase = ({
5252
}: CellLineInfoCardBaseProps) => {
5353
const [showToolTip, setShowToolTip] = useState(false);
5454

55-
const getDefaultButton = (label: string, href: string) => (
56-
<DefaultButton key={href} href={href} target="_blank" rel="noreferrer">
57-
{label}
58-
</DefaultButton>
59-
);
55+
const getDefaultButton = (label: string, href: string) => {
56+
if (!href) {
57+
return null;
58+
}
59+
return (
60+
<DefaultButton
61+
key={href}
62+
href={href}
63+
target="_blank"
64+
rel="noreferrer"
65+
>
66+
{label}
67+
</DefaultButton>
68+
);
69+
};
6070

6171
const getOrderButton = (
6272
{ disabledLabel, href, icon, label, subtitle }: OrderButtonProps,

src/components/CellLineTable/index.tsx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ const {
1515
comingSoon,
1616
container,
1717
dataComplete,
18+
emptyMessage,
1819
hoveredRow,
20+
link,
1921
tableTitle,
2022
titleContainer,
2123
} = require("../../style/table.module.css");
@@ -118,6 +120,36 @@ const CellLineTable = ({
118120
};
119121
});
120122

123+
const noDataMessage = (
124+
<div className={emptyMessage}>
125+
<h2>We can't seem to find what you're looking for...</h2>
126+
<p>
127+
But don't cell yourself short! Try adjusting your search
128+
parameters or reach out to our{" "}
129+
<a
130+
rel="noopener noreferrer"
131+
target="_blank"
132+
href="https://forum.allencell.org/"
133+
className={link}
134+
>
135+
forum
136+
</a>{" "}
137+
to ask about availability.
138+
</p>
139+
<p>
140+
Looking for a cell line with a disease mutation?{" "}
141+
<a
142+
rel="noopener noreferrer"
143+
target="_blank"
144+
href="https://cell-catalog.allencell.org/disease-catalog/"
145+
className={link}
146+
>
147+
Check out our Disease Cell Catalog.
148+
</a>
149+
</p>
150+
</div>
151+
);
152+
121153
return (
122154
<>
123155
<Table
@@ -148,6 +180,8 @@ const CellLineTable = ({
148180
dataSource={cellLines}
149181
showSorterTooltip={false}
150182
sortDirections={["ascend", "descend", "ascend"]}
183+
showHeader={cellLines.length > 0}
184+
locale={{ emptyText: noDataMessage }}
151185
/>
152186
</>
153187
);

src/components/SubPage/convert-data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ export const unpackNormalFrontmatterForSubpage = (
333333
structures: structures,
334334
status: cellLineNode.frontmatter.status,
335335
certificateOfAnalysis: cellLineNode.frontmatter.certificate_of_analysis,
336-
healthCertificate: cellLineNode.frontmatter.eu_hpsc_reg,
336+
healthCertificate: cellLineNode.frontmatter.hpscreg_certificate_link,
337337
orderLink: cellLineNode.frontmatter.order_link,
338338
orderPlasmid: cellLineNode.frontmatter.donor_plasmid,
339339
thumbnailImage: getThumbnail(
@@ -371,7 +371,7 @@ export const unpackDiseaseFrontmatterForSubpage = (
371371
cellLineId: cellLineNode.frontmatter.cell_line_id,
372372
status: cellLineNode.frontmatter.status,
373373
certificateOfAnalysis: cellLineNode.frontmatter.certificate_of_analysis,
374-
healthCertificate: cellLineNode.frontmatter.hPSCreg_certificate_link,
374+
healthCertificate: cellLineNode.frontmatter.hpscreg_certificate_link,
375375
orderLink: cellLineNode.frontmatter.order_link,
376376
geneName: geneName,
377377
geneSymbol: geneSymbol,

src/pages/cell-line/AICS-10-55/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ genetic_modifications:
1212
order_link: https://catalog.coriell.org/0/Sections/Search/Sample_Detail.aspx?Ref=AICS-0010&Product=iPSC
1313
certificate_of_analysis: https://catalog.coriell.org/0/PDF/Allen/ipsc/AICS-0010_CofA.pdf
1414
donor_plasmid: https://www.addgene.org/87426/
15-
eu_hpsc_reg: https://hpscreg.eu/cell-line/UCSFi001-A-8
15+
hpscreg_certificate_link: https://hpscreg.eu/cell-line/UCSFi001-A-8
1616
images_and_videos:
1717
images:
1818
- image: single_plane_image_cl55.jpg

src/pages/cell-line/AICS-11-27/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ genetic_modifications:
1212
order_link: https://catalog.coriell.org/0/Sections/Search/Sample_Detail.aspx?Ref=AICS-0011&Product=iPSC
1313
certificate_of_analysis: https://catalog.coriell.org/0/PDF/Allen/ipsc/AICS-0011_CofA.pdf
1414
donor_plasmid: https://www.addgene.org/87423/
15-
eu_hpsc_reg: https://hpscreg.eu/cell-line/UCSFi001-A-5
15+
hpscreg_certificate_link: https://hpscreg.eu/cell-line/UCSFi001-A-5
1616
images_and_videos:
1717
images:
1818
- image: single_plane_image_cl27.jpg

src/pages/cell-line/AICS-114-32/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ genetic_modifications:
1313
order_link: https://catalog.coriell.org/0/Sections/Search/Sample_Detail.aspx?Ref=AICS-0114-032&Product=iPSC
1414
certificate_of_analysis: https://catalog.coriell.org/0/PDF/Allen/ipsc/AICS-0114-032_CofA.pdf
1515
donor_plasmid: https://www.addgene.org/193921/
16-
eu_hpsc_reg: https://hpscreg.eu/cell-line/UCSFi001-A-66
16+
hpscreg_certificate_link: https://hpscreg.eu/cell-line/UCSFi001-A-66
1717
images_and_videos:
1818
images:
1919
- image: single_plane_image_cl32.jpg

src/pages/cell-line/AICS-114-35/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,5 +141,5 @@ stem_cell_characteristics:
141141
Biosciences) and gating was based on an isotype control. Ranges observed
142142
across multiple experiments are shown for Troponin T and Day of beating
143143
initiation; number of experiments is shown in (). "
144-
eu_hpsc_reg: https://hpscreg.eu/cell-line/UCSFi001-A-67
144+
hpscreg_certificate_link: https://hpscreg.eu/cell-line/UCSFi001-A-67
145145
---

0 commit comments

Comments
 (0)