Fix for overflow (#7470)

This commit is contained in:
tofarr
2025-03-24 11:32:38 -06:00
committed by GitHub
parent 28cc04908c
commit e639283ac9
2 changed files with 27 additions and 23 deletions

View File

@@ -27,7 +27,7 @@ export function ConversationCardContextMenu({
ref={ref}
testId="context-menu"
className={cn(
"right-0 absolute",
"right-0 absolute mt-3",
position === "top" && "bottom-full",
position === "bottom" && "top-full",
)}

View File

@@ -179,31 +179,35 @@ export function ConversationCard({
)}
</div>
<div className="flex items-center gap-2 relative">
<div className="flex items-center">
<ConversationStateIndicator status={status} />
{hasContextMenu && (
<EllipsisButton
onClick={(event) => {
event.preventDefault();
event.stopPropagation();
setContextMenuVisible((prev) => !prev);
}}
/>
)}
{contextMenuVisible && (
<ConversationCardContextMenu
onClose={() => setContextMenuVisible(false)}
onDelete={onDelete && handleDelete}
onEdit={onChangeTitle && handleEdit}
onDownloadViaVSCode={
conversationId ? handleDownloadViaVSCode : undefined
}
onDisplayCost={
showDisplayCostOption ? handleDisplayCost : undefined
}
position={variant === "compact" ? "top" : "bottom"}
/>
<div className="pl-2">
<EllipsisButton
onClick={(event) => {
event.preventDefault();
event.stopPropagation();
setContextMenuVisible((prev) => !prev);
}}
/>
</div>
)}
<div className="relative">
{contextMenuVisible && (
<ConversationCardContextMenu
onClose={() => setContextMenuVisible(false)}
onDelete={onDelete && handleDelete}
onEdit={onChangeTitle && handleEdit}
onDownloadViaVSCode={
conversationId ? handleDownloadViaVSCode : undefined
}
onDisplayCost={
showDisplayCostOption ? handleDisplayCost : undefined
}
position={variant === "compact" ? "top" : "bottom"}
/>
)}
</div>
</div>
</div>