Report Summary Metrics Widget
Component Detail
Description
Inline summary widget displayed per report entry showing key figures extracted at generation time — total activities, total hours, and participants reached. Supports year-over-year trend comparison without requiring a full re-export.
report-summary-metrics-widget
Summaries
The Report Summary Metrics Widget surfaces the three figures decision-makers care about most — total activities, total hours, and participants reached — directly within the report history list, eliminating the need to re-open or re-export a report just to answer a quick operational question. The year-over-year trend indicator adds strategic value by making performance trajectories immediately visible, supporting grant reporting, board updates, and funding conversations without additional analyst work. This self-service capability reduces dependency on specialised staff and shortens the time from question to insight, improving organisational agility.
A low-complexity, self-contained widget with no service dependencies beyond the data already loaded for the parent list entry. Development is straightforward: three metric display slots and a trend indicator driven by pre-computed values stored at report generation time. The key planning dependency is ensuring the bufdir-report-record schema captures the previous-period snapshot values needed by renderTrendIndicator(current, previous) — this must be agreed with the data modelling team before widget development begins. Testing should cover zero-value metrics, very large numbers, and cases where previous-period data is absent (first report).
Mobile and web rendering parity must be validated.
Report Summary Metrics Widget is a stateless display component consuming pre-computed aggregates from the bufdir-report-record model — specifically total_activities, total_hours, and participants_reached fields alongside their prior-period equivalents. formatMetric(value, label) handles localised number formatting and unit labelling. renderTrendIndicator(current, previous) computes percentage delta and selects an up/down/neutral icon; guard against division-by-zero when previous is null or zero. The widget executes in both frontend and mobile contexts, so rely only on platform-agnostic Flutter primitives.
No state management, network calls, or side effects are expected inside this component.
Responsibilities
- Display total activities count for the report period
- Display total hours registered
- Display participants reached count
- Format metrics for at-a-glance readability
Interfaces
build(context)
formatMetric(value, label)
renderTrendIndicator(current, previous)