Skip to content

Commit

Permalink
alerter: Replace v-tooltip with standard title
Browse files Browse the repository at this point in the history
The `v-tooltip` attribute-based component has a bug: it is never eliminated once instantiated, and as the alerts list is regenerated for every new alert, the tooltip component was accumulating in an exponential way, leading to a crash in the whole application.

For the moment a simple `title` attribute is used, but it's not an ideal solution, as it takes some hovering time to be activated. A better solution involves creating/importing a new tooltip component that doesn't have the same bug or to expand the alert space to fit the text during hovering.
  • Loading branch information
rafaellehmkuhl authored and ArturoManzoli committed Nov 21, 2024
1 parent a44a54e commit 00a732f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/mini-widgets/Alerter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
:class="{ 'opacity-0 invisible': !isShowingExpandedAlerts }"
>
<div v-for="(alert, i) in sortedAlertsReversed" :key="alert.time_created.toISOString()">
<div v-tooltip.right="alert.message" class="flex items-center justify-between whitespace-nowrap">
<div :title="alert.message" class="flex items-center justify-between whitespace-nowrap">
<p class="mx-1 overflow-hidden text-lg font-medium leading-none text-ellipsis">{{ alert.message }}</p>
<div
class="flex flex-col justify-center mx-1 font-mono text-xs font-semibold leading-3 text-right text-gray-100"
Expand Down

0 comments on commit 00a732f

Please sign in to comment.