Skip to content

Commit

Permalink
fix: truncate and add ellipses for long witnesses (#520)
Browse files Browse the repository at this point in the history
* fix: truncate and add ellipses for long witnesses

* fix: view the full witness name on hover

---------

Co-authored-by: orlinmalkja <[email protected]>
  • Loading branch information
orlinmalkja and orlinmalkja authored Nov 11, 2024
1 parent b18f44c commit 55a840c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/annotations/variants/VariantItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
:data-annotation-id="annotation.id"
@click="handleClick"
>
<div class="t-w-4/12 t-flex">
<div class="t-w-1/3 t-flex">
<div
class="t-relative t-rounded-3xl t-box-border t-px-2 t-py-1 t-text-xs t-flex-grow-0 t-flex t-items-center t-font-semibold t-whitespace-nowrap"
class="t-relative t-truncate t-w-7/8 t-rounded-3xl t-box-border t-px-2 t-py-1 t-text-xs t-flex-grow-0 t-font-semibold"
:style="{
'background': colors[witnessColor]['100'],
'color': colors[witnessColor]['600']
}"
:title = witness

Check warning on line 18 in src/components/annotations/variants/VariantItem.vue

View workflow job for this annotation

GitHub Actions / build (18)

Unexpected spaces found around equal signs

Check warning on line 18 in src/components/annotations/variants/VariantItem.vue

View workflow job for this annotation

GitHub Actions / build (18)

Expected to be enclosed by double quotes

Check warning on line 18 in src/components/annotations/variants/VariantItem.vue

View workflow job for this annotation

GitHub Actions / build (20)

Unexpected spaces found around equal signs

Check warning on line 18 in src/components/annotations/variants/VariantItem.vue

View workflow job for this annotation

GitHub Actions / build (20)

Expected to be enclosed by double quotes
>
{{ witness ?? '-' }}
</div>
Expand All @@ -33,7 +34,7 @@ import { computed } from 'vue';
import colors from "tailwindcss/colors";
const entry = computed(() => props.annotation.body.value.entry)
const witness = computed(() => props.annotation.body.value.witness)
const witness= computed(() => props.annotation.body.value.witness)
export interface Props {
annotation: Annotation,
Expand Down

0 comments on commit 55a840c

Please sign in to comment.