From 844add04ef57aa51ebb2f7e107528a2b98365389 Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 1 Sep 2026 19:13:15 +0200 Subject: [PATCH] fix: confirm dialog is now a compact popup, not full-screen overlay - Removed full-screen overlay backdrop (bg-black/95 + backdrop-blur) - Dialog is centered via fixed left-1/2 top-1/2 -translate - Compact design: max-w-sm, smaller text, smaller buttons - Uses admin theme vars (admin-surface, admin-border, admin-text) - Smooth scale+fade animation without overlay --- src/components/admin/confirm-dialog.tsx | 132 ++++++++++-------------- 1 file changed, 54 insertions(+), 78 deletions(-) diff --git a/src/components/admin/confirm-dialog.tsx b/src/components/admin/confirm-dialog.tsx index 91704929..cdaf6224 100644 --- a/src/components/admin/confirm-dialog.tsx +++ b/src/components/admin/confirm-dialog.tsx @@ -5,7 +5,6 @@ import { AnimatePresence, motion } from "motion/react"; import { useCallback, useEffect, useRef, useState } from "react"; import { createPortal } from "react-dom"; import { Button } from "@/components/ui/button"; -import { modalContentVariants, modalOverlayVariants } from "@/lib/motion"; import { cn } from "@/lib/utils"; export type ConfirmDialogProps = { @@ -20,10 +19,6 @@ export type ConfirmDialogProps = { onConfirm: () => void | Promise; }; -/** - * Portal-based confirm modal (not Dialog.Root) so it can safely stack - * above Visual Manager / other Base UI dialogs without nested-root bugs. - */ export function ConfirmDialog({ open, onOpenChange, @@ -62,85 +57,66 @@ export function ConfirmDialog({ if (!mounted) return null; - const isOpen = open; - return createPortal( - {isOpen ? ( + {open ? ( - - - - +

+ {description} +

+ +
+ + +
) : null}
,