From 83653a463c857e0634e07a97fdc470d38ae606fe Mon Sep 17 00:00:00 2001 From: Abdul Rahman <81605929+abdulrahmancodes@users.noreply.github.com> Date: Fri, 10 Apr 2026 21:28:25 +0530 Subject: [PATCH] fix: side panel close animation cleanup not firing due to invalid CSS transition (#19556) ## Summary Fixes the side panel close animation cleanup (`sidePanelCloseAnimationCompleteCleanup`) never running during the close transition. This eventually fixes the issue where in navbar edit mode, clicking on a nav item sometimes doesn't get selected, the side panel opens but shows `Select a navigation item to edit` instead of the selected item's settings. The root cause was stale `isSidePanelClosing` state from a previous close that wasn't cleaned up, causing the next open to run cleanup synchronously (without emitting the close event), which interfered with the navigation item selection flow. ### Root cause The CSS `transition` on `StyledSidePanelWrapper` used `${themeCssVariables.animation.duration.normal}s`, which Linaria converts to a CSS custom property value like `width var(--t-animation-duration-normal)s`. After CSS variable substitution, `0.3` and `s` become two separate tokens, not a valid `