From 58b7f85e1ea15a276ed16256f980b8c1fdc03531 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 21 Oct 2026 13:31:33 +0200 Subject: [PATCH] feat(ui): add Projects page to the sidebar --- resources/views/components/navbar.blade.php | 4 ++-- tests/Feature/NavbarSubmenuTest.php | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/resources/views/components/navbar.blade.php b/resources/views/components/navbar.blade.php index b834571da0..e6a082cf71 100644 --- a/resources/views/components/navbar.blade.php +++ b/resources/views/components/navbar.blade.php @@ -104,8 +104,8 @@ // An entry with children opens a submenu in place of the main menu (back button + its pages). $navSections = collect([ 'Workspace' => [ - // The dashboard lists projects and links to all of them, so project pages count as Dashboard. - ['label' => 'Dashboard', 'icon' => 'dashboard', 'href' => '/', 'active' => request()->is('/', 'dashboard/*', 'projects', 'projects/*', 'project/*', 'canvas')], + ['label' => 'Dashboard', 'icon' => 'dashboard', 'href' => '/', 'active' => request()->is('/', 'dashboard/*', 'canvas')], + ['label' => 'Projects', 'icon' => 'projects', 'href' => route('project.index'), 'active' => request()->is('projects', 'projects/*', 'project/*')], ['label' => 'Monitoring', 'icon' => 'graph', 'children' => [ ['label' => 'Analytics', 'icon' => 'analytics', 'href' => route('analytics'), 'active' => request()->is('analytics')], ['label' => 'Metrics', 'icon' => 'graph', 'href' => route('metrics'), 'active' => request()->is('metrics')], diff --git a/tests/Feature/NavbarSubmenuTest.php b/tests/Feature/NavbarSubmenuTest.php index b336b46a80..de06618119 100644 --- a/tests/Feature/NavbarSubmenuTest.php +++ b/tests/Feature/NavbarSubmenuTest.php @@ -131,3 +131,12 @@ test('a parent entry opens its submenu in place on mobile and desktop', function ->not->toMatch('#toContain('href="'.route('project.index').'"') + ->toMatch('#title="Projects"[^>]*menu-item-active#s') + ->not->toMatch('#title="Dashboard"[^>]*menu-item-active#s'); +});