Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import data from "catalog/output/ncbi-taxa-tree.json";
import { config } from "../../../../../../../app/config/config";

/**
* Interface representing a node in the NCBI taxonomy tree
Expand Down Expand Up @@ -32,6 +32,15 @@ export interface TaxonomyNode {
}

export function getData(): TaxonomyNode {
// Any data massaging can be done at this extension point.
return data;
const { taxTree } = config();
if (!taxTree) {
return {
assembly_count: 0,
children: [],
name: "root",
ncbi_tax_id: "",
};
Comment on lines 34 to +42
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded fallback object should be extracted to a constant to improve maintainability and ensure consistency if this fallback is needed elsewhere.

Copilot uses AI. Check for mistakes.
}

return taxTree;
}
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ export const SectionViz = ({
tooltip.remove();
d3.select(svgNode).selectAll("*").remove();
};
}, []);
}, [DEPTH, LOGO_PATH, startingNode]);

// Handler for when a node is clicked in the NodeDetails component
const handleNodeClick = (node: TreeNode): void => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import styled from "@emotion/styled";
import { sectionLayout } from "../../../../../../Layout/components/AppLayout/components/Section/section.styles";
import { SectionHeadline } from "../../../section.styles";
import { PALETTE } from "@databiosphere/findable-ui/lib/styles/common/constants/palette";

export const Section = styled.section`
background-color: ${PALETTE.SMOKE_LIGHTEST};
border-top: 1px solid ${PALETTE.SMOKE_MAIN};
overflow: hidden;
width: 100%;
`;

export const SectionLayout = styled.div`
${sectionLayout};
display: flex;
flex-direction: column;
gap: 48px 16px;
padding: 64px 16px;
`;

export const Headline = styled(SectionHeadline)`
align-self: center;
grid-column: 1 / -1;
max-width: 560px;
text-align: center;
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { SectionSubtitle, SectionTitle } from "../../../section.styles";
import { SectionViz as Sunburst } from "../../SectionViz/sunburst";
import { Headline, Section, SectionLayout } from "./sectionAssemblies.styles";

export const SectionAssemblies = (): JSX.Element => {
return (
<Section>
<SectionLayout>
<Headline>
<SectionTitle>Browse Assemblies</SectionTitle>
<SectionSubtitle>
Browse assemblies by taxonomic lineage.
</SectionSubtitle>
</Headline>
<Sunburst logoPath="/logo/genomeark2.svg" startingNode="Metazoa" />
</SectionLayout>
</Section>
);
};
2 changes: 2 additions & 0 deletions app/views/HomeView/ga2/homeView.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Fragment } from "react";
import { SectionHero } from "../../../components/Home/components/Section/components/ga2/SectionHero/sectionHero";
import { SectionAssemblies } from "../../../components/Home/components/Section/components/ga2/SectionAssemblies/sectionAssemblies";
import { SectionSubHero } from "../../../components/Home/components/Section/components/ga2/SectionSubHero/sectionSubHero";
import { SectionAnalyticsAndData } from "../../../components/Home/components/Section/components/ga2/SectionAnalyticsAndData/sectionAnalyticsAndData";

Expand All @@ -8,6 +9,7 @@ export const HomeView = (): JSX.Element => {
<Fragment>
<SectionHero />
<SectionSubHero />
<SectionAssemblies />
<SectionAnalyticsAndData />
</Fragment>
);
Expand Down
56 changes: 56 additions & 0 deletions public/logo/genomeark2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion site-config/brc-analytics/local/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { socialMenuItems, socialMedia } from "./socialMedia";
import { FILTER_SORT } from "@databiosphere/findable-ui/lib/common/filters/sort/config/types";
import { AppSiteConfig } from "../../common/entities";
import { APP_KEYS } from "../../common/constants";
import data from "catalog/output/ncbi-taxa-tree.json";
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import path uses a relative module resolution that may not be portable. Consider using an absolute import path or ensure this path is properly configured in your module resolution settings.

Suggested change
import data from "catalog/output/ncbi-taxa-tree.json";
import data from "../../../catalog/output/ncbi-taxa-tree.json";

Copilot uses AI. Check for mistakes.
import { TaxonomyNode } from "../../../app/components/Home/components/Section/components/SectionViz/data";

const LOCALHOST = "http://localhost:3000";
const APP_TITLE = "BRC Analytics";
Expand All @@ -25,6 +27,7 @@ const GIT_HUB_REPO_URL = "https://github.com/galaxyproject/brc-analytics";
* Make site config object.
* @param browserUrl - Browser URL.
* @param gitHubUrl - GitHub URL.
* @param taxTreeData - Taxonomy tree data.
* @remarks
* The `genomeEntityConfig` is typecast to `EntityConfig<BRCDataCatalogGenome>`
* because the `SiteConfig` interface from the `@databiosphere/findable-ui` package expects
Expand All @@ -38,7 +41,8 @@ const GIT_HUB_REPO_URL = "https://github.com/galaxyproject/brc-analytics";
*/
export function makeConfig(
browserUrl: string,
gitHubUrl = GIT_HUB_REPO_URL
gitHubUrl = GIT_HUB_REPO_URL,
taxTreeData = data as TaxonomyNode
): AppSiteConfig {
return {
appKey: APP_KEYS.BRC_ANALYTICS,
Expand Down Expand Up @@ -108,6 +112,7 @@ export function makeConfig(
},
},
redirectRootToPath: "/",
taxTree: taxTreeData,
themeOptions: {},
};
}
Expand Down
2 changes: 2 additions & 0 deletions site-config/common/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
} from "@databiosphere/findable-ui/lib/config/entities";
import { SiteConfig as BaseSiteConfig } from "@databiosphere/findable-ui/lib/config/entities";
import { APP_KEYS } from "./constants";
import { TaxonomyNode } from "../../app/components/Home/components/Section/components/SectionViz/data";

export interface AppBackPageConfig
extends Omit<BaseBackPageConfig, "tabs" | "top"> {
Expand All @@ -25,4 +26,5 @@ export interface AppEntityConfig<R>
export interface AppSiteConfig extends BaseSiteConfig {
allowedPaths?: string[];
appKey?: (typeof APP_KEYS)[keyof typeof APP_KEYS];
taxTree?: TaxonomyNode;
}
7 changes: 6 additions & 1 deletion site-config/ga2/local/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
} from "../../../app/apis/catalog/ga2/entities";
import { AppSiteConfig } from "../../common/entities";
import { APP_KEYS } from "../../common/constants";
import data from "catalog/ga2/output/ncbi-taxa-tree.json";
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import path uses a relative module resolution that may not be portable. Consider using an absolute import path or ensure this path is properly configured in your module resolution settings.

Suggested change
import data from "catalog/ga2/output/ncbi-taxa-tree.json";
import data from "../../../catalog/ga2/output/ncbi-taxa-tree.json";

Copilot uses AI. Check for mistakes.
import { TaxonomyNode } from "../../../app/components/Home/components/Section/components/SectionViz/data";

const ALLOWED_PATHS = [
ROUTES.ABOUT,
Expand All @@ -26,6 +28,7 @@ const GIT_HUB_REPO_URL = "https://github.com/galaxyproject/ga2";
* Make site config object.
* @param browserUrl - Browser URL.
* @param gitHubUrl - GitHub URL.
* @param taxTreeData - Taxonomy tree data.
* @remarks
* The `genomeEntityConfig` is typecast to `EntityConfig<GA2AssemblyEntity>`
* because the `SiteConfig` interface from the `@databiosphere/findable-ui` package expects
Expand All @@ -39,7 +42,8 @@ const GIT_HUB_REPO_URL = "https://github.com/galaxyproject/ga2";
*/
export function makeConfig(
browserUrl: string,
gitHubUrl = GIT_HUB_REPO_URL
gitHubUrl = GIT_HUB_REPO_URL,
taxTreeData = data as TaxonomyNode
): AppSiteConfig {
return {
allowedPaths: ALLOWED_PATHS,
Expand Down Expand Up @@ -78,6 +82,7 @@ export function makeConfig(
},
},
redirectRootToPath: "/",
taxTree: taxTreeData,
themeOptions: {},
};
}
Expand Down
Loading