Skip to content

Commit ce7fa64

Browse files
authored
Upgrade AG Grid and enhance the data viewer (#1765)
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 - Add searchable column visibility and pinning controls, floating filters, clear-all filters, row counts, and full-value tooltips. Showing or hiding floating filters preserves the current column order. - Preserve compatible column layouts, sorting, filters, page sizes, and sizing modes across repeated `View()` calls. Reset restores fit-width sizing, and older saved fixed widths migrate to the new default. - Replace outdated grid/selection API usage and initialize file-backed grids after the document is ready. Share date, boolean, missing-value, and integer64 handling between viewer modes. - Update TypeScript to AG Grid's supported minimum of 5.8.3 and declare the test suite's `glob` dependency with compatible types. - Document the viewer controls and add regression tests for sizing, state restoration, schema changes, pagination, and column types. ## Validation - Production bundle, TypeScript compilation, and ESLint on changed TypeScript files pass. - Full extension suite in VS Code 1.119.0: 141 tests pass. - R data-viewer suite: 79 checks pass; native AG Grid date and bigint filter models also verified against R. - Headless Chrome checks using all 53,940 `ggplot2::diamonds` rows 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. - Chrome checks confirm floating filters render, apply, hide, and restore while preserving column order, widths/flex, pinning, visibility, and sorting. Reset clears sorting and filters and restores the default layout in paged, unpaged, and file-backed viewers.
1 parent b3c5202 commit ce7fa64

8 files changed

Lines changed: 860 additions & 283 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ detected.
1313

1414
### Bug Fixes
1515

16+
* fix(dataview): fit columns to the viewer width by default and preserve fit-width sizing when scrolling, resizing, or refreshing the viewer
17+
* fix(dataview): use supported grid and row-selection APIs in file-backed tables, initialize the grid after the document is ready, and preserve date and integer64 handling in both viewer modes
1618
* fix(console): use the workspace directory as terminal cwd when given a file URI
1719
* fix(console): preserve remote workspace configuration for R terminals created from the terminal profile
1820

@@ -31,6 +33,8 @@ detected.
3133

3234
### Features
3335

36+
* feat(dataview): upgrade AG Grid Community to 36.2.0, add searchable column pinning, inline filters and clear-all controls, row counts, saved view settings, full-value tooltips, and column sizing controls
37+
* feat(sess): migrate session watcher to WebSockets/JSON-RPC 2.0
3438
* feat(sess): migrate session watcher to Unix domain sockets / Windows named pipes with JSON Lines framing and JSON-RPC 2.0
3539
* feat: implement rstudioapi::showPrompt() and rstudioapi::askForPassword() for sess package
3640
* feat: evaluate params from YAML header in Rmd files before running code

‎README.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ Please consult the relevant installation wiki pages for your OS ([Windows](https
113113

114114
* Full support of [Remote Development](https://code.visualstudio.com/docs/remote/remote-overview) via [SSH](https://code.visualstudio.com/docs/remote/ssh), [Containers](https://code.visualstudio.com/docs/remote/containers) and [WSL](https://code.visualstudio.com/docs/remote/wsl).
115115

116+
## Exploring data
117+
118+
Call `View(x)` to open a table. The viewer loads rows on demand and applies column filters and sorting in R across the full table.
119+
120+
* **Columns** searches column names, shows or hides matching columns, and pins columns to either edge. Drag entries to reorder them. Row names stay pinned on the left.
121+
* **Filters** shows filter inputs below the headers. Press Enter to apply text and number filters; use the filter button for ranges, missing values, or combined conditions. **Clear filters** removes every column filter, including filters on hidden columns. The toolbar shows the matching and total row counts.
122+
* Columns fit the available width by default and adapt when the viewer is resized. **Size to content** sizes the currently displayed cells, up to 480 pixels, and keeps those widths; **Fit width** switches back to filling the viewer. Manually resized columns retain their widths while the remaining flexible columns share the space. Hover over a cell to see its full value.
123+
* Repeated `View()` calls for the same object retain the viewer's sizing mode, column layout, sorting, filters, and page size when the column names, order, and types are unchanged. Refreshed data starts on the first page. **Reset view** restores fit-width sizing, the default layout, filters, sorting, and configured page size.
124+
116125
## Questions, issues, feature requests, and contributions
117126

118127
* If you have a question about accomplishing something in general with the extension, please [start a discussion](https://github.com/REditorSupport/vscode-R/discussions) or [ask on Stack Overflow](https://stackoverflow.com/questions/tagged/visual-studio-code+r).

0 commit comments

Comments
 (0)