Skip to content

Commit 360b0e7

Browse files
authored
UI Tweak: Fade buttons on history preview (homescreen) if no interaction in progress. (RooCodeInc#3523)
Fade buttons on history preview unless mouseover.
1 parent 3f54efc commit 360b0e7

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

webview-ui/src/components/history/CopyButton.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ import { useAppTranslation } from "@/i18n/TranslationContext"
77

88
type CopyButtonProps = {
99
itemTask: string
10+
className?: string
1011
}
1112

12-
export const CopyButton = ({ itemTask }: CopyButtonProps) => {
13+
export const CopyButton = ({ itemTask, className }: CopyButtonProps) => {
1314
const { isCopied, copy } = useClipboard()
1415
const { t } = useAppTranslation()
1516

@@ -34,7 +35,7 @@ export const CopyButton = ({ itemTask }: CopyButtonProps) => {
3435
title={t("history:copyPrompt")}
3536
onClick={onCopy}
3637
data-testid="copy-prompt-button"
37-
className="opacity-50 hover:opacity-100">
38+
className={cn("opacity-50 hover:opacity-100", className)}>
3839
<span className={cn("codicon scale-80", { "codicon-check": isCopied, "codicon-copy": !isCopied })} />
3940
</Button>
4041
)

webview-ui/src/components/history/TaskItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const TaskItem = ({
5050
"cursor-pointer",
5151
{
5252
// Compact variant styling
53-
"bg-vscode-editor-background rounded relative overflow-hidden border border-vscode-toolbar-hoverBackground/30 hover:border-vscode-toolbar-hoverBackground/60":
53+
"group bg-vscode-editor-background rounded relative overflow-hidden border border-vscode-toolbar-hoverBackground/30 hover:border-vscode-toolbar-hoverBackground/60":
5454
isCompact,
5555
// Full variant styling
5656
"bg-vscode-list-activeSelectionBackground": !isCompact && isSelectionMode && isSelected,

webview-ui/src/components/history/TaskItemHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const TaskItemHeader: React.FC<TaskItemHeaderProps> = ({ item, variant, isSelect
4343

4444
{/* Action Buttons */}
4545
{!isSelectionMode && (
46-
<div className="flex flex-row gap-0 items-center opacity-50 hover:opacity-100">
46+
<div className="flex flex-row gap-0 items-center opacity-20 group-hover:opacity-50 hover:opacity-100">
4747
{isCompact ? (
4848
<CopyButton itemTask={item.task} />
4949
) : (

0 commit comments

Comments
 (0)