⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
fix(web): space tooltip labels from key hints
Andrej85d2a8494b13
diff --git a/apps/web/src/components/project/display/display-menu.tsx b/apps/web/src/components/project/display/display-menu.tsxindex de1d42854..dbd9c37f2 100644--- a/apps/web/src/components/project/display/display-menu.tsx+++ b/apps/web/src/components/project/display/display-menu.tsx@@ -1,7 +1,6 @@import { SlidersHorizontal } from "lucide-react";import { type ReactNode, useState } from "react";import { useTranslation } from "react-i18next";-import { ShortcutKeys } from "@/components/shortcuts/shortcut-keys";import { Button } from "@/components/ui/button";import {Popover,@@ -9,6 +8,7 @@ import {PopoverTitle,PopoverTrigger,} from "@/components/ui/popover";+import { ShortcutTooltipLabel } from "@/components/shortcuts/shortcut-tooltip-label";import {Tooltip,TooltipContent,@@ -41,9 +41,8 @@ export function DisplayMenu({ children }: { children: ReactNode }) {><SlidersHorizontal /></TooltipTrigger>- <TooltipContent className="flex items-center gap-2">- {title}- <ShortcutKeys id="showDisplayOptions" tone="tooltip" />+ <TooltipContent>+ <ShortcutTooltipLabel label={title} shortcutId="showDisplayOptions" /></TooltipContent></Tooltip><PopoverContent align="end" className="w-80">diff --git a/apps/web/src/components/project/task-filters/filter-menu.tsx b/apps/web/src/components/project/task-filters/filter-menu.tsxindex 1c7df4ddf..80b8f5ead 100644--- a/apps/web/src/components/project/task-filters/filter-menu.tsx+++ b/apps/web/src/components/project/task-filters/filter-menu.tsx@@ -1,13 +1,13 @@import { ListFilter } from "lucide-react";import { useState } from "react";import { useTranslation } from "react-i18next";-import { ShortcutKeys } from "@/components/shortcuts/shortcut-keys";import { Button } from "@/components/ui/button";import {Popover,PopoverContent,PopoverTrigger,} from "@/components/ui/popover";+import { ShortcutTooltipLabel } from "@/components/shortcuts/shortcut-tooltip-label";import {Tooltip,TooltipContent,@@ -56,9 +56,8 @@ export function FilterMenu({ subjects, activeCount }: FilterMenuProps) {</span>)}</TooltipTrigger>- <TooltipContent className="flex items-center gap-2">- {label}- <ShortcutKeys id="addFilter" tone="tooltip" />+ <TooltipContent>+ <ShortcutTooltipLabel label={label} shortcutId="addFilter" /></TooltipContent></Tooltip><PopoverContent align="end" className="w-60">diff --git a/apps/web/src/components/shortcuts/shortcut-tooltip-label.tsx b/apps/web/src/components/shortcuts/shortcut-tooltip-label.tsxnew file mode 100644index 000000000..316d51383--- /dev/null+++ b/apps/web/src/components/shortcuts/shortcut-tooltip-label.tsx@@ -0,0 +1,20 @@+import type { ReactNode } from "react";+import type { ShortcutId } from "@/lib/shortcuts/catalog";+import { ShortcutKeys } from "./shortcut-keys";++type ShortcutTooltipLabelProps = {+ label: ReactNode;+ shortcutId?: ShortcutId;+};++export function ShortcutTooltipLabel({+ label,+ shortcutId,+}: ShortcutTooltipLabelProps) {+ return (+ <span className="flex items-center gap-2">+ {label}+ {shortcutId && <ShortcutKeys id={shortcutId} tone="tooltip" />}+ </span>+ );+}diff --git a/apps/web/src/components/task/header/header-icon-button.tsx b/apps/web/src/components/task/header/header-icon-button.tsxindex b3df7b9c3..a16c49106 100644--- a/apps/web/src/components/task/header/header-icon-button.tsx+++ b/apps/web/src/components/task/header/header-icon-button.tsx@@ -1,6 +1,6 @@import type { ReactNode } from "react";-import { ShortcutKeys } from "@/components/shortcuts/shortcut-keys";import { Button } from "@/components/ui/button";+import { ShortcutTooltipLabel } from "@/components/shortcuts/shortcut-tooltip-label";import {Tooltip,TooltipContent,@@ -42,9 +42,8 @@ export function HeaderIconButton({>{children}</TooltipTrigger>- <TooltipContent className="flex items-center gap-2">- {label}- {shortcutId && <ShortcutKeys id={shortcutId} tone="tooltip" />}+ <TooltipContent>+ <ShortcutTooltipLabel label={label} shortcutId={shortcutId} /></TooltipContent></Tooltip>);diff --git a/apps/web/src/components/task/header/task-sheet-header.tsx b/apps/web/src/components/task/header/task-sheet-header.tsxindex 11967297c..9a87b384c 100644--- a/apps/web/src/components/task/header/task-sheet-header.tsx+++ b/apps/web/src/components/task/header/task-sheet-header.tsx@@ -2,8 +2,8 @@ import type { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dimport { ChevronDown, ChevronRight, Maximize2, X } from "lucide-react";import type { Ref } from "react";import { useTranslation } from "react-i18next";-import { ShortcutKeys } from "@/components/shortcuts/shortcut-keys";import { Button } from "@/components/ui/button";+import { ShortcutTooltipLabel } from "@/components/shortcuts/shortcut-tooltip-label";import {Tooltip,TooltipContent,@@ -76,9 +76,11 @@ export function TaskSheetHeader({>{project.slug}-{task.number}</TooltipTrigger>- <TooltipContent className="flex items-center gap-2">- {t("navigation:shortcuts.items.copyTaskId")}- <ShortcutKeys id="copyTaskId" tone="tooltip" />+ <TooltipContent>+ <ShortcutTooltipLabel+ label={t("navigation:shortcuts.items.copyTaskId")}+ shortcutId="copyTaskId"+ /></TooltipContent></Tooltip></>