From 63ee29e222570df30e0cd715f338e8ec6fcffbc3 Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Tue, 18 Aug 2026 13:17:32 +0200 Subject: [PATCH] Adopt shared WebUI structural primitives --- .../reporting/ProviderReportWorkspace.tsx | 5 +- .../src/features/reporting/ReportingPage.tsx | 54 ++++++------- webui/src/styles/reporting.css | 78 +------------------ 3 files changed, 34 insertions(+), 103 deletions(-) diff --git a/webui/src/features/reporting/ProviderReportWorkspace.tsx b/webui/src/features/reporting/ProviderReportWorkspace.tsx index fe16f10..7092310 100644 --- a/webui/src/features/reporting/ProviderReportWorkspace.tsx +++ b/webui/src/features/reporting/ProviderReportWorkspace.tsx @@ -7,6 +7,7 @@ import { ContentGrid, ActionToolbar, DismissibleAlert, IconButton, MetricCard, + StatePanel, StatusBadge, hasScope, type ApiSettings, @@ -175,7 +176,7 @@ export function ProviderReportWorkspace({ settings, auth, report }: { {execution ? <> - + Generated {formatDateTime(execution.generated_at)} {report.export_formats.includes("csv") && } variant="ghost" onClick={() => void download("csv")} /> @@ -188,7 +189,7 @@ export function ProviderReportWorkspace({ settings, auth, report }: { : -
Select the parameters and run this governed report.
+ } ); diff --git a/webui/src/features/reporting/ReportingPage.tsx b/webui/src/features/reporting/ReportingPage.tsx index 1cf1d7b..8f55d64 100644 --- a/webui/src/features/reporting/ReportingPage.tsx +++ b/webui/src/features/reporting/ReportingPage.tsx @@ -25,13 +25,19 @@ import { FormGrid, ActionToolbar, Dialog, DocumentationHelpLink, DismissibleAlert, + FilterBar, IconButton, LoadingIndicator, PageScrollViewport, + StatePanel, SegmentedControl, + SelectionList, + SelectionListItem, + SelectionListItemContent, StatusBadge, ToggleSwitch, hasScope, + WorkspaceFrame, type DataGridColumn, type PlatformRouteContext } from "@govoplan/core-webui"; @@ -249,9 +255,9 @@ export default function ReportingPage({ settings, auth }: PlatformRouteContext) return (
-
- -
+ + + {reports.length + providerReports.length} reports {loading && } - {!loading && reports.length + providerReports.length === 0 &&
No active reports are available.
} -
- {providerReports.length > 0 &&
Module reports
} + {!loading && reports.length + providerReports.length === 0 && } + + {providerReports.length > 0 &&
Module reports
} {providerReports.map((item) => { const key = `${item.provider_id}:${item.report_id}`; return ( - + ); })} - {reports.length > 0 &&
Semantic reports
} + {reports.length > 0 &&
Semantic reports
} {reports.map((item) => - + )} -
+
{selectedProvider ? @@ -345,7 +345,7 @@ export default function ReportingPage({ settings, auth }: PlatformRouteContext) onQueryChange={setQuery} onParametersChange={setParameters} /> - +
- {!execution &&
Run the report or select a previous execution.
} + {!execution && } {execution && outputMode === "visual" && } {execution && outputMode === "table" && }
: -
Select a report.
+ }
@@ -398,7 +398,7 @@ export default function ReportingPage({ settings, auth }: PlatformRouteContext) />}
- + setSaveDialogOpen(false)} diff --git a/webui/src/styles/reporting.css b/webui/src/styles/reporting.css index f73111c..ea9a2fa 100644 --- a/webui/src/styles/reporting.css +++ b/webui/src/styles/reporting.css @@ -1,19 +1,10 @@ -.reporting-page, -.reporting-shell { +.reporting-page { height: 100%; min-height: 0; overflow: hidden; } -.reporting-shell { - display: flex; - flex-direction: column; - background: var(--surface); -} - -.reporting-toolbar, -.reporting-result-header, -.reporting-output-toolbar { +.reporting-result-header { display: flex; align-items: center; gap: 10px; @@ -21,21 +12,8 @@ background: var(--surface-raised); } -.reporting-toolbar { - min-height: 56px; - padding: 9px 14px; -} - .reporting-search { - display: flex; - align-items: center; - gap: 8px; - width: min(440px, 46vw); -} - -.reporting-search input { - min-width: 140px; - flex: 1; + flex: 1 1 440px; } .reporting-count { @@ -66,7 +44,6 @@ border-left: 1px solid var(--border); } -.reporting-report-list, .reporting-inspector-content section { overflow: hidden; border: 1px solid var(--border); @@ -84,7 +61,6 @@ text-transform: uppercase; } -.reporting-report-row, .reporting-inspector-content section > button { display: grid; align-items: center; @@ -97,45 +73,15 @@ cursor: pointer; } -.reporting-report-row { - grid-template-columns: 22px minmax(0, 1fr) auto; - gap: 8px; - min-height: 58px; - padding: 8px 10px; -} - -.reporting-report-row:last-child, .reporting-inspector-content section > button:last-child { border-bottom: 0; } -.reporting-report-row:hover, -.reporting-report-row:focus-visible, -.reporting-report-row.is-selected, .reporting-inspector-content section > button:hover, .reporting-inspector-content section > button.is-selected { background: var(--hover-bg); } -.reporting-report-row.is-selected { - box-shadow: inset 3px 0 0 var(--accent); -} - -.reporting-report-row > span:nth-child(2) { - display: flex; - min-width: 0; - flex-direction: column; - gap: 2px; -} - -.reporting-report-row strong, -.reporting-report-row small { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.reporting-report-row small, .reporting-inspector-content small, .reporting-inspector-content p { color: var(--text-soft); @@ -251,11 +197,6 @@ min-width: min(320px, 35vw); } -.reporting-output-toolbar { - min-height: 48px; - padding: 6px 12px; -} - .reporting-output-toolbar > span { margin-left: auto; color: var(--text-soft); @@ -288,12 +229,6 @@ min-width: 100%; } -.reporting-empty { - padding: 38px 12px; - color: var(--text-soft); - text-align: center; -} - .reporting-inspector-content { display: flex; flex-direction: column; @@ -632,13 +567,8 @@ border-bottom: 1px solid var(--border); } - .reporting-result-header, - .reporting-toolbar { + .reporting-result-header { flex-wrap: wrap; } - .reporting-search { - width: 100%; - } - }