Skip to content

Commit b89d434

Browse files
committed
feat: optionally add logos on exports list (#4741)
1 parent 8d82b0d commit b89d434

11 files changed

Lines changed: 34 additions & 7 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { StaticImage } from "@databiosphere/findable-ui/lib/components/common/StaticImage/staticImage";
2+
import type { ComponentProps, JSX } from "react";
3+
4+
/**
5+
* Icon component that wraps the StaticImage component.
6+
* @param props - Component props.
7+
* @returns JSX element representing the icon.
8+
*/
9+
export const Icon = (
10+
props: ComponentProps<typeof StaticImage>
11+
): JSX.Element => {
12+
return <StaticImage {...props} />;
13+
};

app/viewModelBuilders/azul/anvil-cmg/common/viewModelBuilders.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import {
3939
FadeProps as MFadeProps,
4040
Tooltip,
4141
} from "@mui/material";
42-
import { ExportEntity } from "app/components/Export/components/AnVILExplorer/components/ExportEntity/exportEntity";
4342
import React, { ComponentProps, ReactNode } from "react";
4443
import {
4544
ANVIL_CMG_CATEGORY_KEY,
@@ -103,6 +102,8 @@ import * as C from "../../../../components";
103102
import * as MDX from "../../../../components/common/MDXContent/anvil-cmg";
104103
import { RequestAccess } from "../../../../components/Detail/components/AnVILCMG/components/RequestAccess/requestAccess";
105104
import { Description } from "../../../../components/Detail/components/MDX/components/Description/description";
105+
import { ExportEntity } from "../../../../components/Export/components/AnVILExplorer/components/ExportEntity/exportEntity";
106+
import { Icon } from "../../../../components/Export/components/AnVILExplorer/components/ExportMethod/components/Icon/icon";
106107
import { METADATA_KEY } from "../../../../components/Index/common/entities";
107108
import { getPluralizedMetadataLabel } from "../../../../components/Index/common/indexTransformer";
108109
import { SUMMARY_DISPLAY_TEXT } from "./summaryMapper/constants";
@@ -471,6 +472,7 @@ export const buildDatasetExportMethodManifestDownload = (
471472
return {
472473
description:
473474
"Download a TSV manifest containing metadata for all data files in the dataset.",
475+
icon: <Icon alt="Manifest" src="/export/manifest.webp" width={24} />,
474476
route: `${datasetPath}${ROUTES.MANIFEST_DOWNLOAD}`,
475477
title: "Download TSV Manifest",
476478
};
@@ -504,6 +506,7 @@ export const buildDatasetExportMethodTerra = (
504506
return {
505507
description:
506508
"Terra is a biomedical research platform to analyze data using workflows, Jupyter Notebooks, RStudio, and Galaxy.",
509+
icon: <Icon alt="Terra" src="/export/terra.webp" width={24} />,
507510
route: `${datasetPath}${ROUTES.TERRA}`,
508511
title: "Export to Terra",
509512
};
@@ -533,6 +536,7 @@ export const buildDatasetExportMethodCurlCommand = (
533536
return {
534537
description:
535538
"Generate a curl command to download all files in this open-access dataset.",
539+
icon: <Icon alt="curl" src="/export/curl.webp" width={24} />,
536540
route: `${datasetPath}${ROUTES.CURL_DOWNLOAD}`,
537541
title: "Download Open-Access Data Files (No Data Transfer Fees)",
538542
};
@@ -886,6 +890,7 @@ export const buildExportMethodManifestDownload = (
886890
...getExportMethodAccessibility(viewContext),
887891
description:
888892
"Download a TSV manifest containing metadata for all data files in the current selection, including managed-access files.",
893+
icon: <Icon alt="Manifest" src="/export/manifest.webp" width={24} />,
889894
route: ROUTES.MANIFEST_DOWNLOAD,
890895
title: "Download TSV Manifest for All Selected Data Files",
891896
};
@@ -905,6 +910,7 @@ export const buildExportMethodTerra = (
905910
...getExportMethodAccessibility(viewContext),
906911
description:
907912
"Terra is a biomedical research platform to analyze data using workflows, Jupyter Notebooks, RStudio, and Galaxy.",
913+
icon: <Icon alt="Terra" src="/export/terra.webp" width={24} />,
908914
route: ROUTES.TERRA,
909915
title: "Export to Terra",
910916
};
@@ -955,6 +961,7 @@ export const buildExportMethodBulkDownload = (
955961
files in the current selection.
956962
</div>
957963
),
964+
icon: <Icon alt="curl" src="/export/curl.webp" width={24} />,
958965
route: ROUTES.CURL_DOWNLOAD,
959966
title: "Download Open-Access Data Files (No Data Transfer Fees)",
960967
};

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"check-system-status:anvil-cmg": "esrun e2e/anvil/anvil-check-system-status.ts"
3333
},
3434
"dependencies": {
35-
"@databiosphere/findable-ui": "^50.4.0",
35+
"@databiosphere/findable-ui": "^50.5.0",
3636
"@emotion/react": "^11",
3737
"@emotion/styled": "^11",
3838
"@mdx-js/loader": "^3",

public/export/bdc.webp

690 Bytes
Loading

public/export/cavatica.webp

5.34 KB
Loading

public/export/cgc.webp

2.27 KB
Loading

public/export/curl.webp

528 Bytes
Loading

public/export/manifest.webp

670 Bytes
Loading

public/export/terra.webp

2.56 KB
Loading

0 commit comments

Comments
 (0)