Upgrade AG Grid and enhance the data viewer - #1765
renkun-ken wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Three moderate issues remain in filter toggling, sizing preservation, and reset sorting.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Upgrades AG Grid and enhances both data viewers with shared controls, state persistence, sizing, filtering, and improved type handling.
Changes:
- Adds column search, visibility/pinning, filters, tooltips, row counts, and sizing controls.
- Preserves compatible viewer state and migrates older sizing settings.
- Updates dependencies, documentation, changelog, and regression tests.
| File | Summary |
|---|---|
src/test/suite/dataViewer.test.ts |
Viewer regression tests |
src/session.ts |
Integrates shared viewer functionality |
src/dataViewerColumnPanel.ts |
Searchable visibility and pinning panel |
src/dataViewer.ts |
Shared viewer behavior and controls |
README.md |
Documents viewer controls |
package.json |
Updates dependencies and TypeScript |
package-lock.json |
Locks upgraded packages |
CHANGELOG.md |
Records viewer changes |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
closes #1586 |
| const gridState = { | ||
| version: state.version, | ||
| columnOrder: state.columnOrder, | ||
| columnSizing: state.columnSizing, | ||
| columnPinning: state.columnPinning, | ||
| columnVisibility: state.columnVisibility, | ||
| sort: state.sort, | ||
| filter: state.filter, | ||
| pagination: { pageSize: state.pagination?.pageSize } | ||
| }; |
There was a problem hiding this comment.
partialColumnState: true, isn't needed here?
https://www.ag-grid.com/javascript-data-grid/grid-state/#state-contents
There was a problem hiding this comment.
Yes, this is needed because saveViewerState() builds a subset of getState() for later use as initialState. Added partialColumnState: true to every saved snapshot in c7586ec. The legacy migration still marks state as partial when dropping columnSizing; its test fixture now represents the older format without either sizingMode or the partial-state flag.
Verified that the flag survives subsequent saves and reloads, and that column layout, sorting, filters, fit-width sizing, and legacy-state migration still work in paged/unpaged on-demand and file-backed viewers. All 10 viewer tests, TypeScript compilation, changed-file ESLint, and the production build pass.



Upgrade AG Grid Community from 35.2.1 to 36.2.0 and add shared controls to the on-demand and file-backed data viewers. Columns fill the viewport by default and remain fitted through scrolling, page changes, and webview resizing; content sizing runs only when requested.
Closes #1586.
Changes
View()calls. Reset restores fit-width sizing, and older saved fixed widths migrate to the new default.globdependency with compatible types.Validation
ggplot2::diamondsrows in both viewer modes, including scrolling, new blocks/pages, widening/narrowing, mode switching, reset, manual widths, and saved-state migration. No browser errors or AG Grid validation warnings.