From f46e681af224fd0d93a2cf069e837930340eb050 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Tue, 17 Nov 2026 11:53:56 +0000 Subject: [PATCH 1/3] fix(layer): animate menu toggle into a cross inside the header overlay Amp-Thread-ID: https://ampcode.com/threads/T-01a1e94f-7b74-7211-a351-938511ecad99 --- layer/app/components/IconMenuToggle.vue | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/layer/app/components/IconMenuToggle.vue b/layer/app/components/IconMenuToggle.vue index fe1061a1d..f44717943 100644 --- a/layer/app/components/IconMenuToggle.vue +++ b/layer/app/components/IconMenuToggle.vue @@ -7,7 +7,16 @@ const props = defineProps<{ const { t } = useLocale() -const lineClass = 'outline-none origin-center [transform-box:fill-box] transition-[translate,rotate,opacity] duration-400 ease-[cubic-bezier(0.34,1.36,0.64,1)]' +// UHeader renders a second toggle in its menu overlay, mounted already open. Draw it closed for its +// first frame so the lines transition into the cross instead of appearing as one. +const ready = ref(false) +onMounted(() => requestAnimationFrame(() => requestAnimationFrame(() => { + ready.value = true +}))) +const crossed = computed(() => props.open && ready.value) + +// Each line turns around its own center; the overshoot approximates the spring the toggle used to have. +const lineClass = 'outline-none origin-center [transform-box:fill-box] transition-[translate,rotate,opacity] duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)] motion-reduce:transition-none'