Reliability metrics now adapt to their content column on narrow dashboard surfaces. - Reflow metric cards with an auto-fit, minimum-width grid - Cover the responsive grid contract in ReliabilityView tests Files changed: packages/dashboard/app/components/ReliabilityView.css | 6 +++++- .../app/components/__tests__/ReliabilityView.test.tsx | 12 ++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) Fusion-Task-Id: FN-8036 Fusion-Task-Lineage: e48567ac-2b7e-415d-8652-2c21048cd768 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
204 lines
4.6 KiB
CSS
204 lines
4.6 KiB
CSS
.reliability-view {
|
|
display: flex;
|
|
flex: 1 1 auto;
|
|
flex-direction: column;
|
|
gap: var(--space-lg);
|
|
height: 100%;
|
|
min-height: 0;
|
|
min-width: 0;
|
|
overflow-y: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.reliability-card {
|
|
padding: var(--space-lg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
background: var(--card);
|
|
}
|
|
|
|
.reliability-loading {
|
|
display: flex;
|
|
flex: 1 1 auto;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-md);
|
|
height: 100%;
|
|
min-width: 0;
|
|
padding: var(--space-2xl);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.reliability-error {
|
|
display: flex;
|
|
flex: 1 1 auto;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--space-md);
|
|
height: 100%;
|
|
min-width: 0;
|
|
padding: var(--space-2xl);
|
|
text-align: center;
|
|
}
|
|
|
|
.reliability-error p {
|
|
color: var(--text-muted);
|
|
margin: 0;
|
|
}
|
|
|
|
.reliability-headline-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.reliability-headline {
|
|
font-size: 1.75rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
/*
|
|
FNXC:Reliability 2026-07-15-00:00:
|
|
FN-8036 requires metric cards to size from the Command Center content column rather than the raw viewport. Auto-fit preserves the three-card desktop layout when space permits while widening cards by reflowing them on narrow embedded and mobile surfaces.
|
|
*/
|
|
.reliability-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--space-2xl) * 12)), 1fr));
|
|
gap: var(--space-lg);
|
|
}
|
|
|
|
.reliability-section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
/*
|
|
FNXC:Reliability 2026-06-19-00:00:
|
|
Reliability charts use shared recharts wrappers, whose ResponsiveContainer needs a measurable parent block-size. Keep the scoped section token-sized so the new charts render while preserving the view's flex-fill scroll contract.
|
|
*/
|
|
.reliability-chart-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
min-inline-size: 0;
|
|
margin-block-start: var(--space-md);
|
|
padding: var(--space-md);
|
|
border: 1px solid var(--border-subtle);
|
|
border-radius: var(--radius-md);
|
|
background: var(--surface-1);
|
|
}
|
|
|
|
.reliability-chart-section h4 {
|
|
margin: 0;
|
|
color: var(--text-muted);
|
|
font-size: var(--font-size-xs);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.reliability-chart-section .cc-recharts-chart,
|
|
.reliability-chart-section .cc-recharts-empty {
|
|
block-size: clamp(calc(var(--space-2xl) * 4), 34vh, calc(var(--space-2xl) * 7));
|
|
}
|
|
|
|
.reliability-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: var(--space-sm);
|
|
}
|
|
|
|
.reliability-table th,
|
|
.reliability-table td {
|
|
text-align: left;
|
|
padding: var(--space-xs) var(--space-sm);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.reliability-stat-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: var(--space-xs) 0;
|
|
}
|
|
|
|
.reliability-muted {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.reliability-details {
|
|
margin-top: var(--space-sm);
|
|
}
|
|
|
|
.reliability-details summary {
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.reliability-details-content {
|
|
margin-top: var(--space-sm);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.reliability-histogram {
|
|
list-style: none;
|
|
margin: var(--space-sm) 0 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.reliability-histogram li {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 2fr) minmax(0, 6fr) minmax(0, 1fr);
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.reliability-histogram-bar-wrap {
|
|
width: 100%;
|
|
border-radius: var(--radius-pill);
|
|
background: color-mix(in srgb, var(--color-info) 15%, transparent);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.reliability-histogram-bar {
|
|
height: var(--space-md);
|
|
background: var(--color-info);
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.reliability-view {
|
|
padding-bottom: calc(var(--space-lg) + var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + var(--standalone-bottom-gap));
|
|
}
|
|
|
|
.reliability-loading,
|
|
.reliability-error {
|
|
padding-bottom: calc(var(--space-lg) + var(--mobile-nav-height) + env(safe-area-inset-bottom, 0px) + var(--standalone-bottom-gap));
|
|
}
|
|
|
|
.reliability-grid {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
}
|
|
|
|
.reliability-section-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.reliability-chart-section {
|
|
padding: var(--space-sm);
|
|
}
|
|
|
|
.reliability-chart-section .cc-recharts-chart,
|
|
.reliability-chart-section .cc-recharts-empty {
|
|
block-size: clamp(calc(var(--space-2xl) * 3), 46vh, calc(var(--space-2xl) * 6));
|
|
}
|
|
}
|