Skip to content

Commit

Permalink
NN-620 removed unused code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
anlisha-maharjan committed Dec 10, 2024
1 parent 2565282 commit d16e5b7
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 1,872 deletions.
75 changes: 6 additions & 69 deletions frontend/src/components/citation/CitationGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<section v-if="citation_graphs.size != 0" class="grid grid-cols-2 gap-2.5 pt-3">
<Card v-for="(entry, index) in filt_graphs" :class="`group relative overflow-hidden border ${active_citation_id === entry.id
? 'border-primary-600 !bg-primary-600/25'
: 'dark:!bg-slate-300/25 border-transparent'
: 'dark:!bg-slate-300/25 !bg-slate-300/10 border-transparent'
}`" :key="index" :pt="{
header: { class: 'h-26 relative rounded-md mt-[6px] mx-[6px] overflow-hidden' },
body: { class: '!p-0 !gap-0' },
Expand Down Expand Up @@ -33,12 +33,13 @@
</template>

<template #title>
<h6 :class="`w-full h-full flex items-center gap-2 absolute top-0 left-0 py-2 px-2 text-sm font-medium cursor-text z-[1]
<h6 :class="`w-full h-full absolute top-0 left-0 flex items-center gap-2 py-2 px-2 text-sm font-medium cursor-text z-[1]
${focus_citation_id === entry.id ? '!hidden' : ''}`" v-on:click="setFocus(entry.id, index)">
{{ entry.label }} <span class="text-lg material-symbols-rounded dark:text-slate-200"> edit </span>
<span class="line-clamp-1">{{ entry.label }}</span> <span
class="flex-shrink-0 text-lg material-symbols-rounded dark:text-slate-200"> edit </span>
</h6>
<input ref="citationInputs" type="text" v-model="entry.label"
:class="`bg-transparent py-2 px-2 text-sm font-medium ${focus_citation_id === entry.id ? '' : 'opacity-0'}`"
:class="`w-full bg-transparent py-2 px-2 text-sm font-medium ${focus_citation_id === entry.id ? '' : 'opacity-0'}`"
@click.stop @blur="clearFocus" />
</template>

Expand All @@ -49,47 +50,6 @@
</template>
</Card>
</section>

<!-- <div class="loading-section">
<div class="loading-text" v-if="citation_graphs.size == 0">
<span>There is no generated citation graph.</span>
</div>
<div class="slider" tabindex="0" v-if="citation_graphs.size != 0">
<div
v-for="(entry, index) in filt_graphs"
:key="index"
class="graph"
v-on:click="switch_graph(entry)"
@mouseover="activeGraphIndex = index"
@mouseout="activeGraphIndex = -1"
>
<SnapshotCitation :propValue="entry" :index="entry.id" />
<div class="graph-options">
<div
class="bookmark-graph"
v-show="activeGraphIndex == index"
v-on:click.stop="add_graph(entry)"
:class="{ checked: favourite_graphs.has(entry.id) }"
ref="checkboxStatesGraph"
></div>
<img
class="remove-graph"
v-show="activeGraphIndex == index"
src="@/assets/pathwaybar/cross.png"
v-on:click.stop="remove_graph(entry)"
/>
<div class="graph-citation-name">
<input
type="text"
v-model="entry.label"
class="empty"
@click.stop
/>
</div>
</div>
</div>
</div>
</div> -->
</template>

<script>
Expand All @@ -107,7 +67,6 @@ export default {
},
data() {
return {
// activeGraphIndex: -1,
focus_citation_id: null,
active_citation_id: null
};
Expand Down Expand Up @@ -172,26 +131,4 @@ export default {
},
},
};
</script>

<!-- <style>
.graph-citation-name {
position: fixed;
display: flex;
bottom: 5%;
width: 100%;
height: 20%;
-webkit-backdrop-filter: blur(7.5px);
text-align-last: center;
justify-content: center;
}

.graph-citation-name input[type="text"] {
font-size: 0.5vw;
background: none;
color: white;
cursor: default;
font-family: "ABeeZee", sans-serif;
border: none;
}
</style> -->
</script>
135 changes: 0 additions & 135 deletions frontend/src/components/citation/CitationMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,6 @@
<CitationGraph :citation_graphs="citation_graphs" :favourite_graphs="favourite_graphs" :bookmark_off="bookmark_off"
@loading_state_changed="loading_state = $event" @favourite_graphs_changed="favourite_graphs = $event">
</CitationGraph>

<!-- <div id="citation-tools" class="pathways">
<div class="pathwaybar">
<div id="citation-graphs">
<div class="tool-section-graph">
<div class="coloumn-button">
<button class="tool-buttons" v-on:click="get_citation_graph(context_raw)">
<img class="buttons-img" src="@/assets/plus-1.png" v-if="!loading_state" />
<div v-if="loading_state" class="loading_button"></div>
</button>
</div>
<div class="coloumn-button">
<button class="tool-buttons" :class="{ recolor_filter: bookmark_off == false }"
v-on:click="bookmark_off = !bookmark_off">
<img class="buttons-img" src="@/assets/star.png" />
</button>
</div>
</div>
<div class="graph-section">
<CitationGraph :citation_graphs="citation_graphs" :favourite_graphs="favourite_graphs"
:bookmark_off="bookmark_off" @loading_state_changed="loading_state = $event"
@favourite_graphs_changed="favourite_graphs = $event"></CitationGraph>
</div>
</div>
</div>
</div> -->
</template>

<script>
Expand Down Expand Up @@ -162,112 +136,3 @@ export default {
},
};
</script>

<!-- <style>
#citation-graphs {
width: 100%;
height: 100%;
z-index: 999;
display: flex;
flex-direction: column;
overflow: hidden;
font-family: "ABeeZee", sans-serif;
}

.citation-search {
background: rgba(222, 222, 222, 0.3);
padding: 0 0 0 0.3vw;
height: 1.4vw;
display: flex;
align-items: center;
align-content: center;
justify-content: center;
}

.citation-search-icon {
margin-left: 3%;
position: relative;
height: 0.9vw;
width: 0.9vw;
filter: invert(100%);
}

.citation-search input[type="text"] {
margin-left: 0.5vw;
width: 16vw;
font-size: 0.85vw;
background: none;
color: white;
cursor: default;
border: none;
font-family: "ABeeZee", sans-serif;
}

.citation-search [type="text"]::-webkit-input-placeholder {
opacity: 70%;
}

.context-check {
margin-top: 0.2vw;
margin-bottom: 0.2vw;
}

.context-confirm {
font-family: "ABeeZee", sans-serif;
color: white;
font-size: 0.7vw;
display: flex;
}

.context-confirm [type="checkbox"]+label {
display: block;
cursor: pointer;
font-family: sans-serif;
font-size: 24px;
line-height: 1.3;
position: absolute;
left: 7vw;
margin-top: 0.7%;
}

.context-confirm [type="checkbox"]+label:before {
width: 1.2vw;
height: 0.6vw;
border-radius: 30px;
background-color: #ddd;
content: "";
transition: background-color 0.5s linear;
z-index: 5;
position: absolute;
}

.context-confirm [type="checkbox"]+label:after {
width: 0.4vw;
height: 0.4vw;
border-radius: 30px;
background-color: #fff;
content: "";
transition: margin 0.1s linear;
box-shadow: 0px 0px 5px #aaa;
position: absolute;
top: 10%;
margin: 0.09vw 0 0 0.09vw;
z-index: 10;
}

.context-confirm [type="checkbox"]:checked+label:after {
margin: 0.09vw 0 0 0.69vw;
}

.loading_pane_citation {
content: "";
position: absolute;
width: 1vw;
height: 1vw;
border: 4px solid transparent;
border-top-color: #ffffff;
border-radius: 50%;
right: 1vw;
animation: button-loading-spinner 1s ease infinite;
}
</style> -->
41 changes: 0 additions & 41 deletions frontend/src/components/enrichment/HeatmapTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,6 @@
</ListActionHeader>

<PathwayHeatmap :bookmark_off="bookmark_off"></PathwayHeatmap>

<!-- <div id="heatmap-graphs">
<div class="tool-section-graph">
<div class="coloumn-button">
<button class="tool-buttons" v-on:click="get_heatmap()">
<img class="buttons-img" src="@/assets/plus-1.png" />
</button>
</div>
<div class="coloumn-button">
<button
class="tool-buttons"
:class="{ recolor_filter: bookmark_off == false }"
v-on:click="bookmark_off = !bookmark_off"
>
<img class="buttons-img" src="@/assets/star.png" />
</button>
</div>
<div class="coloumn-button">
<button class="tool-buttons" v-on:click="get_svg()">
<img class="buttons-img" src="@/assets/toolbar/download.png" />
</button>
</div>
</div>
<div class="graph-section">
<PathwayHeatmap :bookmark_off="bookmark_off"></PathwayHeatmap>
</div>
</div> -->
</template>

<script>
Expand All @@ -60,9 +33,7 @@ export default {
},
data() {
return {
// favourite_graphs: new Set(),
bookmark_off: true,
// tool_selecting: false
};
},
mounted() {
Expand All @@ -82,15 +53,3 @@ export default {
},
};
</script>

<!-- <style>
#heatmap-graphs {
width: 100%;
height: 100%;
z-index: 999;
display: flex;
flex-direction: column;
overflow: hidden;
font-family: "ABeeZee", sans-serif;
}
</style> -->
Loading

0 comments on commit d16e5b7

Please sign in to comment.