From c3edf9b399d13b3e67aed7691a38e85442060642 Mon Sep 17 00:00:00 2001 From: Christian Fehmer Date: Mon, 9 Mar 2026 10:06:27 +0100 Subject: [PATCH] refactor: allow AnimatedModal to be placed anywhere (@fehmer) --- .../components/common/AnimatedModal.spec.tsx | 9 ++-- .../ts/components/common/AnimatedModal.tsx | 53 ++++++++++--------- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/frontend/__tests__/components/common/AnimatedModal.spec.tsx b/frontend/__tests__/components/common/AnimatedModal.spec.tsx index b57934428ace..209e5af446f5 100644 --- a/frontend/__tests__/components/common/AnimatedModal.spec.tsx +++ b/frontend/__tests__/components/common/AnimatedModal.spec.tsx @@ -28,9 +28,12 @@ describe("AnimatedModal", () => { modalDiv: HTMLDivElement; } { const { container } = render(() => ( - -
Test Content
-
+ <> +
+ +
Test Content
+
+ )); return { diff --git a/frontend/src/ts/components/common/AnimatedModal.tsx b/frontend/src/ts/components/common/AnimatedModal.tsx index d9a72973981f..e6032ed8315d 100644 --- a/frontend/src/ts/components/common/AnimatedModal.tsx +++ b/frontend/src/ts/components/common/AnimatedModal.tsx @@ -5,6 +5,7 @@ import { ParentProps, Show, } from "solid-js"; +import { Portal } from "solid-js/web"; import { useRefWithUtils } from "../../hooks/useRefWithUtils"; import { @@ -305,31 +306,33 @@ export function AnimatedModal(props: AnimatedModalProps): JSXElement { }); return ( - + + ); }