-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add basic evidence viewer section (#212)
- fix table css bug, and safari header title bug - rename selected association vars - add basic evidence summary section - change gene symbol to full name - remove "table evidence viewer" e2e test because there will only be one simplified evidence view now
- Loading branch information
1 parent
4593cf5
commit d05abbe
Showing
9 changed files
with
146 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
<!-- | ||
node page associations section, viewer for supporting evidence of an | ||
association | ||
--> | ||
|
||
<template> | ||
<AppSection> | ||
<AppHeading icon="flask">Evidence</AppHeading> | ||
|
||
<div> | ||
Evidence for the selected association, <br /> | ||
<AppNodeBadge :node="node" /> | ||
<AppPredicateBadge :association="association" /> | ||
<AppNodeBadge | ||
:node="{ | ||
id: association.subject, | ||
name: association.subject_label, | ||
category: association.subject_category, | ||
}" | ||
/> | ||
</div> | ||
|
||
<AppDetails> | ||
<AppDetail | ||
title="Evidence Codes" | ||
:count="association.evidence_count" | ||
icon="flask" | ||
:big="true" | ||
> | ||
<AppFlex gap="small" h-align="left"> | ||
<span | ||
v-for="(source, index) in association.has_evidence" | ||
:key="index" | ||
>{{ source }}</span | ||
> | ||
</AppFlex> | ||
</AppDetail> | ||
|
||
<AppDetail title="Primary Knowledge Source" icon="lightbulb"> | ||
<span>{{ association.primary_knowledge_source }}</span> | ||
</AppDetail> | ||
|
||
<AppDetail title="Provided By" icon="notes-medical"> | ||
<span>{{ association.provided_by }}</span> | ||
</AppDetail> | ||
|
||
<AppDetail | ||
title="Publications" | ||
:count="association.publications?.length" | ||
icon="book" | ||
:big="true" | ||
> | ||
<AppFlex gap="small" h-align="left"> | ||
<span | ||
v-for="(publication, index) of association.publications" | ||
:key="index" | ||
> | ||
{{ publication }} | ||
</span> | ||
</AppFlex> | ||
</AppDetail> | ||
</AppDetails> | ||
</AppSection> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { onMounted, watch } from "vue"; | ||
import AppDetails from "@/components/AppDetails.vue"; | ||
import AppDetail from "@/components/AppDetail.vue"; | ||
import AppNodeBadge from "@/components/AppNodeBadge.vue"; | ||
import AppPredicateBadge from "@/components/AppPredicateBadge.vue"; | ||
import type { DirectionalAssociation, Node } from "@/api/model"; | ||
import { scrollToElement } from "@/router"; | ||
import { waitFor } from "@/util/dom"; | ||
|
||
interface Props { | ||
/** current node */ | ||
node: Node; | ||
/** selected association */ | ||
association: DirectionalAssociation; | ||
} | ||
|
||
const props = defineProps<Props>(); | ||
|
||
/** scroll evidence section into view */ | ||
async function scrollIntoView() { | ||
scrollToElement(await waitFor("#evidence")); | ||
} | ||
|
||
watch(() => props.association, scrollIntoView); | ||
onMounted(scrollIntoView); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.arrow { | ||
color: $gray; | ||
} | ||
</style> |
Oops, something went wrong.