Skip to content

Commit aeac2bf

Browse files
fix(web): Git quick action and panel editor button show their name on hover
AI-assisted; verified with the tests and tools listed above.
1 parent 386d12d commit aeac2bf

2 files changed

Lines changed: 33 additions & 29 deletions

File tree

‎apps/web/src/components/GitActionsControl.tsx‎

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,28 +1651,36 @@ export default function GitActionsControl({
16511651
</PopoverPopup>
16521652
</Popover>
16531653
) : (
1654-
<ThreadDetailsControl
1655-
variant="ghost"
1656-
size="xs"
1657-
part="primary"
1658-
panel
1659-
disabled={!canWriteSourceControl || isGitActionRunning || quickAction.disabled}
1660-
onClick={runQuickAction}
1661-
>
1662-
<GitQuickActionIcon
1663-
quickAction={quickAction}
1664-
SourceControlIcon={SourceControlIcon}
1665-
className={THREAD_DETAILS_PANEL_ICON_CLASS}
1666-
/>
1667-
<span
1668-
className={cn(
1669-
"sr-only @3xl/header-actions:not-sr-only @3xl/header-actions:ml-0.5",
1670-
cn("not-sr-only ml-0 truncate", THREAD_DETAILS_PANEL_LABEL_CLASS),
1671-
)}
1654+
<Tooltip>
1655+
<TooltipTrigger
1656+
render={
1657+
<ThreadDetailsControl
1658+
data-toolbar-control=""
1659+
variant="ghost"
1660+
size="xs"
1661+
part="primary"
1662+
panel
1663+
disabled={!canWriteSourceControl || isGitActionRunning || quickAction.disabled}
1664+
onClick={runQuickAction}
1665+
/>
1666+
}
16721667
>
1673-
{quickAction.label}
1674-
</span>
1675-
</ThreadDetailsControl>
1668+
<GitQuickActionIcon
1669+
quickAction={quickAction}
1670+
SourceControlIcon={SourceControlIcon}
1671+
className={THREAD_DETAILS_PANEL_ICON_CLASS}
1672+
/>
1673+
<span
1674+
className={cn(
1675+
"sr-only @3xl/header-actions:not-sr-only @3xl/header-actions:ml-0.5",
1676+
cn("not-sr-only ml-0 truncate", THREAD_DETAILS_PANEL_LABEL_CLASS),
1677+
)}
1678+
>
1679+
{quickAction.label}
1680+
</span>
1681+
</TooltipTrigger>
1682+
<TooltipPopup side="top">{quickAction.label}</TooltipPopup>
1683+
</Tooltip>
16761684
)}
16771685
{gitActionProgress ? (
16781686
<GitActionElapsedTime

‎apps/web/src/components/chat/OpenInPicker.tsx‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -416,14 +416,10 @@ export const OpenInPicker = memo(function OpenInPicker({
416416
? { className: THREAD_DETAILS_PANEL_SPLIT_GROUP_CLASS, ref: panelAnchorRef }
417417
: {})}
418418
>
419-
{isPanel ? (
420-
primaryControl
421-
) : (
422-
<Tooltip>
423-
<TooltipTrigger render={primaryControl} />
424-
<TooltipPopup side="top">{primaryControlLabel}</TooltipPopup>
425-
</Tooltip>
426-
)}
419+
<Tooltip>
420+
<TooltipTrigger render={primaryControl} />
421+
<TooltipPopup side="top">{primaryControlLabel}</TooltipPopup>
422+
</Tooltip>
427423
{isPanel ? (
428424
<span aria-hidden="true" className={THREAD_DETAILS_PANEL_SPLIT_SEPARATOR_CLASS} />
429425
) : (

0 commit comments

Comments
 (0)