feat: add CSV export and loading/empty/error states to Custom Report Builder (Closes #419) - #576
Open
waterWang wants to merge 1 commit into
Open
Conversation
…ilder (Closes Protocol-Guild#419) - Replace alert() in handleExport with real CSV generation and download - Add isExporting loading state with spinner on the export button - Add exportError banner above the layout for failed exports - Enhance empty state with icons and contextual guidance text - Add no-columns-selected state (previously bare text) - Add useNotification integration for success/error toast feedback - Button disabled while exporting, no columns, or no records
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.
Summary
Adds report export (CSV) and proper loading/empty/error states to the Custom Report Builder page.
Changes
alert()stub inhandleExportwith real CSV generation (header + data rows, proper cell escaping for commas/quotes/newlines) and a browser download via Blob + object URLisExportingflag shows an animated spinner on the export button and disables it during exportexportErrorrenders an error banner above the layout on failed export; failure also triggers a sonner error toastVerification
npx tsc --noEmit— passesnpm run lint— 0 errors, 0 warningsnpx prettier --check— passesAcceptance Criteria
npm run lintand type build pass