Skip to content

chore: added export example (#DS-4945) - #197

Merged
artembelik merged 1 commit into
mainfrom
chore/DS-4945
Jul 21, 2026
Merged

chore: added export example (#DS-4945)#197
artembelik merged 1 commit into
mainfrom
chore/DS-4945

Conversation

@artembelik

@artembelik artembelik commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added an export demonstration page accessible through the E2E routes.
    • Added options to download displayed grid data as CSV, XLSX, or PDF.
    • Exported data reflects the grid’s current filters, sorting, visible columns, and formatted values.

@artembelik artembelik self-assigned this Jul 21, 2026
Copilot AI review requested due to automatic review settings July 21, 2026 12:47
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Export demo

Layer / File(s) Summary
Component entry and grid setup
dev/ag-grid-angular/src/main.ts, dev/ag-grid-angular/src/tests/export.ng.ts
Adds the DevExport standalone component, AG Grid setup, export buttons, grid state capture, and lazy-loaded /e2e/export route.
Export format generation
dev/ag-grid-angular/src/tests/export.ng.ts, package.json
Exports displayed and formatted grid data to CSV, XLSX, and landscape PDF using the added libraries.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Browser
  participant AngularRouter
  participant DevExport
  participant GridApi
  participant ExportLibraries
  Browser->>AngularRouter: Navigate to /e2e/export
  AngularRouter->>DevExport: Lazy-load component
  DevExport->>GridApi: Read displayed columns and filtered/sorted rows
  GridApi-->>DevExport: Return formatted export table
  DevExport->>ExportLibraries: Generate CSV, XLSX, or PDF
  ExportLibraries-->>Browser: Download generated file
Loading

Suggested reviewers: lskramarov, nikgurev, copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding an export example to the dev app.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/DS-4945

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
package.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit eb50f96):

https://data-grid-next--data-grid-pr-197-s8zau4i0.web.app

(expires Fri, 24 Jul 2026 12:49:03 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: b9d49913f5b5988e9af8690a8b37f16143707448

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new dev/e2e export example screen to the dev/ag-grid-angular demo app, including CSV/XLSX/PDF export actions, and wires it into the dev router.

Changes:

  • Added DevExport standalone test component that renders a grid and provides export buttons (CSV/XLSX/PDF).
  • Registered a new /export dev route to load the export example lazily.
  • Added export-related runtime dependencies (jspdf, jspdf-autotable, xlsx) and updated yarn.lock.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
yarn.lock Locks newly added export-related dependencies and transitive packages.
package.json Adds jspdf, jspdf-autotable, and xlsx dependencies needed by the new export example.
dev/ag-grid-angular/src/tests/export.ng.ts Introduces the new export demo component with CSV/XLSX/PDF generation logic.
dev/ag-grid-angular/src/main.ts Adds a new /export route to expose the export demo in dev/e2e.

Comment thread dev/ag-grid-angular/src/tests/export.ng.ts
Comment thread dev/ag-grid-angular/src/tests/export.ng.ts
Comment thread dev/ag-grid-angular/src/tests/export.ng.ts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dev/ag-grid-angular/src/tests/export.ng.ts`:
- Around line 77-79: The export handlers in
dev/ag-grid-angular/src/tests/export.ng.ts at lines 77-79 and 101-104 must guard
against an uninitialized GridApi. In downloadCsv, add an early return when
this.api is unavailable; in the export table generator, return null when either
this.api or columns is unavailable, while preserving normal export behavior for
initialized state.
- Line 44: Update the animateRows input in the affected Angular test template to
use property binding, [animateRows]="false", so the component receives a boolean
false instead of the string "false".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d6b53261-3862-4005-a372-f2017bbc0e79

📥 Commits

Reviewing files that changed from the base of the PR and between aef7fd6 and eb50f96.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (3)
  • dev/ag-grid-angular/src/main.ts
  • dev/ag-grid-angular/src/tests/export.ng.ts
  • package.json

Comment thread dev/ag-grid-angular/src/tests/export.ng.ts
Comment thread dev/ag-grid-angular/src/tests/export.ng.ts
@artembelik
artembelik merged commit 6c2511b into main Jul 21, 2026
10 checks passed
@artembelik
artembelik deleted the chore/DS-4945 branch July 21, 2026 13:02
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.

2 participants