feat(table): configure csvSeparator through controls - #524
Merged
Conversation
Contributor
|
@aradhyacp is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
18 tasks
Contributor
Author
|
@farnabaz I’ve made the changes as we discussed Thanks for pointing this out. This type of configuration makes a lot more sense for Streamdown and is much more useful than having it as a component-level prop. Please let me know if any further changes are required. Thanks again 🤗 |
csvSeparator through controls
Add controls.table.csvSeparator (",", ";", "\t", "auto") so table CSV
copy and download share one locale-friendly setting, and make
tableDataToCSV escape against the resolved delimiter.
Co-authored-by: aradhyacp <cparadhya@proton.me>
farnabaz
force-pushed
the
enhance/csv-separator
branch
from
August 24, 2026 08:38
ebab9a7 to
363d3f9
Compare
lofcz
added a commit
to lofcz/streamdown-ng
that referenced
this pull request
Aug 24, 2026
Keep the fork's animation timeline, animateCodeBlocks path, and ControlsConfig in streamdown-context. Take unique upstream bits: inline-code animation (vercel#595), configurable download filenames (vercel#559), and table csvSeparator (vercel#524). Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is a follow-up to #524, which added configurable CSV separators and locale-aware
"auto"detection.The CSV conversion work from #524 is already implemented and remains unchanged. This PR fixes where
csvSeparatoris exposed and configured.The initial implementation added
csvSeparatoras a prop onTableCopyDropdown,TableDownloadDropdown, andTableDownloadButton. After discussion in #559, we decided thatcsvSeparatorshould be configured through the existingcontrols.tableconfiguration instead.The new API is:
This provides a single configuration for both CSV copy and CSV download actions and allows the built-in table controls to consume the setting through
StreamdownContext.Type of Change
Related Issues
Fixes #521
Closes #521
Related to #521
Related PRs:
csvSeparatorthrough controls #524)Changes Made
csvSeparator?: CSVSeparatortocontrols.table.TableCopyDropdownto readcsvSeparatorfromStreamdownContext.TableDownloadDropdownandTableDownloadButtonto readcsvSeparatorfromStreamdownContext.csvSeparatorprops.controls.table.csvSeparator.tableDataToCSVimplementation and separator handling from feat(table): configurecsvSeparatorthrough controls #524.",",";","\t", and"auto".csvSeparatoris not configured.controls.controls.table.csvSeparator.API
CSV separator configuration is now controlled through
controls.table:Supported values:
","— comma";"— semicolon"\t"— tab"auto"— locale-aware separator selectionThe default remains
",".The lower-level
tableDataToCSVutility continues to accept an explicit separator:This remains available for custom extraction and conversion implementations.
Testing
Test Coverage
Added test coverage to verify that
csvSeparatoris correctly read fromcontrols.tablefor both CSV copy and CSV download.Also manually verified the feature using the following Streamdown configuration:
Verified that the table CSV actions use the configured separator when
csvSeparatoris set throughcontrols.table.Additional Test Coverage
controls.table.csvSeparator"auto"separator throughcontrols.table.csvSeparatorScreenshots/Demos
Checklist
pnpm changeset)Changeset
Additional Notes
The CSV conversion implementation from #524 is intentionally unchanged. This PR only changes how Streamdown users configure and consume the existing functionality.
The component-level API:
has been replaced with the table-level configuration:
This keeps
csvSeparatoras a single table-level setting shared by both copy and download actions while retaining the existing lower-leveltableDataToCSV(data, separator)API.