Skip to content

Commit

Permalink
Merge branch 'master' into feature-display-uri-descriptions-2
Browse files Browse the repository at this point in the history
  • Loading branch information
oganm committed May 17, 2024
2 parents 365c1ca + 19fe25e commit 913ce4d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
13 changes: 11 additions & 2 deletions src/components/DatasetPreview.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="py-3">
<h3>{{ dataset.name }}</h3>
<h3> <a v-bind:href="datasetUrl">{{ dataset.shortName }}</a>: {{ dataset.name }}</h3>
<v-chip v-for="term in includedTerms" :key="getId(term)"
@[getClickEventName(term)]="handleChipClick(term)"
small :color="getChipColor(term.objectClass)"
Expand Down Expand Up @@ -56,7 +56,13 @@ export default {
if (this.dataset.searchResult !== undefined && this.dataset.searchResult.highlights !== null && "description" in this.dataset.searchResult.highlights) {
return marked.parseInline(highlight(this.dataset.description, this.dataset.searchResult.highlights.description));
}
return marked.parseInline(this.dataset.description);
let ds = this.dataset.description
let words = ds.split(" ")
if(words.length>150){
words = words.slice(0,150)
ds = words.join(" ") + ""
}
return marked.parseInline(ds);
},
chipColorMap() {
return {
Expand All @@ -65,6 +71,9 @@ export default {
BioMaterial: "blue lighten-3"
};
},
datasetUrl(){
return baseUrl + "/expressionExperiment/showExpressionExperiment.html?id=" + this.dataset.id
},
/**
* IDs of selected categories.
*/
Expand Down
3 changes: 3 additions & 0 deletions src/lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export function formatDecimal(d) {
}

export function pluralize(s) {
if (s.endsWith("y")) {
return s.slice(0, -1) + "ies";
}
return s.endsWith("x") || s.endsWith("s") ? s + "es" : s + "s";
}

Expand Down
12 changes: 7 additions & 5 deletions src/views/Browser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@
<span>{{ item }}</span>
</template>
<template v-slot:item.name="{item}">
<span v-html="getName(item)"/>
<br v-if="debug && hasHighlight(item)"/>
<small v-if="debug && hasHighlight(item)"
v-html="getHighlight(item)">
</small>
<td style="width: 100%">
<span v-html="getName(item)"/>
<br v-if="debug && hasHighlight(item)"/>
<small v-if="debug && hasHighlight(item)"
v-html="getHighlight(item)">
</small>
</td>
</template>
<template v-slot:item.geeq.publicQualityScore="{ item }">
<v-tooltip v-if="item.geeq" left>
Expand Down

0 comments on commit 913ce4d

Please sign in to comment.