User Interface low complexity frontendmobile
0
Dependencies
1
Dependents
0
Entities
0
Integrations

Description

UI control allowing the user to choose between available export formats (Excel, CSV, PDF). Displays format descriptions and compatibility notes for Bufdir's current template requirements.

Feature: Bufdir Reporting & Export

bufdir-export-format-selector

Summaries

The Export Format Selector empowers administrators to choose the output format that best fits their workflow when preparing Bufdir submissions, whether that is Excel for further editing, CSV for data processing, or PDF for archival and formal submission. By surfacing format descriptions and explicit compatibility notes against Bufdir's current template requirements, the component prevents administrators from selecting a format that will be rejected at submission time, avoiding wasted effort and report regeneration cycles. Clarity at the format selection stage reduces support tickets, increases first-submission success rates, and contributes to an overall experience of a polished, professional platform that guides users toward correct actions rather than leaving them to discover compatibility constraints through trial and error.

This is a low-complexity UI widget with no external dependencies, making it straightforward to deliver early in the sprint cycle. The primary planning consideration is keeping the list of available formats and their compatibility notes synchronised with Bufdir's actual current requirements, which may change between reporting cycles. A mechanism for disabling formats via disableFormat(format, reason) provides a lightweight way to surface compatibility changes without a code release, provided the calling screen or configuration layer can supply updated availability data. Testing should verify that format selection state is correctly emitted, that disabled formats display appropriate messaging, and that the widget resets cleanly when re-rendered.

Because this widget has no shared flag, its API surface only needs to satisfy the Bufdir export screen, keeping scope well contained. Estimate a quarter-sprint for implementation.

BufdirExportFormatSelector is a stateless-friendly UI widget targeting frontend and mobile execution contexts. setAvailableFormats(List formats) populates the selectable options at mount time, allowing the parent screen to control which formats are offered based on runtime configuration or feature flags. disableFormat(ExportFormat format, String reason) marks a specific format as unavailable with a human-readable explanation rendered inline, useful for deprecating a format or signalling a temporary backend limitation without removing the option from the UI entirely. onFormatSelected(ExportFormat format) is a callback prop that fires immediately on user interaction, and getSelectedFormat() provides synchronous read access for imperative callers.

The ExportFormat enum should be defined in a shared types module to avoid duplication between this widget, the export trigger screen, and the backend service layer. Consider persisting the last-used format selection in local storage so returning users do not need to re-select on every export session. Ensure disabled format items are visually distinct and accessible, with ARIA disabled attributes and sufficient contrast for the reason text.

Responsibilities

  • Present available export formats with descriptions
  • Track and emit the user's format selection
  • Indicate which formats are compatible with Bufdir's current template

Interfaces

onFormatSelected(ExportFormat format)
getSelectedFormat()
setAvailableFormats(List<ExportFormat> formats)
disableFormat(ExportFormat format, String reason)

Relationships

Dependents (1)

Components that depend on this component