From 68c259223175861d29dd25f77b01af4ca26474ad Mon Sep 17 00:00:00 2001 From: varun_divya Date: Thu, 4 Sep 2025 15:48:43 -0400 Subject: [PATCH 01/18] clean up --- .../pages/node/SectionClinicalReources.vue | 37 +++++------- frontend/src/pages/node/SectionOverview.vue | 59 +++++-------------- 2 files changed, 28 insertions(+), 68 deletions(-) diff --git a/frontend/src/pages/node/SectionClinicalReources.vue b/frontend/src/pages/node/SectionClinicalReources.vue index d33f03bce..f2ae104c2 100644 --- a/frontend/src/pages/node/SectionClinicalReources.vue +++ b/frontend/src/pages/node/SectionClinicalReources.vue @@ -6,22 +6,20 @@ >
-
- - - {{ brandText(res.id, res.label) }} - - {{ res.id }} - - - -
+ + + {{ brandText(res.id, res.label) }} + + {{ res.id }} +
@@ -117,13 +115,6 @@ const brandText = (id: string, fallback?: string) => { gap: 0.4em; } -.linkout { - display: flex; - flex-direction: column; - align-items: center; - gap: 0.35em; -} - .brand-chip { display: flex; flex-direction: column; diff --git a/frontend/src/pages/node/SectionOverview.vue b/frontend/src/pages/node/SectionOverview.vue index e44495674..266985d4f 100644 --- a/frontend/src/pages/node/SectionOverview.vue +++ b/frontend/src/pages/node/SectionOverview.vue @@ -47,13 +47,13 @@ - + @@ -69,7 +69,7 @@ @@ -83,13 +83,13 @@ - + {{ node.id }} - + {{ node.provided_by_link?.id || node.provided_by }} @@ -99,48 +99,14 @@ - + {{ node.id }} - - - - {{ node.inheritance?.name }} - - - - - - - - - - - - - {{ node?.subsets?.includes("rare") ? "Rare" : "Common" }} - - + @@ -166,14 +132,14 @@ - + {{ node.provided_by_link?.id || node.provided_by }} @@ -189,7 +155,7 @@ @@ -223,6 +189,9 @@ type Props = { node: Node }; const { node } = defineProps(); const isDiseaseNode = computed(() => node.category === "biolink:Disease"); +const isphenotypeNode = computed( + () => node.category === "biolink:PhenotypicFeature", +); /** separate out mappings into categories */ const clinicalSynopsis = computed( () => From 4f1bc07f24827c384e5c3a4d997c6d5c8df41b6c Mon Sep 17 00:00:00 2001 From: varun_divya Date: Fri, 5 Sep 2025 14:28:37 -0400 Subject: [PATCH 02/18] refactoring disease node page, updated phenotype section over view with new design --- frontend/src/components/AppDetail.vue | 2 +- .../pages/node/SectionClinicalReources.vue | 25 +++++- .../src/pages/node/SectionDiseaseOverview.vue | 74 +++++++++++++++++ frontend/src/pages/node/SectionHierarchy.vue | 1 - frontend/src/pages/node/SectionOverview.vue | 83 +++++-------------- 5 files changed, 120 insertions(+), 65 deletions(-) create mode 100644 frontend/src/pages/node/SectionDiseaseOverview.vue diff --git a/frontend/src/components/AppDetail.vue b/frontend/src/components/AppDetail.vue index 4741c4586..57997dbb2 100644 --- a/frontend/src/components/AppDetail.vue +++ b/frontend/src/components/AppDetail.vue @@ -33,7 +33,7 @@ type Props = { /** title of info block */ - title: string; + title?: string; /** icon next to title */ icon?: string; /** number next to title */ diff --git a/frontend/src/pages/node/SectionClinicalReources.vue b/frontend/src/pages/node/SectionClinicalReources.vue index f2ae104c2..486b642e6 100644 --- a/frontend/src/pages/node/SectionClinicalReources.vue +++ b/frontend/src/pages/node/SectionClinicalReources.vue @@ -50,13 +50,36 @@
+ + + {{ node?.inheritance?.name }} + + + + + + + diff --git a/frontend/src/pages/node/SectionHierarchy.vue b/frontend/src/pages/node/SectionHierarchy.vue index b1aa9958a..629eca050 100644 --- a/frontend/src/pages/node/SectionHierarchy.vue +++ b/frontend/src/pages/node/SectionHierarchy.vue @@ -38,7 +38,6 @@ - - - - + + + @@ -69,13 +71,13 @@ {{ link.id }} - - - {{ node.id }} - - - - - - {{ node.provided_by_link?.id || node.provided_by }} - - - - - - @@ -137,37 +124,6 @@ {{ node.provided_by_link?.id || node.provided_by }} - - - - - {{ mapping.id }} - - - - - - - {{ link.id }} - - @@ -179,19 +135,24 @@ import omit from "lodash/omit"; import type { Node } from "@/api/model"; import AppDetail from "@/components/AppDetail.vue"; import AppDetails from "@/components/AppDetails.vue"; -import AppNodeBadge from "@/components/AppNodeBadge.vue"; import AppNodeText from "@/components/AppNodeText.vue"; import AppTagList from "@/components/AppTagList.vue"; import { useClinicalResources } from "@/composables/use-clinical-resources"; import SectionClinicalReources from "./SectionClinicalReources.vue"; +import SectionDiseaseOverview from "./SectionDiseaseOverview.vue"; type Props = { node: Node }; const { node } = defineProps(); const isDiseaseNode = computed(() => node.category === "biolink:Disease"); -const isphenotypeNode = computed( +const isPhenotypeNode = computed( () => node.category === "biolink:PhenotypicFeature", ); +const { otherMappings, externalRefs } = useClinicalResources(node); +const CATEGORY_MAP: Record = { + "biolink:Disease": "disease", + "biolink:PhenotypicFeature": "phenotype", +}; /** separate out mappings into categories */ const clinicalSynopsis = computed( () => @@ -210,11 +171,9 @@ const frequencyLabel = computed((): "Rare" | "Common" => { return node.subsets?.includes("rare") ? "Rare" : "Common"; }); -const { otherMappings, externalRefs } = useClinicalResources(node); -// async function scrollToAssociations() { -// await sleep(100); -// scrollTo("#associations"); -// } +const categoryLabel = computed( + () => CATEGORY_MAP[node?.category ?? ""] ?? node?.category ?? "", +);