Skip to content

Commit 85f8ef9

Browse files
committed
feat: optionally add logos on exports list (#4741)
1 parent 0959188 commit 85f8ef9

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,
@@ -104,6 +103,8 @@ import * as C from "../../../../components";
104103
import * as MDX from "../../../../components/common/MDXContent/anvil-cmg";
105104
import { RequestAccess } from "../../../../components/Detail/components/AnVILCMG/components/RequestAccess/requestAccess";
106105
import { Description } from "../../../../components/Detail/components/MDX/components/Description/description";
106+
import { ExportEntity } from "../../../../components/Export/components/AnVILExplorer/components/ExportEntity/exportEntity";
107+
import { Icon } from "../../../../components/Export/components/AnVILExplorer/components/ExportMethod/components/Icon/icon";
107108
import { METADATA_KEY } from "../../../../components/Index/common/entities";
108109
import { getPluralizedMetadataLabel } from "../../../../components/Index/common/indexTransformer";
109110
import { SUMMARY_DISPLAY_TEXT } from "./summaryMapper/constants";
@@ -472,6 +473,7 @@ export const buildDatasetExportMethodManifestDownload = (
472473
return {
473474
description:
474475
"Download a TSV manifest containing metadata for all data files in the dataset.",
476+
icon: <Icon alt="Manifest" src="/export/manifest.webp" width={24} />,
475477
route: `${datasetPath}${ROUTES.MANIFEST_DOWNLOAD}`,
476478
title: "Download TSV Manifest",
477479
};
@@ -505,6 +507,7 @@ export const buildDatasetExportMethodTerra = (
505507
return {
506508
description:
507509
"Terra is a biomedical research platform to analyze data using workflows, Jupyter Notebooks, RStudio, and Galaxy.",
510+
icon: <Icon alt="Terra" src="/export/terra.webp" width={24} />,
508511
route: `${datasetPath}${ROUTES.TERRA}`,
509512
title: "Export to Terra",
510513
};
@@ -534,6 +537,7 @@ export const buildDatasetExportMethodCurlCommand = (
534537
return {
535538
description:
536539
"Generate a curl command to download all files in this open-access dataset.",
540+
icon: <Icon alt="curl" src="/export/curl.webp" width={24} />,
537541
route: `${datasetPath}${ROUTES.CURL_DOWNLOAD}`,
538542
title: "Download Open-Access Data Files (No Data Transfer Fees)",
539543
};
@@ -887,6 +891,7 @@ export const buildExportMethodManifestDownload = (
887891
...getExportMethodAccessibility(viewContext),
888892
description:
889893
"Download a TSV manifest containing metadata for all data files in the current selection, including managed-access files.",
894+
icon: <Icon alt="Manifest" src="/export/manifest.webp" width={24} />,
890895
route: ROUTES.MANIFEST_DOWNLOAD,
891896
title: "Download TSV Manifest for All Selected Data Files",
892897
};
@@ -906,6 +911,7 @@ export const buildExportMethodTerra = (
906911
...getExportMethodAccessibility(viewContext),
907912
description:
908913
"Terra is a biomedical research platform to analyze data using workflows, Jupyter Notebooks, RStudio, and Galaxy.",
914+
icon: <Icon alt="Terra" src="/export/terra.webp" width={24} />,
909915
route: ROUTES.TERRA,
910916
title: "Export to Terra",
911917
};
@@ -956,6 +962,7 @@ export const buildExportMethodBulkDownload = (
956962
files in the current selection.
957963
</div>
958964
),
965+
icon: <Icon alt="curl" src="/export/curl.webp" width={24} />,
959966
route: ROUTES.CURL_DOWNLOAD,
960967
title: "Download Open-Access Data Files (No Data Transfer Fees)",
961968
};

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)