feat make Probes nav item a dropdown menu

The top navbar Probes button is now a dropdown with two options: - Readings (/probes) — the probe graphs - Status (/probes/status) — probe health status Highlights as active when on any probes/* page.

Commit
599d3153a6d22ea369bfa7772d1445d6b88a148c
Author
GPT-5 medium <codex@openai.com>
Author date
Committer
GPT-5 medium <codex@openai.com>
Committer date
Changed files
roles/dashboard/t/00-homepage.t
index 7fbaf5f7..f9768652 100644..100644
@@ -13,7 +13,7 @@
13 13 ->status_is(200)
14 14 ->element_exists('body nav.navbar + main')
15 15 ->text_is( 'a.navbar-brand[href="/"]', 'FAPG' )
16 Removed: ->text_is( '.navbar-nav a.nav-link[href="/probes"]', 'Probes' )
16 Added: ->text_is( '.navbar-nav a.nav-link.dropdown-toggle', 'Probes' )
17 17 ->text_is( '.navbar-nav a.nav-link[href="/insights"]', 'Insights' )
18 18 ->text_is( '.navbar-nav a.nav-link[href="/downloads"]', 'Downloads' )
19 19 ->element_exists_not('.navbar-nav a.nav-link.active')
roles/dashboard/t/01-graph-page.t
index fa6ff63c..d5abd44a 100644..100644
@@ -18,7 +18,7 @@
18 18 ->text_is(
19 19 'nav[aria-label="Breadcrumb"] [aria-current="page"]', 'pH' )
20 20 ->text_is( '.card-header h1 a[href="/probes/ph"]', 'pH' )
21 Removed: ->element_exists('.navbar-nav a.nav-link.active[href="/probes"][aria-current="page"]')
21 Added: ->element_exists('.navbar-nav a.nav-link.active.dropdown-toggle')
22 22 ->element_exists('section#probe-ph[data-panel="ph"] canvas#chart-ph')
23 23 ->element_exists_not('[data-status="ph"]')
24 24 ->element_exists(
@@ -54,7 +54,7 @@
54 54 ->element_exists('main.container')
55 55 ->element_exists('div.probes-grid')
56 56 ->element_exists('div.toolbar-items div.graph-control')
57 Removed: ->element_exists('.navbar-nav a.nav-link.active[href="/probes"][aria-current="page"]');
57 Added: ->element_exists('.navbar-nav a.nav-link.active.dropdown-toggle');
58 58
59 59 for my $probe (qw(ph do orp ec)) {
60 60 $t->element_exists(qq{div.probes-grid .card-header h1 a[href="/probes/$probe"]});
roles/dashboard/templates/layouts/default.html.ep
index 1b489108..8c2a406a 100644..100644
@@ -38,12 +38,17 @@
38 38
39 39 <div class="collapse navbar-collapse" id="navbarLinks">
40 40 <ul class="navbar-nav ms-auto mb-2 mb-md-0">
41 Removed: <li class="nav-item">
42 Removed: % if ((stash('nav_page') // '') eq 'probes') {
43 Removed: <a class="nav-link fw-semibold active" href="/probes" aria-current="page">Probes</a>
44 Removed: % } else {
45 Removed: <a class="nav-link fw-semibold" href="/probes">Probes</a>
46 Removed: % }
41 Added: <li class="nav-item dropdown">
42 Added: <a class="nav-link fw-semibold dropdown-toggle<%= (stash('nav_page') // '') eq 'probes' ? ' active' : '' %>"
43 Added: href="#"
44 Added: role="button"
45 Added: data-bs-toggle="dropdown"
46 Added: aria-expanded="false"
47 Added: <%= (stash('nav_page') // '') eq 'probes' ? 'aria-current="page"' : '' %>>Probes</a>
48 Added: <ul class="dropdown-menu">
49 Added: <li><a class="dropdown-item" href="/probes">Readings</a></li>
50 Added: <li><a class="dropdown-item" href="/probes/status">Status</a></li>
51 Added: </ul>
47 52 </li>
48 53 <li class="nav-item">
49 54 % if ((stash('nav_page') // '') eq 'insights') {