Upgrade AG Grid and enhance the data viewer - #1765
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 |
| column.lockVisible = true; | ||
| column.floatingFilter = false; | ||
| column.suppressSizeToFit = true; | ||
| column.flex = 0; |
There was a problem hiding this comment.
Change column.flex = 0 to column.initialFlex = 0 should preserve the column width for the row-indicator/name column.
There was a problem hiding this comment.
Confirmed and fixed in e2033d5. I reproduced the case from your PR comment: Size to content → Filters → reopen changed the row-name width from 51px back to 100px. Switching to initialFlex = 0 prevents filter toggles from reintroducing flex: 0 into the resized column's saved state, so its chosen width is restored correctly.
I also made Reset view explicitly restore the row-name column's initial width, since AG Grid skips width restoration when the reset state contains flex: 0.
Chrome checks pass for numeric and long character row names, covering content sizing, manual widths, filter toggles/application, repeated reloads, Reset, and fit-width during scrolling/resizing in paged/unpaged on-demand and file-backed viewers. No browser errors or AG Grid validation warnings. 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.