Skip to content

Refresh Collection View with React Data Grid - #1142

Merged
Tomasz Naumowicz (tnaum-ms) merged 152 commits into
mainfrom
feature/rdg-migration
Dec 1, 2026
Merged

Tomasz Naumowicz (tnaum-ms) merged 152 commits into
mainfrom
feature/rdg-migration

Conversation

@tnaum-ms

@tnaum-ms Tomasz Naumowicz (tnaum-ms) commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Collection View replaces SlickGrid with React Data Grid in Table and Tree. You can browse nested results, select documents, resize columns, and copy a cell without switching to JSON or reaching for the mouse. JSON View stays independent. The extension now requires VS Code 1.123.0 or later.

What changed

  • Table: Enter or double-click an object cell to step into its fields. Level Up and the breadcrumbs take you back; keyboard step-in restores focus to the same document’s root _id cell. Objects preview their first two fields, arrays show their length, and long values ellipsize without hiding the BSON type. The cell’s accessible name gives the full type before the value.
  • Column sizing: Both views support pointer resizing and Ctrl/Cmd+Left/Right on a focused header. In Table, resizing one column keeps its neighbors still. When the pane changes size, automatic columns reflow: the content-fit measurement is capped at 320 px before spare space is distributed. Manual widths survive paging, revisiting a nested path, and switching views within the same query and panel; they are not saved across sessions.
  • Tree and Indexes: Tree virtualizes the visible Field/Value/Type rows and shows direct child counts. Click anywhere in an expandable Field cell, or press Enter, to toggle it. Replacement results start collapsed; if the focused descendant disappears, focus returns to a surviving root in the same column without stealing focus from the toolbar. Tree and Indexes share a chevron and larger click targets. Indexes detail rows animate; Tree rows do not.
  • Keyboard, Copy, and hover: Arrows and Tab navigate the grids. With Table rows selected, Escape clears the selection first; otherwise it returns to the view picker. A screen-reader hint explains this on entry. Native Copy uses the focused cell’s display text, including a preview, not its type glyph, selected documents, or raw BSON. Reduced motion or documentDB.accessibility.disableHighlightOnHover suppresses hover highlights without hiding focus or selection.
  • Document actions: A row can be browsed and selected without being a safe View/Edit/Delete target. Actions resolve against the current Table page and are withheld when a root _id is missing, untrusted after projection, duplicated on the page, or cannot round-trip safely. Document View saves now preserve explicitly supplied falsy IDs (0, false, "", null); only an absent _id takes the generate-ID path.

The host supplies grid-neutral TablePage and TreeNode models to the exact-pinned react-data-grid@7.0.0-beta.64. The extension owns the document hierarchy and expansion rather than treating RDG’s grouped TreeDataGrid as a document tree. Review fixes from #1152 are included. See the feature design and decision history and the Collection View user guide.

Verification

The migration sweep exercised 54 Collection View browser routes across light, dark, and high contrast. Packaged checks verified the grid renders and that a deliberately broken stylesheet is detected. The VSIX installed and activated on VS Code 1.123.0. Workbench checks confirmed cross-collection isolation, column sizing, native Copy, hover suppression, and the NVDA entry hint. See checks on this PR for the current head; earlier runs are not sign-off on later commits.

Still to verify in the installed workbench: full NVDA/Narrator navigation and announcements (including focus vs selection and Tree refresh), native Windows contrast themes, physical zoom/macOS Cmd-click, and live wide/deep results on the minimum supported version, including full-value inspection for projected rows without an actionable ID.

Follow-up work (not delivered here)

Quick Table/Tree improvements (#1161) covers width reset and Tree Collapse all. Pinning _id (#1159), configurable columns (#1156), page selection/checkboxes (#1155), and non-drag header commands (#776) are separate. The clipboard sequence continues with projected columns and full single-cell Copy (#1103), rectangular selection/TSV (#1158), then native selection-aware menus and typed formats (#1160). This PR does not add inline editing, Tree row selection, or cross-page/shard uniqueness checks.

The handoff index links the remaining accessibility reports, document-correctness work, and RDG upgrade coverage. The #rdg focus list identifies follow-ups filed during or after the migration; the older #grid backlog remains separate.

Closes #1101.

Post-merge description review

For 1.2.0, #1171 supersedes the display-text-only Copy behavior and delivers projected-column support. Table keeps explicitly selected headers even on empty pages, and Table and Tree copy full values as Shell Literals by default, with Display Text and Canonical Extended JSON available from the native Copy As menu. Copy still targets one cell or label at a time; rectangular selection and range-aware menus did not ship in this work.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use a font-independent 24px spacing unit per depth and cover root, child, and deep indentation in browser scenarios.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@tnaum-ms
Tomasz Naumowicz (tnaum-ms) merged commit abd0c2e into main Dec 1, 2026
16 checks passed
@tnaum-ms
Tomasz Naumowicz (tnaum-ms) deleted the feature/rdg-migration branch December 1, 2026 22:09
Tomasz Naumowicz (tnaum-ms) added a commit that referenced this pull request Dec 2, 2026
Bring in React Data Grid (#1142), Dashboard Connection Diagnostics (#1150)
and the PR report change (#1164), resolved against the connection lifecycle work.

- ClusterSession: keep guarded runWithClient queries; compute projection
  identity trust before the query and publish it with the page only after
  the current-epoch check.
- Collection View: start from main's RDG component and reapply lifecycle
  guards, unavailable handling, the disconnected overlay and the context
  lifecycle; main's dataRequestRef, settleFirstLoad and row-key targets
  replace the PR's page counter, onSettled and selectedDocumentObjectIds.
- Document View: bound save with main's own-property _id check; a missing
  _id still uses the preallocated insert identity.
- Dashboard: Connection Diagnostics uses the same bound-view guard as the
  other tree-command actions, so a retained view cannot reach a later
  connection.
- Browser harness: main's tag holds and input cases, plus afterFirst
  replies (tag holds), post/waitFor/replaceText/targeted press steps,
  checkInput: false, a hold probe bound to its release function and an
  opt-in post-release render wait. Lifecycle scenarios ported to RDG.
- Fixture types allow null for procedures whose raw output includes void;
  grid fixtures use success-only page and tree types.
- package-lock.json: three-way merged per entry; l10n regenerated; both
  1.2 release-note drafts combined (still unpublished).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

#grid [1/4] Refresh the Collection View data grid

3 participants