Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Expand Up @@ -173,10 +173,11 @@ export const CheckpointMenu = ({ ts, commitHash, checkpoint, onOpenChange }: Che
</Button>
</PopoverTrigger>
</StandardTooltip>
<PopoverContent align="end" container={portalContainer}>
<PopoverContent align="end" container={portalContainer} className="w-auto min-w-max">
<div className="flex flex-col gap-2">
<Button
variant="secondary"
className="whitespace-nowrap"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whitespace-nowrap class is redundant here because it's already included in the base buttonVariants definition (see webview-ui/src/components/ui/button.tsx line 8). While this doesn't cause any functional issues due to how Tailwind handles duplicate classes, it's unnecessary duplication that could confuse future maintainers.

onClick={() => {
onDiffFromInit()
setMoreOpen(false)
Expand All @@ -186,6 +187,7 @@ export const CheckpointMenu = ({ ts, commitHash, checkpoint, onOpenChange }: Che
</Button>
<Button
variant="secondary"
className="whitespace-nowrap"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue here - the whitespace-nowrap class is redundant because it's already included in the base buttonVariants definition (see webview-ui/src/components/ui/button.tsx line 8).

onClick={() => {
onDiffWithCurrent()
setMoreOpen(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ vi.mock("@/components/ui", () => {
)
},
PopoverTrigger: ({ children }: any) => <div data-testid="popover-trigger">{children}</div>,
PopoverContent: ({ children }: any) => <div data-testid="popover-content">{children}</div>,
PopoverContent: ({ children, className, ...rest }: any) => (
<div data-testid="popover-content" className={className} {...rest}>
{children}
</div>
),
}
})

Expand Down