Skip to content
Merged
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
15 changes: 7 additions & 8 deletions src/renderer/src/components/settings/ShortcutCommandBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { cn } from '../../lib/utils'
import { Badge } from '../ui/badge'
import { Button } from '../ui/button'
import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip'
import { TruncatedSidebarLabel } from '../sidebar/truncated-sidebar-label'
import { SearchableSetting } from './SearchableSetting'
import { ShortcutBindingSubRow } from './ShortcutBindingSubRow'
import { ShortcutRecorderButton } from './ShortcutRecorderButton'
Expand Down Expand Up @@ -122,14 +123,12 @@ export function ShortcutCommandBlock({
>
<div className="flex min-h-9 items-center gap-3 rounded-md px-2 py-1 transition-colors hover:bg-accent/40 focus-within:bg-accent/40">
<div className="flex min-w-0 flex-1 items-center gap-2">
<span
className={cn(
'truncate text-sm',
isDisabled ? 'text-muted-foreground' : 'text-foreground'
)}
>
{item.title}
</span>
<TruncatedSidebarLabel
text={item.title}
className={cn('text-sm', isDisabled ? 'text-muted-foreground' : 'text-foreground')}
tooltipSide="top"
tooltipSideOffset={4}
/>
Comment on lines +126 to +131

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | Minor | ⚡ Quick win

Render the tooltip for untruncated titles.

TruncatedSidebarLabel returns a plain <span> when the title is not truncated. This call keeps that default behavior, so ordinary shortcut titles do not show a tooltip on hover. Use a variant or prop that renders the tooltip for every title while preserving the existing truncation styling.

{modified ? (
<Badge variant="outline" className="shrink-0 text-[11px]">
{translate('auto.components.settings.ShortcutCommandBlock.287e07ddde', 'Modified')}
Expand Down
Loading