From 910e21aefbca34a8632c000162fa1d2a98146b70 Mon Sep 17 00:00:00 2001 From: Fran McDade Date: Mon, 9 Dec 2024 13:12:03 +1000 Subject: [PATCH] feat: fix using example workspaces and scope (#3329) --- .../Learn/components/Workspaces/contants.ts | 8 ++++++++ .../Learn/components/Workspaces/workspaces.tsx | 14 ++++++++++++++ components/index.tsx | 2 +- docs/common/constants.ts | 6 +----- docs/common/scope.ts | 16 ---------------- docs/consortia/cser.mdx | 2 +- .../using-example-workspaces.mdx | 6 +----- 7 files changed, 26 insertions(+), 28 deletions(-) create mode 100644 components/Learn/components/Workspaces/contants.ts create mode 100644 components/Learn/components/Workspaces/workspaces.tsx delete mode 100644 docs/common/scope.ts diff --git a/components/Learn/components/Workspaces/contants.ts b/components/Learn/components/Workspaces/contants.ts new file mode 100644 index 000000000..dd295ead2 --- /dev/null +++ b/components/Learn/components/Workspaces/contants.ts @@ -0,0 +1,8 @@ +import { Grid2Props } from "@mui/material"; + +export const GRID2_PROPS: Grid2Props = { + columnGap: 4, + container: true, + direction: "column", + sx: { my: 6 }, +}; diff --git a/components/Learn/components/Workspaces/workspaces.tsx b/components/Learn/components/Workspaces/workspaces.tsx new file mode 100644 index 000000000..f6329a96f --- /dev/null +++ b/components/Learn/components/Workspaces/workspaces.tsx @@ -0,0 +1,14 @@ +import { CARDS as WORKSPACES } from "../../../Home/components/Section/components/SectionWorkspaces/common/content"; +import { Card } from "../../../Home/components/Section/components/SectionWorkspaces/components/Workspaces/components/Card/card"; +import { Grid2 } from "@mui/material"; +import { GRID2_PROPS } from "./contants"; + +export const Workspaces = (): JSX.Element => { + return ( + + {WORKSPACES.map((card, index) => ( + + ))} + + ); +}; diff --git a/components/index.tsx b/components/index.tsx index ff81bc5e7..80569633e 100644 --- a/components/index.tsx +++ b/components/index.tsx @@ -41,7 +41,6 @@ export { Resources } from "./Consortia/CSER/components/Resources/resources"; export { Card as EventCard } from "./Events/components/Card/card"; export { EventsHero } from "./Events/components/EventsHero/eventsHero"; export { Events } from "./Events/events"; -export { Card as WorkspaceCard } from "./Home/components/Section/components/SectionWorkspaces/components/Workspaces/components/Card/card"; export { ANVILBranding } from "./Layout/components/Footer/components/Branding/components/ANVILBranding/anvilBranding"; export { Actions } from "./Layout/components/Header/components/Actions/actions"; export { LabelIconMenuItem } from "./Layout/components/Header/components/Content/components/Navigation/components/NavigationMenuItems/components/LabelIconMenuItem/labelIconMenuItem"; @@ -51,3 +50,4 @@ export { News } from "./News/news"; export { Grid as AnalysisPortals } from "./Overview/components/AnalysisPortals/analysisPortals.styles"; export { Button as ButtonAddPublication } from "./Overview/components/Publications/components/Button/button"; export { Publications as AnVILPublications } from "./Overview/components/Publications/publications"; +export { Workspaces } from "./Learn/components/Workspaces/workspaces"; diff --git a/docs/common/constants.ts b/docs/common/constants.ts index 61c96e581..6d2ba673f 100644 --- a/docs/common/constants.ts +++ b/docs/common/constants.ts @@ -4,9 +4,7 @@ import { Link } from "../../components/common/Link/link"; import { Table } from "../../components/common/Table/table"; import DataIngestionChart from "../../components/Consortia/CSER/components/DataIngestionChart/dataIngestionChart"; import { PUBLICATION_CATEGORY } from "../../components/Home/components/Section/components/SectionPublications/common/entities"; -import { CARDS as WORKSPACE_CARDS } from "../../components/Home/components/Section/components/SectionWorkspaces/common/content"; import { ROUTES } from "../../routes/constants"; -import { getContentScope } from "./scope"; export const DOC_SITE_FOLDER_NAME = "docs"; @@ -45,15 +43,13 @@ export const MDX_COMPONENTS = { Subheader: C.Subheader, TextBodyLarge500: C.TextBodyLarge500, Video: C.Video, - WorkspaceCard: C.WorkspaceCard, + Workspaces: C.Workspaces, a: Link, table: Table, }; export const MDX_SCOPE = { - ...getContentScope(), ANCHOR_TARGET, PUBLICATION_CATEGORY, ROUTES, - workspaces: WORKSPACE_CARDS, }; diff --git a/docs/common/scope.ts b/docs/common/scope.ts deleted file mode 100644 index 21e381d23..000000000 --- a/docs/common/scope.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { config } from "../../config/config"; -import { SiteConfig } from "../../site-config/common/entities"; - -interface ContentScope { - portalURL: string; -} - -/** - * Returns the content scope. - * @returns content scope. - */ -export function getContentScope(): ContentScope { - const siteConfig = config() as SiteConfig; - const portalURL = siteConfig.portalURL; - return { portalURL }; -} diff --git a/docs/consortia/cser.mdx b/docs/consortia/cser.mdx index 961ed5290..c1e360981 100644 --- a/docs/consortia/cser.mdx +++ b/docs/consortia/cser.mdx @@ -20,7 +20,7 @@ Prioritizing engagement of traditionally underrepresented populations in genomic ## CSER Workspaces -Please see the for the list of CSER Workspaces on AnVIL. +Please see the [AnVIL Dataset Catalog]({portalURL}/data/consortia/CSER/workspaces) for the list of CSER Workspaces on AnVIL. ## CSER diversity & inclusion statement diff --git a/docs/learn/analysis-workflows/using-example-workspaces.mdx b/docs/learn/analysis-workflows/using-example-workspaces.mdx index 6a1adf9bc..1f87c28f2 100644 --- a/docs/learn/analysis-workflows/using-example-workspaces.mdx +++ b/docs/learn/analysis-workflows/using-example-workspaces.mdx @@ -20,11 +20,7 @@ The example workspaces listed below may be viewed with only a Terra account. To ## Featured Example Workspaces - - {workspaces.map((card, index) => ( - - ))} - + ## Additional Example Workspaces