Skip to content

Deduplicate CSV export logic#1879

Open
Eldergenix wants to merge 1 commit into
broadinstitute:mainfrom
Eldergenix:eldergenix/refactor-issue-1777-csv-export
Open

Deduplicate CSV export logic#1879
Eldergenix wants to merge 1 commit into
broadinstitute:mainfrom
Eldergenix:eldergenix/refactor-issue-1777-csv-export

Conversation

@Eldergenix
Copy link
Copy Markdown

Fixes #1777

Summary

  • Add a shared CSV export helper for table-style downloads.
  • Reuse that helper from the copy number, mitochondrial, structural, and small variant export buttons.
  • Keep each export button's dataset-specific column definitions local.
  • Add focused tests for the shared serializer and filename formatting while preserving the existing CSV output behavior.

Validation

  • corepack pnpm@8.14.3 install --frozen-lockfile - passed; no lockfile changes. The local shell used Node v22.22.0 and pnpm warned that the repo declares Node ^18.17.1.
  • corepack pnpm@8.14.3 jest --selectProjects browser --runTestsByPath browser/src/exportTableToCsv.spec.ts browser/src/VariantList/ExportVariantsButton.spec.tsx --runInBand --silent - passed, 2 suites and 44 tests.
  • corepack pnpm@8.14.3 ts-node ./browser/build/buildHelp.ts && corepack pnpm@8.14.3 typecheck - passed.
  • corepack pnpm@8.14.3 eslint browser - passed.
  • corepack pnpm@8.14.3 stylelint 'browser/**/*.(js|jsx|ts|tsx)' - passed with existing Browserslist freshness and unit-whitelist deprecation warnings.
  • corepack pnpm@8.14.3 jest --selectProjects browser --runInBand --silent - passed, 68 suites, 1771 tests, and 1144 snapshots.
  • corepack pnpm@8.14.3 --dir browser build - passed with existing webpack asset and entrypoint size warnings.
  • git diff --check - passed.

Notes

  • The shared serializer intentionally preserves the previous CSV formatting behavior so this PR stays a deduplication refactor.
  • I did not run a manual browser export smoke test; validation is from focused serializer coverage, existing export button coverage, full browser tests, typecheck, lint, stylelint, and build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deduplicate CSV exporting code

1 participant