Bufdir Export Trigger Screen
Component Detail
Description
The primary screen presenting the single-button export experience for generating Bufdir reports. Guides the user through period selection, format choice, and initiates the export with clear progress feedback.
bufdir-export-trigger-screen
Summaries
The Bufdir Export Trigger Screen is the primary interface through which programme administrators initiate mandatory government reporting to Bufdir, Norway's Directorate for Children, Youth and Family Affairs. By presenting a streamlined single-button export experience with clear period selection and format choice, the platform removes friction from a compliance obligation that administrators must fulfil on a recurring basis. Clear progress feedback and explicit success or error dialogs ensure that users know with certainty whether a report was successfully generated before they submit it externally, reducing the risk of incomplete or duplicate submissions. A smooth, reliable export experience reflects positively on the platform's professionalism and reduces the support burden associated with failed or misunderstood report generation cycles.
This medium-complexity screen depends on two child widgets — bufdir-period-selector-widget and bufdir-export-format-selector — both of which must be complete before integration can begin. The screen itself coordinates period selection, format selection, export initiation, and multi-state progress feedback, meaning it sits at the intersection of UI state management and backend async operations. Testing must cover the full user journey including period validation failures, network errors during export generation, and successful completion with file path display. Mobile-specific considerations include handling background/foreground transitions during long-running exports and ensuring progress indicators remain accurate.
A dedicated QA pass against real Bufdir output files is advisable before release to confirm format compatibility. Plan for one sprint on the screen integration after both widgets are delivered.
BufdirExportTriggerScreen is a mobile/frontend screen component that orchestrates the Bufdir report generation flow. It renders by composing BufdirPeriodSelectorWidget and BufdirExportFormatSelector, subscribing to their onPeriodSelected and onFormatSelected callbacks to build the export request payload. onExportButtonPressed() validates that both period and format are selected, then invokes the export service with the assembled parameters, switching the UI into a loading state. displayProgress(percent, message) updates a progress indicator using incremental callbacks from the export service layer, providing real-time feedback during potentially long-running file generation.
showSuccessDialog(exportPath) presents a modal with the generated file's path and share/open options. showErrorDialog(error) renders a descriptive failure state with retry affordance. navigateToPeriodSelection() and navigateToPreview() support optional deep-linking into sub-flows. State should be managed via a dedicated ViewModel or BLoC to keep the widget tree pure and testable in isolation from the business logic.
Responsibilities
- Render the export initiation button and status indicators
- Display selected period and organisation scope before confirming export
- Show export progress and completion/error feedback
Interfaces
renderExportScreen()
onExportButtonPressed()
displayProgress(percent, message)
showSuccessDialog(exportPath)
showErrorDialog(error)
navigateToPeriodSelection()
navigateToPreview()
Relationships
Dependencies (2)
Components this component depends on