Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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 @@ -220,7 +220,11 @@ export const ScheduleItemCard = ({
};

return (
<Card ref={dragRef} size="1" style={{ opacity, cursor: "grab" }}>
<Card
ref={dragRef}
size="1"
style={{ opacity, cursor: "grab", height: "100%" }}
>
<Flex direction="column" gap="1" align="start">
{availability === "unavailable" && (
<Flex align="center" gap="1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,25 @@ export const DjangoAdminEditorModal = () => {
});
};

if (!url) {
return null;
}

const baseUrl =
document.location.ancestorOrigins?.[0] || document.location.origin;
const itemUrl = `${baseUrl}/admin${url}`;

return (
<Dialog.Root open={isOpen} onOpenChange={(open) => !open && onClose()}>
<Dialog.Content maxWidth="90vw" width="90vw">
<VisuallyHidden>
<Dialog.Title>Admin view</Dialog.Title>
</VisuallyHidden>
<iframe title="Admin view" src={itemUrl} className="w-full h-[85vh]" />
{/* url is null while the dialog animates closed; keep Dialog.Root
mounted so Radix can finish closing and restore body pointer
events — unmounting it while open leaves the page unclickable. */}
{url && (
<iframe
title="Admin view"
src={`${baseUrl}/admin${url}`}
className="w-full h-[85vh]"
/>
)}
</Dialog.Content>
</Dialog.Root>
);
Expand Down
15 changes: 14 additions & 1 deletion backend/custom_admin/src/custom-styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,20 @@
opacity: 0;
animation: rt-fade-out 200ms cubic-bezier(0.16, 1, 0.3, 1);
}
z-index: 30;
/* Must beat the schedule grid's z-[100] sticky headers: .radix-themes
creates no stacking context, so the grid competes with portals at the
body level. 500 matches the old shared Modal overlay. */
z-index: 500;
}

/* Portalled popper content (Select, DropdownMenu, Popover, Tooltip) has no
z-index in Radix Themes and relies on DOM order, so it paints below the
dialog overlay once that has an explicit z-index. The popper wrapper copies
the content's computed z-index, so a class rule here is enough. */
.rt-PopperContent,
.rt-SelectContent,
.rt-TooltipContent {
z-index: 510;
}

.rt-BaseDialogContent {
Expand Down
Loading