From 649e90ab3b601a55f603e354ac2504b99dc20b11 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Sat, 24 Oct 2026 21:58:42 +0200 Subject: [PATCH] fix(ui): show resource menus in the sidebar and mobile drawer, not in the page The main sidebar shows the resource menu from lg, where it appears, and the mobile drawer shows it too, so the page grid menu is gone. The drawer opens on the menu of the current page again after it closes. Below xl, the resource actions are a compact button in line with the title. Co-Authored-By: Claude Opus 5.5 --- bootstrap/helpers/shared.php | 2 +- resources/css/app.css | 25 ++- .../configuration-sidebar.blade.php | 16 +- .../views/components/backup-sidebar.blade.php | 4 +- .../database/configuration-sidebar.blade.php | 16 +- .../views/components/main-nav-menu.blade.php | 8 +- resources/views/components/navbar.blade.php | 60 +++-- .../views/components/server/sidebar.blade.php | 16 +- .../service-database/sidebar.blade.php | 2 +- .../service/configuration-sidebar.blade.php | 6 +- .../views/components/split-action.blade.php | 2 +- .../livewire/destination/sidebar.blade.php | 4 +- .../project/application/heading.blade.php | 207 +++++++++--------- .../project/database/heading.blade.php | 85 +++---- .../project/service/heading.blade.php | 179 +++++++-------- .../livewire/project/service/index.blade.php | 2 +- .../views/livewire/server/navbar.blade.php | 183 ++++++++-------- .../livewire/source/github/change.blade.php | 4 +- .../views/livewire/storage/show.blade.php | 4 +- tests/Feature/BreadcrumbsVisibilityTest.php | 7 +- 20 files changed, 430 insertions(+), 402 deletions(-) diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index f34a15aaf2..7ce429bfd1 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -4628,7 +4628,7 @@ function wireNavigate(): string } /** - * Registers a resource menu that the main sidebar shows in place of its main menu on wide screens + * Registers a resource menu that the main sidebar and the mobile drawer show in place of their main menu * (see components/navbar.blade.php). The menu teleports itself into #main-nav-context-{depth}. * Back on a menu shows the menu one depth lower, and Back at depth 0 shows the main menu. */ diff --git a/resources/css/app.css b/resources/css/app.css index ad9c56a420..4874b60767 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -2167,6 +2167,16 @@ html[data-theme="custom"]:not(.dark) :is(.application-settings-section, .applica } } +/* A resource menu that the main sidebar (and the mobile drawer) shows instead + (navbar #main-nav-context-{depth}). */ +.application-settings-navigation.in-main-nav { + display: none; +} + +.application-settings-navigation.in-main-nav ~ * { + grid-column: 1 / -1; +} + @media (min-width: 1280px) { /* Fixed like the main sidebar (3rem → bottom); left tracks its width (--sidebar-w). Fixed leaves the grid, so the content sibling is pinned to column 2 below. */ @@ -2193,15 +2203,6 @@ html[data-theme="custom"]:not(.dark) :is(.application-settings-section, .applica grid-column: 2; } - /* A resource menu that the main sidebar shows instead (navbar #main-nav-context-{depth}). */ - .application-settings-navigation.in-main-nav { - display: none; - } - - .application-settings-navigation.in-main-nav ~ * { - grid-column: 1 / -1; - } - html:not(.dark) .application-settings-navigation { --rail-fill: var(--coollabs-base); } @@ -6788,12 +6789,12 @@ html.dark .project-card-stats-dot { } } -/* Resource menu in the collapsed main sidebar: icons only. */ -.sidebar-collapsed .nav-context-menu :is(.menu-item-label, .nav-children, .menu-item > :not(.menu-item-icon)) { +/* Resource menu in the collapsed desktop sidebar: icons only (the mobile drawer never collapses). */ +.app-sidebar .sidebar-collapsed .nav-context-menu :is(.menu-item-label, .nav-children, .menu-item > :not(.menu-item-icon)) { display: none !important; } -.sidebar-collapsed .nav-context-menu .menu-item { +.app-sidebar .sidebar-collapsed .nav-context-menu .menu-item { justify-content: center; padding-left: 0; padding-right: 0; diff --git a/resources/views/components/application/configuration-sidebar.blade.php b/resources/views/components/application/configuration-sidebar.blade.php index 5d927443de..592c81e48f 100644 --- a/resources/views/components/application/configuration-sidebar.blade.php +++ b/resources/views/components/application/configuration-sidebar.blade.php @@ -227,11 +227,11 @@ @endphp @php - // The main sidebar shows this menu on wide screens (see components/navbar.blade.php). + // The main sidebar and the mobile drawer show this menu (see components/navbar.blade.php). registerMainNavContext(0, 'Dashboard', 'Back to the main menu'); @endphp -{{-- Rendered twice: in the page (below xl), and teleported into the main sidebar (xl and up). +{{-- Rendered twice: in the page (CSS hides it; it keeps the command palette items), and teleported into the main sidebar. navOnly renders only the sidebar copy, as the parent menu of a deeper page (e.g. a backup). --}} @foreach ($navOnly ? ['main-nav'] : ['page', 'main-nav'] as $placement) @if ($placement === 'main-nav') @@ -239,19 +239,15 @@