From 8c1caa8dbb89bf6691637e066b53f7e47ddef441 Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza Date: Tue, 23 Jun 2026 14:16:43 -0300 Subject: [PATCH] fix(dashboard): keep desktop sidebar visible via explicit CSS class Replace the fragile `hidden`/`lg:flex` Tailwind cascade on the desktop sidebar wrapper with an explicit `.dashboard-sidebar-desktop` class backed by a 1024px media query in globals.css. Class ordering/specificity could collapse the `lg:flex` override and leave the desktop dashboard sidebar permanently hidden; the dedicated class is order-independent. The class keeps `min-height: 0` to preserve the previous `min-h-0` behavior. Co-authored-by: Delcado <85063283+Delcado19@users.noreply.github.com> Inspired-by: https://github.com/decolua/9router/pull/1504 --- src/app/globals.css | 12 ++++ .../components/layouts/DashboardLayout.tsx | 4 +- .../dashboard-sidebar-desktop-visible.test.ts | 64 +++++++++++++++++++ 3 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 tests/unit/dashboard-sidebar-desktop-visible.test.ts diff --git a/src/app/globals.css b/src/app/globals.css index 489a58688f4..4df43dff070 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -496,3 +496,15 @@ select option { .react-flow__controls-button svg { fill: var(--color-text-main); } + +/* Desktop sidebar visibility must not depend on Tailwind's hidden/lg:flex cascade + (ordering/specificity can collapse it). Explicit class + 1024px media query. */ +.dashboard-sidebar-desktop { + display: none; + min-height: 0; +} +@media (min-width: 1024px) { + .dashboard-sidebar-desktop { + display: flex; + } +} diff --git a/src/shared/components/layouts/DashboardLayout.tsx b/src/shared/components/layouts/DashboardLayout.tsx index 0a0a3fa866e..f72841a6e7c 100644 --- a/src/shared/components/layouts/DashboardLayout.tsx +++ b/src/shared/components/layouts/DashboardLayout.tsx @@ -73,8 +73,8 @@ export default function DashboardLayout({ children }) { /> )} - {/* Sidebar - Desktop */} -
+ {/* Sidebar - Desktop: keep visibility independent from Tailwind hidden/lg:flex ordering. */} +