Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit 389d97e

Browse files
committed
fix: adjust project path tooltip placement
Move the desktop project path tooltip above the header and tune spacing/offset; add content style hooks to Tooltip for max-width and horizontal shift.
1 parent e36b343 commit 389d97e

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

packages/app/src/pages/layout.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,16 @@ export default function Layout(props: ParentProps) {
16271627
stopPropagation
16281628
/>
16291629

1630-
<Tooltip placement="right" value={project()?.worktree} class="shrink-0">
1630+
<Tooltip
1631+
placement={sidebarProps.mobile ? "bottom" : "top"}
1632+
gutter={2}
1633+
value={project()?.worktree}
1634+
class="shrink-0"
1635+
contentStyle={{
1636+
"max-width": "640px",
1637+
transform: "translate3d(52px, 0, 0)",
1638+
}}
1639+
>
16311640
<span class="text-12-regular text-text-base truncate">
16321641
{project()?.worktree.replace(homedir(), "~")}
16331642
</span>

packages/ui/src/components/tooltip.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import type { ComponentProps } from "solid-js"
55
export interface TooltipProps extends ComponentProps<typeof KobalteTooltip> {
66
value: JSX.Element
77
class?: string
8+
contentClass?: string
9+
contentStyle?: JSX.CSSProperties
810
inactive?: boolean
911
}
1012

@@ -30,7 +32,7 @@ export function TooltipKeybind(props: TooltipKeybindProps) {
3032

3133
export function Tooltip(props: TooltipProps) {
3234
const [open, setOpen] = createSignal(false)
33-
const [local, others] = splitProps(props, ["children", "class", "inactive"])
35+
const [local, others] = splitProps(props, ["children", "class", "contentClass", "contentStyle", "inactive"])
3436

3537
const c = children(() => local.children)
3638

@@ -58,7 +60,12 @@ export function Tooltip(props: TooltipProps) {
5860
{c()}
5961
</KobalteTooltip.Trigger>
6062
<KobalteTooltip.Portal>
61-
<KobalteTooltip.Content data-component="tooltip" data-placement={props.placement}>
63+
<KobalteTooltip.Content
64+
data-component="tooltip"
65+
data-placement={props.placement}
66+
class={local.contentClass}
67+
style={local.contentStyle}
68+
>
6269
{others.value}
6370
{/* <KobalteTooltip.Arrow data-slot="tooltip-arrow" /> */}
6471
</KobalteTooltip.Content>

0 commit comments

Comments
 (0)