Skip to content

Commit e2711df

Browse files
authored
Merge pull request #351 from VariantEffect/estelle/displayPartialPublicationTitle
Solve #213 Display partial publication details in input fields.
2 parents 896ea7d + 3871805 commit e2711df

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/components/screens/ExperimentCreator.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
>
230230
<template #chip="slotProps">
231231
<div>
232-
<div>{{ slotProps.value.identifier }}</div>
232+
<div>{{ slotProps.value.identifier }}: {{ truncatePublicationTitle(slotProps.value.title) }}</div>
233233
</div>
234234
</template>
235235
<template #item="slotProps">
@@ -899,6 +899,10 @@ export default {
899899
}
900900
},
901901
902+
truncatePublicationTitle: function(title) {
903+
return title.length > 50 ? title.slice(0, 50) + "..." : title
904+
},
905+
902906
acceptNewRawReadIdentifier: function() {
903907
// Remove new string item from the model and add new structured item in its place if it validates and is not a duplicate.
904908
const idx = this.rawReadIdentifiers.findIndex((item) => typeof item === 'string' || item instanceof String)

src/components/screens/ScoreSetCreator.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@
450450
>
451451
<template #chip="slotProps">
452452
<div>
453-
<div>{{ slotProps.value.identifier }}</div>
453+
<div>{{ slotProps.value.identifier }}: {{ truncatePublicationTitle(slotProps.value.title) }}</div>
454454
</div>
455455
</template>
456456
<template #item="slotProps">
@@ -1963,6 +1963,10 @@ export default {
19631963
}
19641964
},
19651965
1966+
truncatePublicationTitle: function(title) {
1967+
return title.length > 50 ? title.slice(0, 50) + "..." : title
1968+
},
1969+
19661970
addDefaultOffset: function (dbName, targetIdx) {
19671971
const currentTargetGene = this.createdTargetGenes[targetIdx].targetGene
19681972
if (!currentTargetGene.externalIdentifiers[dbName]?.offset){

0 commit comments

Comments
 (0)