Activity History List
Component Detail
Description
Scrollable list section within the contact detail screen showing the contact's past activities, dates, and durations. Provides an at-a-glance record of engagement history for coordinators.
activity-history-list
Summaries
The Activity History List gives coordinators an immediate, structured view of every past interaction a contact has had with the organization — including type, date, duration, and summary — directly within the contact detail screen. This historical visibility reduces duplicate outreach, improves relationship quality, and ensures coordinators are informed before engaging members. Because this component is shared across multiple features in the application, the investment in building it once yields value across the entire product, improving staff efficiency and delivering a more professional, consistent experience to Blindeforbundet's coordinators.
As a shared component reused across multiple features, this list widget should be prioritized early in the delivery schedule to unblock dependent screens. It carries a low complexity rating but has a runtime dependency on the `contact-detail-service`, meaning integration testing requires that service to be available or properly mocked. Development effort is modest: the scrollable list, item renderer, and empty-state handler are all self-contained. The key scheduling risk is ensuring the activity data contract from the service layer is stable before UI integration begins.
A brief API design review with the backend team before implementation will prevent costly rework.
This Flutter widget integrates with `contact-detail-service` via `loadActivities(String contactId)` to retrieve a chronological list of `Activity` model instances. The `renderActivityItem(Activity activity) -> Widget` method handles per-row layout including type icon, date, duration, and summary text. An `renderEmptyState() -> Widget` fallback is required and should follow the app's shared empty-state design pattern. Because this component is flagged as shared, it should live in the shared widgets library rather than a feature-scoped directory.
Pagination or lazy loading should be considered if activity history volumes are expected to be large for long-tenured contacts.
Responsibilities
- Display a chronological list of past activities for the contact
- Show activity type, date, duration, and summary for each entry
- Handle empty state when no activities are recorded
Interfaces
build(BuildContext context)
loadActivities(String contactId)
renderActivityItem(Activity activity) -> Widget
renderEmptyState() -> Widget