Skip to content

feat: new action export to csv for selection#2286

Open
emigun wants to merge 1 commit intomasterfrom
batch-export-csv
Open

feat: new action export to csv for selection#2286
emigun wants to merge 1 commit intomasterfrom
batch-export-csv

Conversation

@emigun
Copy link
Member

@emigun emigun commented Mar 25, 2026

Description

New action: a selection of datasets can be exported to CSV using the user's saved column settings or default columns.

New function translateComponentLabel to be able to get header names in the same way as the pipe without duplicating code.

image

Motivation

There already exists a "Save data" -> CSV in the table, this however only export the visible datasets. With this new functionality, a user can select datasets from different views, add them to "Selection" and then export.

Tests included

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)

Summary by Sourcery

Add CSV export action for dataset selections using configured or default columns and shared translation logic for column headers.

New Features:

  • Allow users to export the current dataset selection to CSV from the batch view using saved or default column configurations.

Enhancements:

  • Introduce shared translateComponentLabel helper to reuse component-based translation logic outside the translation pipe.
  • Ensure dataset column configuration falls back to default settings when user-specific settings are unavailable.
  • Trigger instrument fetching on batch view initialization to support CSV export formatting and related functionality.
  • Hide the CSV export action when editing a published dataset list to avoid invalid operations.

Tests:

  • Extend batch view component tests to cover CSV export behavior, column resolution and translation, and export button visibility in the template.

@emigun emigun requested a review from a team as a code owner March 25, 2026 13:44
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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.

1 participant