From f8fb6e22825072a1d53e7e9367865139f494ba62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=93=92=F0=9D=93=B1=F0=9D=93=AE=F0=9D=93=BB?= =?UTF-8?q?=F0=9D=93=BB=F0=9D=94=82=F0=9F=8D=92?= <132185099+dongguacute@users.noreply.github.com> Date: Sat, 7 Mar 2026 17:20:22 +0800 Subject: [PATCH] fix(stage-layouts): replace Tooltip with Popover for microphone controls (#1169) * refactor(ChatArea): replace Tooltip with Popover for microphone controls The Tooltip component was replaced with Popover to provide better user experience and more consistent behavior with other UI elements. The functionality remains the same but uses the more appropriate Popover component from the UI library. * refactor(ChatArea): rename hearingTooltipOpen to hearingPopoverOpen for clarity The variable name was changed to better reflect its actual usage with PopoverRoot component. This improves code readability and maintainability by using more accurate terminology. --------- Co-authored-by: Rin --- .../src/components/Widgets/ChatArea.vue | 140 +++++++++--------- 1 file changed, 68 insertions(+), 72 deletions(-) diff --git a/packages/stage-layouts/src/components/Widgets/ChatArea.vue b/packages/stage-layouts/src/components/Widgets/ChatArea.vue index 7c2229e4e..ba91221fa 100644 --- a/packages/stage-layouts/src/components/Widgets/ChatArea.vue +++ b/packages/stage-layouts/src/components/Widgets/ChatArea.vue @@ -13,14 +13,14 @@ import { useSettings, useSettingsAudioDevice } from '@proj-airi/stage-ui/stores/ import { BasicTextarea, FieldSelect } from '@proj-airi/ui' import { until } from '@vueuse/core' import { storeToRefs } from 'pinia' -import { TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from 'reka-ui' +import { PopoverContent, PopoverRoot, PopoverTrigger } from 'reka-ui' import { computed, nextTick, onUnmounted, ref, watch } from 'vue' import { useI18n } from 'vue-i18n' import IndicatorMicVolume from './IndicatorMicVolume.vue' const messageInput = ref('') -const hearingTooltipOpen = ref(false) +const hearingPopoverOpen = ref(false) const isComposing = ref(false) const isListening = ref(false) // Transcription listening state (separate from microphone enabled) @@ -128,7 +128,7 @@ async function handleSend() { } } -watch(hearingTooltipOpen, async (value) => { +watch(hearingPopoverOpen, async (value) => { if (value) { await askPermission() } @@ -158,7 +158,7 @@ function teardownAnalyzer() { async function setupAnalyzer() { teardownAnalyzer() - if (!hearingTooltipOpen.value || !enabled.value || !stream.value) + if (!hearingPopoverOpen.value || !enabled.value || !stream.value) return if (audioContext.state === 'suspended') await audioContext.resume() @@ -169,7 +169,7 @@ async function setupAnalyzer() { analyzerSource.connect(analyser) } -watch([hearingTooltipOpen, enabled, stream], () => { +watch([hearingPopoverOpen, enabled, stream], () => { setupAnalyzer() }, { immediate: true }) @@ -427,74 +427,70 @@ watch(autoSendEnabled, (enabled) => { absolute bottom-2 left-2 z-10 flex items-center gap-2 > - - - - - - - -
-
-
-
-
- -
-

- {{ enabled ? 'Microphone enabled' : 'Microphone disabled' }} -

-
- - + + + + +
+
+
- - - - +
+
+ +
+

+ {{ enabled ? 'Microphone enabled' : 'Microphone disabled' }} +

+
+ + + +