From 840e4169eddd572fb7c2169867117516cc5ff33b Mon Sep 17 00:00:00 2001 From: Vordgi Date: Mon, 9 Feb 2026 09:33:53 +0000 Subject: [PATCH 1/3] feat: support -to- customization in tooltip --- app/components/Tooltip/App.vue | 3 +++ app/components/Tooltip/Base.vue | 33 ++++++++++++++++++++------------- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/app/components/Tooltip/App.vue b/app/components/Tooltip/App.vue index cf92551a5..0c926baaa 100644 --- a/app/components/Tooltip/App.vue +++ b/app/components/Tooltip/App.vue @@ -6,6 +6,8 @@ const props = defineProps<{ position?: 'top' | 'bottom' | 'left' | 'right' /** Enable interactive tooltip (pointer events + hide delay for clickable content) */ interactive?: boolean + /** Teleport target for the tooltip content (defaults to 'body') */ + to?: string | HTMLElement }>() const isVisible = shallowRef(false) @@ -48,6 +50,7 @@ const tooltipAttrs = computed(() => { :position :interactive :tooltip-attr="tooltipAttrs" + :to="props.to" @mouseenter="show" @mouseleave="hide" @focusin="show" diff --git a/app/components/Tooltip/Base.vue b/app/components/Tooltip/Base.vue index 71157f4a2..e4d8e3e31 100644 --- a/app/components/Tooltip/Base.vue +++ b/app/components/Tooltip/Base.vue @@ -3,18 +3,25 @@ import type { HTMLAttributes } from 'vue' import type { Placement } from '@floating-ui/vue' import { autoUpdate, flip, offset, shift, useFloating } from '@floating-ui/vue' -const props = defineProps<{ - /** Tooltip text (optional when using content slot) */ - text?: string - /** Position: 'top' | 'bottom' | 'left' | 'right' */ - position?: 'top' | 'bottom' | 'left' | 'right' - /** is tooltip visible */ - isVisible: boolean - /** Allow pointer events on tooltip (for interactive content like links) */ - interactive?: boolean - /** attributes for tooltip element */ - tooltipAttr?: HTMLAttributes -}>() +const props = withDefaults( + defineProps<{ + /** Tooltip text (optional when using content slot) */ + text?: string + /** Position: 'top' | 'bottom' | 'left' | 'right' */ + position?: 'top' | 'bottom' | 'left' | 'right' + /** is tooltip visible */ + isVisible: boolean + /** Allow pointer events on tooltip (for interactive content like links) */ + interactive?: boolean + /** attributes for tooltip element */ + tooltipAttr?: HTMLAttributes + /** Teleport target for the tooltip content (defaults to 'body') */ + to?: string | HTMLElement + }>(), + { + to: 'body', + }, +) const triggerRef = useTemplateRef('triggerRef') const tooltipRef = useTemplateRef('tooltipRef') @@ -32,7 +39,7 @@ const { floatingStyles } = useFloating(triggerRef, tooltipRef, {
- + Date: Mon, 9 Feb 2026 09:52:48 +0000 Subject: [PATCH 2/3] fix: use tooltip in important info-notes instead of title --- app/components/Package/Dependencies.vue | 8 ++++---- app/components/Package/InstallScripts.vue | 8 ++++---- app/components/Package/SkillsModal.vue | 12 ++++++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/app/components/Package/Dependencies.vue b/app/components/Package/Dependencies.vue index 3d102e17f..7946ff485 100644 --- a/app/components/Package/Dependencies.vue +++ b/app/components/Package/Dependencies.vue @@ -95,15 +95,15 @@ const numberFormatter = useNumberFormatter() {{ dep }} -