Skip to content

Commit 5fd6c62

Browse files
committed
fix(clients): rebalance table columns and stop date cells wrapping (#1360)
The device column carried 3.4fr of slack while the first/last seen cells sat at 0.7fr without nowrap, so relative dates wrapped mid-string. Device drops to 2.8fr, the date columns rise to 1.0fr, the cells get whitespace-nowrap, and the Spanish headers shrink ("Primera vez" / "Última vez") so they fit on one line.
1 parent b6ea1f8 commit 5fd6c62

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

‎app/public/locales/es/translation.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@
379379
"connection": "Conexión",
380380
"colBand": "Banda",
381381
"colDevice": "Dispositivo",
382-
"colFirstSeen": "Vista por primera vez",
383-
"colLastSeen": "Última vez vista",
382+
"colFirstSeen": "Primera vez",
383+
"colLastSeen": "Última vez",
384384
"colSignal": "Señal",
385385
"minSignal": "Señal mín.",
386386
"minSignalAny": "Cualquiera",

‎app/src/pages/Devices.tsx‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,11 +1070,14 @@ const COLUMN_SPECS: Record<DeviceColumn, { md?: number; lg: number; xl?: number;
10701070
band: { md: 0.85, lg: 0.6 },
10711071
signal: { md: 0.95, lg: 0.75 },
10721072
traffic: { md: 0.75, lg: 0.75, xl: 0.7 },
1073-
firstSeen: { lg: 0.7, xlOnly: true },
1074-
lastSeen: { lg: 0.7, xlOnly: true },
1073+
firstSeen: { lg: 1.0, xlOnly: true },
1074+
lastSeen: { lg: 1.0, xlOnly: true },
10751075
}
10761076

1077-
const DEVICE_COL_FR = { md: 3, lg: 3.4, xl: 3.4 } as const
1077+
// #1360: la columna de dispositivo repartía holgura que las fechas (sin
1078+
// nowrap y a 0.7fr) pagaban con wraps feos; el peso baja a 2.8 y las fechas
1079+
// suben a 1.0fr para que "Primera vez"/"Última vez" quepan en una línea.
1080+
const DEVICE_COL_FR = { md: 3, lg: 2.8, xl: 2.8 } as const
10781081

10791082
/** Reparto al ocultar columnas: el fr liberado se distribuye A PARTES IGUALES
10801083
* entre las columnas visibles (dispositivo incluida). El reparto nativo de
@@ -1234,15 +1237,17 @@ function ListRow({
12341237
</span>
12351238
</div>
12361239
)}
1237-
{/* First/Last seen (#954): solo en xl para no engordar la tabla */}
1240+
{/* First/Last seen (#954): solo en xl para no engordar la tabla.
1241+
#1360: whitespace-nowrap - con 1.0fr caben; sin nowrap partían
1242+
el texto ("hace 2 días") en dos líneas. */}
12381243
{vis.has('firstSeen') && (
12391244
<div className="hidden xl:block">
1240-
<span className="text-caption text-text-secondary">{fmtSeenAgo(device.firstSeenMs)}</span>
1245+
<span className="whitespace-nowrap text-caption text-text-secondary">{fmtSeenAgo(device.firstSeenMs)}</span>
12411246
</div>
12421247
)}
12431248
{vis.has('lastSeen') && (
12441249
<div className="hidden xl:block">
1245-
<span className="text-caption text-text-secondary">{fmtSeenAgo(device.lastSeenMs)}</span>
1250+
<span className="whitespace-nowrap text-caption text-text-secondary">{fmtSeenAgo(device.lastSeenMs)}</span>
12461251
</div>
12471252
)}
12481253
<ChevronDown

0 commit comments

Comments
 (0)