Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Button } from "@superset/ui/button";
import { Tooltip, TooltipContent, TooltipTrigger } from "@superset/ui/tooltip";
import { useEffect, useMemo, useState } from "react";
import { HiOutlineCheck, HiOutlinePlus } from "react-icons/hi2";
import {
Expand Down Expand Up @@ -200,28 +201,31 @@ export function PresetsSettings() {
const alreadyAdded = isTemplateAdded(template);
const presetIcon = getPresetIcon(template.name, isDark);
return (
<Button
key={template.name}
variant="outline"
size="sm"
className="gap-1.5 text-xs h-7"
onClick={() => handleAddTemplate(template)}
title={
alreadyAdded ? "Already added" : template.preset.description
}
disabled={alreadyAdded || createPreset.isPending}
>
{alreadyAdded ? (
<HiOutlineCheck className="h-3 w-3" />
) : presetIcon ? (
<img
src={presetIcon}
alt=""
className="h-3 w-3 object-contain"
/>
) : null}
{template.name}
</Button>
<Tooltip key={template.name}>
<TooltipTrigger asChild>
<Button
variant="outline"
size="sm"
className="gap-1.5 text-xs h-7"
onClick={() => handleAddTemplate(template)}
disabled={alreadyAdded || createPreset.isPending}
>
{alreadyAdded ? (
<HiOutlineCheck className="h-3 w-3" />
) : presetIcon ? (
<img
src={presetIcon}
alt=""
className="h-3 w-3 object-contain"
/>
) : null}
{template.name}
</Button>
</TooltipTrigger>
<TooltipContent side="bottom" showArrow={false}>
{alreadyAdded ? "Already added" : template.preset.description}
</TooltipContent>
</Tooltip>
);
})}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Tooltip, TooltipContent, TooltipTrigger } from "@superset/ui/tooltip";
import { useEffect, useRef, useState } from "react";
import { HiMiniXMark } from "react-icons/hi2";
import { TbLayoutColumns, TbLayoutRows } from "react-icons/tb";
Expand Down Expand Up @@ -138,22 +139,34 @@ export function TabPane({
/>
</div>
<div className="flex items-center gap-0.5">
<button
type="button"
onClick={handleSplitPane}
title="Split pane"
className="rounded p-1 text-muted-foreground transition-colors hover:bg-muted-foreground/20 hover:text-foreground"
>
{splitIcon}
</button>
<button
type="button"
onClick={handleClosePane}
title="Close pane"
className="rounded p-1 text-muted-foreground transition-colors hover:bg-muted-foreground/20 hover:text-foreground"
>
<HiMiniXMark className="size-4" />
</button>
<Tooltip>
<TooltipTrigger asChild>
<button
type="button"
onClick={handleSplitPane}
className="rounded p-1 text-muted-foreground transition-colors hover:bg-muted-foreground/20 hover:text-foreground"
>
{splitIcon}
</button>
</TooltipTrigger>
<TooltipContent side="bottom" showArrow={false}>
Split pane
</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
<button
type="button"
onClick={handleClosePane}
className="rounded p-1 text-muted-foreground transition-colors hover:bg-muted-foreground/20 hover:text-foreground"
>
<HiMiniXMark className="size-4" />
</button>
</TooltipTrigger>
<TooltipContent side="bottom" showArrow={false}>
Close pane
</TooltipContent>
</Tooltip>
</div>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Popover, PopoverContent, PopoverTrigger } from "@superset/ui/popover";
import { Tooltip, TooltipContent, TooltipTrigger } from "@superset/ui/tooltip";
import { useCallback, useState } from "react";
import { HiChevronRight, HiFolder, HiFolderOpen } from "react-icons/hi2";
import { trpc } from "renderer/lib/trpc";
Expand Down Expand Up @@ -191,14 +192,18 @@ export function DirectoryNavigator({
<HiFolder className="size-4 shrink-0 text-muted-foreground" />
<span className="truncate">{item.name}</span>
</button>
<button
type="button"
onClick={() => handleNavigateToDir(item.path)}
className="px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground opacity-0 group-hover:opacity-100 transition-opacity"
title="Navigate here"
>
cd
</button>
<Tooltip>
<TooltipTrigger asChild>
<button
type="button"
onClick={() => handleNavigateToDir(item.path)}
className="px-2 py-1.5 text-xs text-muted-foreground hover:text-foreground opacity-0 group-hover:opacity-100 transition-opacity"
>
cd
</button>
</TooltipTrigger>
<TooltipContent side="right">Navigate here</TooltipContent>
</Tooltip>
</div>
))
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,30 +149,42 @@ export function TerminalSearch({
</TooltipTrigger>
<TooltipContent side="bottom">Match case</TooltipContent>
</Tooltip>
<button
type="button"
onClick={() => handleSearch("previous")}
className="rounded p-1 text-muted-foreground transition-colors hover:bg-muted-foreground/20 hover:text-foreground"
title="Previous (Shift+Enter)"
>
<HiChevronUp className="size-3.5" />
</button>
<button
type="button"
onClick={() => handleSearch("next")}
className="rounded p-1 text-muted-foreground transition-colors hover:bg-muted-foreground/20 hover:text-foreground"
title="Next (Enter)"
>
<HiChevronDown className="size-3.5" />
</button>
<button
type="button"
onClick={handleClose}
className="rounded p-1 text-muted-foreground transition-colors hover:bg-muted-foreground/20 hover:text-foreground"
title="Close (Esc)"
>
<HiMiniXMark className="size-3.5" />
</button>
<Tooltip>
<TooltipTrigger asChild>
<button
type="button"
onClick={() => handleSearch("previous")}
className="rounded p-1 text-muted-foreground transition-colors hover:bg-muted-foreground/20 hover:text-foreground"
>
<HiChevronUp className="size-3.5" />
</button>
</TooltipTrigger>
<TooltipContent side="bottom">Previous (Shift+Enter)</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
<button
type="button"
onClick={() => handleSearch("next")}
className="rounded p-1 text-muted-foreground transition-colors hover:bg-muted-foreground/20 hover:text-foreground"
>
<HiChevronDown className="size-3.5" />
</button>
</TooltipTrigger>
<TooltipContent side="bottom">Next (Enter)</TooltipContent>
</Tooltip>
<Tooltip>
<TooltipTrigger asChild>
<button
type="button"
onClick={handleClose}
className="rounded p-1 text-muted-foreground transition-colors hover:bg-muted-foreground/20 hover:text-foreground"
>
<HiMiniXMark className="size-3.5" />
</button>
</TooltipTrigger>
<TooltipContent side="bottom">Close (Esc)</TooltipContent>
</Tooltip>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ export function FileItem({
<span className="flex-1 min-w-0 flex items-center gap-1">
<Tooltip>
<TooltipTrigger asChild>
<span
className="text-xs text-start truncate overflow-hidden text-ellipsis"
title={file.path}
>
<span className="text-xs text-start truncate overflow-hidden text-ellipsis">
{fileName}
</span>
</TooltipTrigger>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Tooltip, TooltipContent, TooltipTrigger } from "@superset/ui/tooltip";
import type { MotionValue } from "framer-motion";
import { AnimatedBackground } from "./AnimatedBackground";
import { modeIcons, modeLabels } from "./constants";
Expand Down Expand Up @@ -30,19 +31,24 @@ export function ModeNavigation({
const label = modeLabels[mode];

return (
<button
key={mode}
type="button"
onClick={() => onModeSelect(mode)}
title={label}
className={`relative z-10 h-8 w-8 rounded-sm flex items-center justify-center transition-colors duration-150 ${
isActive
? "text-sidebar-foreground"
: "text-sidebar-foreground/60 hover:text-sidebar-foreground/80"
}`}
>
<Icon className="w-3.5 h-3.5" />
</button>
<Tooltip key={mode}>
<TooltipTrigger asChild>
<button
type="button"
onClick={() => onModeSelect(mode)}
className={`relative z-10 h-8 w-8 rounded-sm flex items-center justify-center transition-colors duration-150 ${
isActive
? "text-sidebar-foreground"
: "text-sidebar-foreground/60 hover:text-sidebar-foreground/80"
}`}
>
<Icon className="w-3.5 h-3.5" />
</button>
</TooltipTrigger>
<TooltipContent side="bottom" showArrow={false}>
{label}
</TooltipContent>
</Tooltip>
);
})}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button } from "@superset/ui/button";
import { Input } from "@superset/ui/input";
import { Tooltip, TooltipContent, TooltipTrigger } from "@superset/ui/tooltip";
import { useRef, useState } from "react";
import { useDrag, useDrop } from "react-dnd";
import { HiMiniCommandLine, HiMiniXMark } from "react-icons/hi2";
Expand Down Expand Up @@ -151,13 +152,17 @@ export function TabItem({ tab, index, isActive }: TabItemProps) {
<>
<span className="truncate flex-1">{displayName}</span>
{needsAttention && (
<span
className="relative flex size-2 shrink-0 ml-1"
title="Agent completed"
>
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-red-400 opacity-75" />
<span className="relative inline-flex size-2 rounded-full bg-red-500" />
</span>
<Tooltip>
<TooltipTrigger asChild>
<span className="relative flex size-2 shrink-0 ml-1">
<span className="absolute inline-flex h-full w-full animate-ping rounded-full bg-red-400 opacity-75" />
<span className="relative inline-flex size-2 rounded-full bg-red-500" />
</span>
</TooltipTrigger>
<TooltipContent side="right">
Agent completed
</TooltipContent>
</Tooltip>
)}
</>
)}
Expand Down