From 26f9ec2d0961ff267cd3eea37906ac6201065423 Mon Sep 17 00:00:00 2001 From: orlinmalkja Date: Tue, 5 Nov 2024 13:14:39 +0100 Subject: [PATCH 1/3] fix: make the witnesses wrapper with flex-wrap css prop --- src/utils/annotations.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/annotations.js b/src/utils/annotations.js index 367e750c..c4cc4cad 100644 --- a/src/utils/annotations.js +++ b/src/utils/annotations.js @@ -272,7 +272,7 @@ export function addWitness(target, witness, color) { function createWitnessesWrapper() { const el = document.createElement("span"); - el.classList.add('witnesses') + el.classList.add('witnesses', 't-flex', 't-flex-wrap') return el } @@ -281,7 +281,7 @@ function createWitnessEl(witness, witnessColor) { // create an html element of one witness const el = document.createElement("span"); el.innerHTML = witness - el.classList.add('t-rounded-3xl', 't-box-border', 't-h-8', 't-py-0.5', 't-px-1.5', 't-text-xs', 't-font-semibold', 't-font-sans', 't-ml-[3px]') + el.classList.add('t-rounded-3xl', 't-box-border', 't-py-0.5', 't-px-1.5', 't-text-xs', 't-font-semibold', 't-font-sans', 't-ml-[3px]') el.style.background = colors[witnessColor]['100'] el.style.color = colors[witnessColor]['600'] From 272bfa73be678e804188cdc1867b17ec2268f1a3 Mon Sep 17 00:00:00 2001 From: orlinmalkja Date: Tue, 5 Nov 2024 14:56:45 +0100 Subject: [PATCH 2/3] fix: use inline-flex for witnesses wrapper to be in text flow --- src/utils/annotations.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/annotations.js b/src/utils/annotations.js index c4cc4cad..26da491c 100644 --- a/src/utils/annotations.js +++ b/src/utils/annotations.js @@ -272,7 +272,7 @@ export function addWitness(target, witness, color) { function createWitnessesWrapper() { const el = document.createElement("span"); - el.classList.add('witnesses', 't-flex', 't-flex-wrap') + el.classList.add('witnesses', 't-inline-flex', 't-flex-wrap') return el } From 936c1e8fe3805cbbda4b332937d0749e2147d18f Mon Sep 17 00:00:00 2001 From: orlinmalkja Date: Tue, 5 Nov 2024 16:01:04 +0100 Subject: [PATCH 3/3] fix: change the logic of showing the message box in annotations list --- .../annotations/variants/VariantsList.vue | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/components/annotations/variants/VariantsList.vue b/src/components/annotations/variants/VariantsList.vue index 3878280d..d910b26a 100644 --- a/src/components/annotations/variants/VariantsList.vue +++ b/src/components/annotations/variants/VariantsList.vue @@ -67,23 +67,21 @@ function getWitnessColor(witness: string) { } function getVariantsListInfoMessage(): string { - if (annotationStore.filteredAnnotations.length === 0) { - return i18n[lang.value]['no_annotations_in_view'] - } - if (annotationStore.isSingleSelectMode) { + if (annotationStore.isSingleSelectMode + && annotationStore.filteredAnnotations.length > 0) { return i18n[lang.value]['single_select_mode_info_message'] } + return i18n[lang.value]['no_annotations_in_view'] } function getVariantsListInfoTitle(): string { - if (annotationStore.filteredAnnotations.length === 0) { - return i18n[lang.value]['no_annotations_available'] - } - if (annotationStore.isSingleSelectMode) { + if (annotationStore.isSingleSelectMode + && annotationStore.filteredAnnotations.length > 0) { return i18n[lang.value]['single_select_mode'] } + return i18n[lang.value]['no_annotations_available'] } - + function showLineSeparator(visibleAnnotations, i) { if (visibleAnnotations[i+1]) {