From 5ec8e5babe3a9791cc20b9577fdfd6524005f3ff Mon Sep 17 00:00:00 2001 From: Akhilesh Patidar Date: Fri, 31 Oct 2025 01:29:21 +0530 Subject: [PATCH 1/2] updated keyboard shortcuts display to use tooltips --- .../logs/live-switch-button/index.tsx | 54 +++++++++++-------- .../src/components/buttons/refresh-button.tsx | 23 +++++--- 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/apps/dashboard/components/logs/live-switch-button/index.tsx b/apps/dashboard/components/logs/live-switch-button/index.tsx index c834c9a2df..e39d27b4f5 100644 --- a/apps/dashboard/components/logs/live-switch-button/index.tsx +++ b/apps/dashboard/components/logs/live-switch-button/index.tsx @@ -1,6 +1,6 @@ import { useKeyboardShortcut } from "@/hooks/use-keyboard-shortcut"; import { CircleCaretRight } from "@unkey/icons"; -import { Button, KeyboardButton } from "@unkey/ui"; +import { Button, InfoTooltip, KeyboardButton } from "@unkey/ui"; import { cn } from "@unkey/ui/src/lib/utils"; type LiveSwitchProps = { @@ -11,28 +11,36 @@ type LiveSwitchProps = { export const LiveSwitchButton = ({ isLive, onToggle }: LiveSwitchProps) => { useKeyboardShortcut("option+shift+q", onToggle); return ( - + } + position={{ side: "bottom", align: "center" }} + delayDuration={300} + asChild + > + + ); }; diff --git a/internal/ui/src/components/buttons/refresh-button.tsx b/internal/ui/src/components/buttons/refresh-button.tsx index 57a1b00cc6..cf40865c08 100644 --- a/internal/ui/src/components/buttons/refresh-button.tsx +++ b/internal/ui/src/components/buttons/refresh-button.tsx @@ -49,12 +49,23 @@ const RefreshButton = ({ onRefresh, isEnabled, isLive, toggleLive }: RefreshButt disabled: !isEnabled, }); + // Determine tooltip content based on state + const tooltipContent = !isEnabled + ? "Refresh unavailable - please select a relative time filter in the 'Since' dropdown" + : ( +
+ Refresh data + +
+ ); + return (
@@ -62,16 +73,12 @@ const RefreshButton = ({ onRefresh, isEnabled, isLive, toggleLive }: RefreshButt onClick={handleRefresh} variant="ghost" size="md" - title={isEnabled ? "Refresh data (Shortcut: ⌥+⇧+W)" : ""} disabled={!isEnabled || isLoading} loading={isLoading} - className="flex w-full items-center justify-center rounded-lg border border-gray-4 group overflow-hidden" + className="flex w-full items-center justify-center rounded-lg border border-gray-4 overflow-hidden" > Refresh -
- -
From 1d402c43b3667c1ef42e2d8acd499d292dad3c26 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Sun, 2 Nov 2025 23:03:54 +0000 Subject: [PATCH 2/2] [autofix.ci] apply automated fixes --- .../src/components/buttons/refresh-button.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/ui/src/components/buttons/refresh-button.tsx b/internal/ui/src/components/buttons/refresh-button.tsx index cf40865c08..fc1a5c4245 100644 --- a/internal/ui/src/components/buttons/refresh-button.tsx +++ b/internal/ui/src/components/buttons/refresh-button.tsx @@ -50,19 +50,19 @@ const RefreshButton = ({ onRefresh, isEnabled, isLive, toggleLive }: RefreshButt }); // Determine tooltip content based on state - const tooltipContent = !isEnabled - ? "Refresh unavailable - please select a relative time filter in the 'Since' dropdown" - : ( -
- Refresh data - -
- ); + const tooltipContent = isEnabled ? ( +
+ Refresh data + +
+ ) : ( + "Refresh unavailable - please select a relative time filter in the 'Since' dropdown" + ); return (