Skip to content

feat(ui): add universal data export (CSV, JSON, Markdown, SQL dump) to ResultsTab - #328

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/326-universal-data-export
Jul 12, 2026
Merged

feat(ui): add universal data export (CSV, JSON, Markdown, SQL dump) to ResultsTab#328
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/326-universal-data-export

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

Adds universal data export capabilities (DataExportService) and upgraded export menus to ResultsTab, supporting CSV, JSON, GitHub Flavored Markdown tables, and SQL INSERT dumps.

Closes #326
Part of Epic #322

Changes

  • Created DataExportService (lib/shared/services/data_export_service.dart):
    • formatCsv(columns, rows)
    • formatJson(columns, rows, {asObjectArray = true})
    • formatMarkdownTable(columns, rows) (handles escaping pipes | and \n)
    • formatSqlInsertDump(tableName, columns, rows) (handles single-quote escaping and NULL tokens)
    • formatAsync to execute large grid formatting on background worker isolates (Isolate.run) to prevent UI stutter.
    • copyToClipboard & saveToFile integrating file_selector and Clipboard.setData.
  • Upgraded ResultsTab (lib/features/main_screen/results_tab.dart):
    • Retained fast-access Copy as CSV and Copy as JSON buttons.
    • Replaced clutter with two clean dropdown action menus:
      • Copy formatted ▾ (CSV, JSON, Markdown Table, SQL INSERT Dump)
      • Save to file ▾ (CSV (.csv), JSON (.json), Markdown Table (.md), SQL INSERT Dump (.sql))

Verification

  • Ran flutter test test/shared/data_export_service_test.dart (All unit tests passed verifying exact character/quote/pipe escaping).
  • Ran flutter analyze across project (No issues found).
  • Ran full regression test suite flutter test (All 811 tests passed).

@github-actions github-actions Bot added enhancement New feature or request editor Code/SQL editor ui User interface components and widgets labels Jul 12, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 959d2a7 into dev Jul 12, 2026
4 checks passed
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Jul 12, 2026
ZhuchkaTriplesix added a commit that referenced this pull request Jul 27, 2026
feat(ui): add universal data export (CSV, JSON, Markdown, SQL dump) to ResultsTab
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/326-universal-data-export branch July 27, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

editor Code/SQL editor enhancement New feature or request ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant