Skip to content

Commit c55af7b

Browse files
samejrmpcgrid
andauthored
fix(webapp): ask ai button missing tooltip (#2964)
Fixes - the tooltip not displaying on the AskAI button in the side menu - incorrect AskAI button heights - Small UI tweaks <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/triggerdotdev/trigger.dev/pull/2964"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end --> --------- Co-authored-by: Mihai Popescu <mihai.popescu.dev@gmail.com>
1 parent db4fb9e commit c55af7b

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

apps/webapp/app/components/AskAI.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,30 +118,31 @@ function AskAIProvider({ websiteId, isCollapsed = false }: AskAIProviderProps) {
118118
<motion.div layout="position" transition={{ duration: 0.2, ease: "easeInOut" }}>
119119
<TooltipProvider disableHoverableContent>
120120
<Tooltip>
121-
<div className={isCollapsed ? "w-full" : "inline-flex"}>
122-
<TooltipTrigger asChild>
121+
<TooltipTrigger asChild>
122+
<span className={cn("inline-flex h-8", isCollapsed && "w-full")}>
123123
<Button
124124
variant="small-menu-item"
125125
data-action="ask-ai"
126-
shortcut={{ modifiers: ["mod"], key: "/", enabledOnInputElements: true }}
126+
shortcut={{ modifiers: ["mod"], key: "i", enabledOnInputElements: true }}
127127
hideShortcutKey
128128
data-modal-override-open-class-ask-ai="true"
129129
onClick={() => openAskAI()}
130-
className={isCollapsed ? "w-full justify-center" : ""}
130+
fullWidth={isCollapsed}
131+
className={cn("h-full", isCollapsed && "justify-center")}
131132
>
132133
<AISparkleIcon className="size-5" />
133134
</Button>
134-
</TooltipTrigger>
135-
</div>
135+
</span>
136+
</TooltipTrigger>
136137
<TooltipContent
137-
side={isCollapsed ? "right" : "top"}
138-
sideOffset={isCollapsed ? 8 : 4}
139-
className="flex items-center gap-1 py-1.5 pl-2.5 pr-2 text-xs"
138+
side="right"
139+
sideOffset={8}
140+
className="flex items-center gap-2 text-xs"
140141
>
141142
Ask AI
142143
<span className="flex items-center">
143144
<ShortcutKey shortcut={{ modifiers: ["mod"] }} variant="medium/bright" />
144-
<ShortcutKey shortcut={{ key: "/" }} variant="medium/bright" />
145+
<ShortcutKey shortcut={{ key: "i" }} variant="medium/bright" />
145146
</span>
146147
</TooltipContent>
147148
</Tooltip>

apps/webapp/app/components/Shortcuts.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ function ShortcutContent() {
7676
<ShortcutKey shortcut={{ key: "enter" }} variant="medium/bright" />
7777
</Shortcut>
7878
<Shortcut name="Ask AI">
79-
<ShortcutKey shortcut={{ modifiers: ["mod"], key: "/" }} variant="medium/bright" />
79+
<ShortcutKey shortcut={{ modifiers: ["mod"] }} variant="medium/bright" />
80+
<ShortcutKey shortcut={{ key: "i" }} variant="medium/bright" />
8081
</Shortcut>
8182
<Shortcut name="Filter">
8283
<ShortcutKey shortcut={{ key: "f" }} variant="medium/bright" />

apps/webapp/app/components/navigation/SideMenu.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,10 @@ function CollapseToggle({
993993
return (
994994
<div className="absolute -right-3 top-1/2 z-10 -translate-y-1/2">
995995
{/* Vertical line to mask the side menu border */}
996-
<div className="pointer-events-none absolute left-1/2 top-1/2 h-10 w-px -translate-y-1/2 bg-background-bright" />
996+
<div className={cn(
997+
"pointer-events-none absolute left-1/2 top-1/2 h-10 w-px -translate-y-1/2 transition-colors duration-200",
998+
isHovering ? "bg-charcoal-750" : "bg-background-bright"
999+
)} />
9971000
<TooltipProvider disableHoverableContent>
9981001
<Tooltip>
9991002
<TooltipTrigger asChild>

0 commit comments

Comments
 (0)