Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport v2.10.0] Replace v-tooltip with v-clean-tooltip #12569

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/aks/components/AksNodePool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export default defineComponent({
<div class="text-label">
{{ t('aks.nodePools.taints.label') }}
<i
v-tooltip="t('aks.nodePools.taints.tooltip')"
v-clean-tooltip="t('aks.nodePools.taints.tooltip')"
class="icon icon-info"
/>
</div>
Expand Down Expand Up @@ -455,7 +455,7 @@ export default defineComponent({
<div class="text-label">
{{ t('labels.labels.title') }}
<i
v-tooltip="t('aks.nodePools.labels.tooltip')"
v-clean-tooltip="t('aks.nodePools.labels.tooltip')"
class="icon icon-info"
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion shell/components/SideNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ export default {
<template v-else>
<span
v-if="isVirtualCluster && isExplorer"
v-tooltip="{content: harvesterVersion, placement: 'top'}"
v-clean-tooltip="{content: harvesterVersion, placement: 'top'}"
class="clip text-muted ml-5"
>
(Harvester-{{ harvesterVersion }})
Expand Down
2 changes: 1 addition & 1 deletion shell/components/TableDataUserIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const iconClass = computed(() => {
<template>
<div class="icon-center">
<i
v-tooltip="ucFirst(userState)"
v-clean-tooltip="ucFirst(userState)"
:class="iconClass"
/>
</div>
Expand Down
22 changes: 11 additions & 11 deletions shell/components/nav/TopLevelMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ export default {
:to="{ name: 'home' }"
>
<svg
v-tooltip="getTooltipConfig(t('nav.home'))"
v-clean-tooltip="getTooltipConfig(t('nav.home'))"
xmlns="http://www.w3.org/2000/svg"
height="24"
viewBox="0 0 24 24"
Expand Down Expand Up @@ -660,13 +660,13 @@ export default {
@shortkey="handleKeyComboClick"
>
<ClusterIconMenu
v-tooltip="getTooltipConfig(c, true)"
v-clean-tooltip="getTooltipConfig(c, true)"
:cluster="c"
:route-combo="routeCombo"
class="rancher-provider-icon"
/>
<div
v-tooltip="getTooltipConfig(c)"
v-clean-tooltip="getTooltipConfig(c)"
class="cluster-name"
>
<p>{{ c.label }}</p>
Expand All @@ -687,12 +687,12 @@ export default {
:data-testid="`pinned-menu-cluster-disabled-${ c.id }`"
>
<ClusterIconMenu
v-tooltip="getTooltipConfig(c, true)"
v-clean-tooltip="getTooltipConfig(c, true)"
:cluster="c"
class="rancher-provider-icon"
/>
<div
v-tooltip="getTooltipConfig(c)"
v-clean-tooltip="getTooltipConfig(c)"
class="cluster-name"
>
<p>{{ c.label }}</p>
Expand Down Expand Up @@ -735,13 +735,13 @@ export default {
@shortkey="handleKeyComboClick"
>
<ClusterIconMenu
v-tooltip="getTooltipConfig(c, true)"
v-clean-tooltip="getTooltipConfig(c, true)"
:cluster="c"
:route-combo="routeCombo"
class="rancher-provider-icon"
/>
<div
v-tooltip="getTooltipConfig(c)"
v-clean-tooltip="getTooltipConfig(c)"
class="cluster-name"
>
<!-- HERE LOCAL CLUSTER! -->
Expand All @@ -764,12 +764,12 @@ export default {
:data-testid="`menu-cluster-disabled-${ c.id }`"
>
<ClusterIconMenu
v-tooltip="getTooltipConfig(c, true)"
v-clean-tooltip="getTooltipConfig(c, true)"
:cluster="c"
class="rancher-provider-icon"
/>
<div
v-tooltip="getTooltipConfig(c)"
v-clean-tooltip="getTooltipConfig(c)"
class="cluster-name"
>
<p>{{ c.label }}</p>
Expand Down Expand Up @@ -836,7 +836,7 @@ export default {
:to="a.to"
>
<IconOrSvg
v-tooltip="getTooltipConfig(a.label)"
v-clean-tooltip="getTooltipConfig(a.label)"
:icon="a.icon"
:src="a.svg"
/>
Expand Down Expand Up @@ -866,7 +866,7 @@ export default {
:to="a.to"
>
<IconOrSvg
v-tooltip="getTooltipConfig(a.label)"
v-clean-tooltip="getTooltipConfig(a.label)"
:icon="a.icon"
:src="a.svg"
/>
Expand Down
8 changes: 4 additions & 4 deletions shell/directives/clean-tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ function purifyContent(value) {
}
}

function bind(el, { value, oldValue, modifiers }) {
function beforeMount(el, { value, oldValue, modifiers }) {
const purifiedValue = purifyContent(value);

VTooltip.bind(
VTooltip.beforeMount(
el,
{
value: purifiedValue, oldValue, modifiers
Expand All @@ -25,8 +25,8 @@ function bind(el, { value, oldValue, modifiers }) {

const cleanTooltipDirective = {
...VTooltip,
bind,
update: bind,
beforeMount,
updated: beforeMount,
};

export default cleanTooltipDirective;
Loading