From 926c614937c011352dce47b73c2c0cb3972fcb47 Mon Sep 17 00:00:00 2001 From: orlinmalkja Date: Mon, 28 Oct 2024 16:13:57 +0100 Subject: [PATCH 1/5] fix: use visibleAnnotations instead of filteredAnnotations to show the line separator or not --- src/components/annotations/variants/VariantsList.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/annotations/variants/VariantsList.vue b/src/components/annotations/variants/VariantsList.vue index 9e627b4f..ac358459 100644 --- a/src/components/annotations/variants/VariantsList.vue +++ b/src/components/annotations/variants/VariantsList.vue @@ -10,7 +10,7 @@ :is-active="isActive(annotation)" :toggle="toggle" :witness-color="getWitnessColor(annotation.body.value.witness)" - :show-separator="showLineSeparator(filteredAnnotations, i)" + :show-separator="showLineSeparator(visibleAnnotations, i)" @select="addAnnotation(annotation.id)" @unselect="removeAnnotation(annotation.id)" @show-details="openDetailsDialog" @@ -65,9 +65,9 @@ function getWitnessColor(witness: string) { } -function showLineSeparator(filteredAnnotations, i) { - if (filteredAnnotations[i+1]) { - return Utils.generateTargetSelector(filteredAnnotations[i]) !== Utils.generateTargetSelector(filteredAnnotations[i+1]) +function showLineSeparator(visibleAnnotations, i) { + if (visibleAnnotations[i+1]) { + return Utils.generateTargetSelector(visibleAnnotations[i]) !== Utils.generateTargetSelector(visibleAnnotations[i+1]) } } From 2826c8fdf3c2dcc72eb676c5e7079af54a6e598d Mon Sep 17 00:00:00 2001 From: orlinmalkja Date: Mon, 28 Oct 2024 16:39:41 +0100 Subject: [PATCH 2/5] fix: show the separation line as an hr element after the variant item not as the bottom border of the variant item --- src/components/annotations/variants/VariantItem.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/annotations/variants/VariantItem.vue b/src/components/annotations/variants/VariantItem.vue index c78038d4..1ad70d07 100644 --- a/src/components/annotations/variants/VariantItem.vue +++ b/src/components/annotations/variants/VariantItem.vue @@ -4,8 +4,7 @@ :class="[ 't-py-2 t-px-2 -t-mx-2 t-mb-1 t-space-x-2 t-rounded-md', { 'hover:t-bg-gray-200 dark:hover:t-bg-gray-600 t-cursor-pointer': !isActive }, - { 't-bg-gray-300 dark:t-bg-gray-600 active': isActive}, - { 't-border-b t-border-slate-200 t-rounded-none': showSeparator}]" + { 't-bg-gray-300 dark:t-bg-gray-600 active': isActive}]" :data-annotation-id="annotation.id" @click="handleClick" > @@ -25,7 +24,8 @@ class="t-w-7/12" v-html="entry" /> - + +