Browse Source

fix(ui): drop the duplicated Channels title and even out the header gap (#1827)

Nacho 1 month ago
parent
commit
c07af379f0

+ 1 - 0
CHANGELOG.md

@@ -19,6 +19,7 @@ y este proyecto se adhiere a [Versionado Semántico](https://semver.org/lang/es/
 
 ### Changed
 
+- The Channels page no longer repeats its name (#1823). The top bar said Canales and the page said Analisis de canales right below it, because it was the one page that kept its own title and had no breadcrumb. It now follows the same header as the rest. The extra margin that pushed the explanation away from the breadcrumb on Routers, Devices, Reports and Roaming is gone too, so the gap is the same everywhere.
 - Every page header now uses the same layout as the topology one (#1823). Alerts, Devices and Settings still placed the breadcrumb and the explanation differently, with a slash separator and a caption-sized line, so the text landed in a different spot on each page. They now share the chevron separator, the caption breadcrumb and the body-sized explanation, aligned the same way.
 - Firmware upgrades no longer repeats its own name (#1823). The page was the only one still printing the section title under the top bar, and the line below it opened with the same words. The title is gone and the line now says what the page does: track each unit, start the flash and keep a copy of the configuration first.
 - Page headers follow the topology one (#1822): the breadcrumb keeps its small caption size with the same chevron separator, and the line under it grows to the body size in the secondary colour, so the explanation reads before the controls. Every refresh control is icon-only now, square and with the accessible name kept, which also matches the height of the rest of the header actions.

+ 11 - 4
app/src/pages/ChannelPlan.tsx

@@ -1,7 +1,8 @@
 import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react'
 import { useTranslation } from 'react-i18next'
+import { Link } from 'react-router'
 import { useNetPulse } from '@/data/DataProvider'
-import { AlertCircle, ArrowDown, ArrowUp, ArrowUpDown, Radar, RefreshCw, Router, Sparkles } from 'lucide-react'
+import { AlertCircle, ArrowDown, ArrowUp, ArrowUpDown, ChevronRight, Radar, RefreshCw, Router, Sparkles } from 'lucide-react'
 import { cn } from '@/lib/utils'
 import { CurrentChannels } from '@/components/channels/CurrentChannels'
 import { ssidColor } from '@/lib/ssidColor'
@@ -505,9 +506,15 @@ export default function ChannelPlan() {
 
   return (
     <div className="space-y-4 md:space-y-5">
-      <header>
-        <h1 className="font-display text-h1 text-text-primary">{t('channelPlan.title')}</h1>
-        <p className="mt-0.5 text-sm text-text-secondary">{t('channelPlan.subtitle')}</p>
+      <header className="flex flex-wrap items-end justify-between gap-x-4 gap-y-3">
+        <div>
+          <nav aria-label={t('common.breadcrumb')} className="mb-1 flex items-center gap-1 text-caption text-text-muted">
+            <Link to="/" className="transition-colors hover:text-accent">{t('common.home')}</Link>
+            <ChevronRight className="h-3 w-3" strokeWidth={1.75} aria-hidden />
+            <span className="text-text-secondary" aria-current="page">{t('nav.channelPlan')}</span>
+          </nav>
+          <p className="mt-0.5 text-sm text-text-secondary">{t('channelPlan.subtitle')}</p>
+        </div>
       </header>
 
       {/* Barra de contexto: equipo + pestañas de radio + acciones */}

+ 1 - 1
app/src/pages/Devices.tsx

@@ -1975,7 +1975,7 @@ export default function Devices() {
           <ChevronRight className="h-3 w-3" strokeWidth={1.75} aria-hidden />
           <span className="text-text-secondary">{t('nav.devices')}</span>
         </nav>
-        <div className="mt-1.5 flex flex-wrap items-end justify-between gap-x-4 gap-y-3">
+        <div className="flex flex-wrap items-end justify-between gap-x-4 gap-y-3">
           <div>
             <p className="mt-0.5 text-sm text-text-secondary">
               {t('devices.summary', { total: deviceTotals.total, online: deviceTotals.online })}

+ 1 - 1
app/src/pages/Reports.tsx

@@ -301,7 +301,7 @@ export default function Reports() {
           <ChevronRight className="h-3 w-3" strokeWidth={1.75} aria-hidden />
           <span className="text-text-secondary">{t('nav.reports')}</span>
         </motion.nav>
-        <div className="mt-1.5 flex flex-wrap items-end justify-between gap-x-4 gap-y-3">
+        <div className="flex flex-wrap items-end justify-between gap-x-4 gap-y-3">
           <motion.div
             initial={initial}
             animate={{ opacity: 1, y: 0 }}

+ 1 - 1
app/src/pages/Roaming.tsx

@@ -447,7 +447,7 @@ export default function Roaming() {
           <ChevronRight className="h-3 w-3" strokeWidth={1.75} aria-hidden />
           <span className="text-text-secondary">{t('nav.roaming')}</span>
         </motion.nav>
-        <div className="mt-1.5 flex flex-wrap items-end justify-between gap-x-4 gap-y-3">
+        <div className="flex flex-wrap items-end justify-between gap-x-4 gap-y-3">
           <motion.div
             initial={initial}
             animate={{ opacity: 1, y: 0 }}

+ 1 - 1
app/src/pages/Routers.tsx

@@ -162,7 +162,7 @@ export default function Routers() {
           <ChevronRight className="h-3 w-3" strokeWidth={1.75} aria-hidden />
           <span className="text-text-secondary">{t('nav.routers')}</span>
         </motion.nav>
-        <div className="mt-1.5 flex flex-wrap items-end justify-between gap-x-4 gap-y-3">
+        <div className="flex flex-wrap items-end justify-between gap-x-4 gap-y-3">
           <motion.div
             initial={reduce ? false : { opacity: 0, y: 12 }}
             animate={{ opacity: 1, y: 0 }}