Skip to content

Fix typos and outdated docs, make frozen column shadows customizable, and fix the issues found along the way - #4213

Merged
nstepien merged 15 commits into
mainfrom
typos
Oct 21, 2026
Merged

nstepien merged 15 commits into
mainfrom
typos

Conversation

@nstepien

@nstepien nstepien commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Repo-wide pass over the docs, comments, test names, and demo text, followed by fixes for the issues it uncovered.

Typos and outdated text

  • Fix typos, conjugation, and grammar mistakes, using American English and serial commas
  • Correct docs that no longer matched the code:
    • the rows JSDoc described a function from the old API
    • the editable JSDoc claimed a text editor is used by default
    • the headerRowHeight/summaryRowHeight defaults follow rowHeight when it is a number
    • the README onCellClick examples called preventGridDefault(), which has no effect on click since cells are focused on mouse down
    • RenderCheckboxProps.checked and tabIndex are optional
    • leftover SELECT mode and "selected cell" wording after the activePosition rename
    • the comment on the column resize end check, which named the wrong event
  • Document onFill
  • Move type member descriptions into JSDoc, and show the declarations with their JSDoc in the README instead of separate lists (RenderCheckboxProps, RenderSortIconProps, RenderSortPriorityProps, CalculatedColumn, CellMouseEvent/CellKeyboardEvent, RowsChangeData, Position). Render functions and SelectCellFormatter now link to their props types
  • Update outdated URLs (main.vite.dev, reactjs.org, MDN)

Changelog

  • Delete CHANGELOG.md, which stopped at v7.0.0-canary.48; the README and the website now link to GitHub releases

Customizable frozen column shadows

  • Move the shadows, the only unlayered styles, into the rdg.FrozenColumnShadow layer
  • Give them stable class names: rdg-frozen-column-shadow, plus rdg-frozen-column-shadow-start or rdg-frozen-column-shadow-end
  • Add the --rdg-frozen-column-shadow-color CSS variable, which defaults to the current color

Fixes

  • With virtualization disabled, start-frozen columns were rendered twice, with duplicate keys. This also affected the CommonFeatures export, which disables virtualization. The test that was skipped for this bug now runs, and a new test covers end-frozen columns
  • Trim layers.css to the CSS layers whose order matters, and drop three unused layers. Computed styles are unchanged in all three browsers
  • Remove the chunkImportMap workaround: build.chunkImportMap drops module preload dependency lists when base is not / vitejs/vite#23350 is fixed in Vite 8.3.4, which vite-plus 1.3.0 bundles, and the website builds identically without it
  • Fix test mistakes:
    • resize() ignored its column name
    • a colSpan assertion checked gridTemplateColumns instead of gridColumnStart
    • the scrollToCell header and summary row cases passed column indexes; they now test rows, and the "should not scroll" checks wait a frame so a wrong scroll fails at the right line
  • Fix demo bugs: the RowGrouping bronze total added up silver medals, and the CellNavigation demo never picked "Critical" or "Bug"

🤖 Generated with Claude Code

nstepien and others added 2 commits October 20, 2026 01:29
- Fix typos, conjugation, and grammar mistakes across the docs, comments, test names, and demos
- Correct docs that no longer match the code, like the `rows` and `editable` JSDoc, the `onCellClick` examples, and outdated comments
- Fix wrong PR links, a misnamed prop, and dead demo links in the changelog
- Update outdated URLs
- Use American English and serial commas consistently

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The changelog stopped at v7.0.0-canary.48, and every later version has
release notes generated on its GitHub release. Point the README and the
website to GitHub releases instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

codecov-commenter commented Oct 20, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.35%. Comparing base (b8de94e) to head (f3b1da8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4213   +/-   ##
=======================================
  Coverage   98.35%   98.35%           
=======================================
  Files          45       45           
  Lines        1951     1951           
  Branches      727      727           
=======================================
  Hits         1919     1919           
  Misses         32       32           
Files with missing lines Coverage Δ
src/Cell.tsx 100.00% <ø> (ø)
src/DataGrid.tsx 98.88% <100.00%> (ø)
src/EditCell.tsx 97.14% <ø> (ø)
src/GroupedColumnHeaderRow.tsx 100.00% <100.00%> (ø)
src/HeaderCell.tsx 98.29% <ø> (ø)
src/HeaderRow.tsx 100.00% <100.00%> (ø)
src/TreeDataGrid.tsx 94.41% <ø> (ø)
src/cellRenderers/SelectCellFormatter.tsx 100.00% <ø> (ø)
src/hooks/useActivePosition.ts 96.66% <ø> (ø)
src/hooks/useCalculatedColumns.ts 100.00% <100.00%> (ø)
... and 10 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

nstepien and others added 6 commits October 20, 2026 01:56
With virtualization disabled, the column overscan range started at index 0,
so start-frozen columns were rendered twice, with duplicate keys. This also
affected the CommonFeatures export, which disables virtualization.

Enable the test that was skipped for this bug, and add one with end-frozen columns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eight layers were used without being declared, so their order depended on
where they first appeared. Declare them in the order they already had, drop
three unused layers, and move the frozen column shadows into a layer too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- `resize()` ignored its `columnName` argument
- a colSpan assertion checked `gridTemplateColumns` instead of `gridColumnStart`
- scrollToCell: test the header and summary rows like the comments describe,
  and wait a frame before checking that the grid did not scroll

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- RowGrouping: the bronze group total added up silver medals
- CellNavigation: the random index never picked the first priority or issue type

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vitejs/vite#23350 is fixed in Vite 8.3.4, which vite-plus 1.3.0 bundles.
The website builds identically without the workaround.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nstepien nstepien changed the title Fix typos, grammar, and outdated text Fix typos and outdated docs, delete the changelog, and fix the issues found along the way Oct 20, 2026
nstepien and others added 2 commits October 20, 2026 17:06
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alamothe

Copy link
Copy Markdown

Thanks for moving the frozen column shadow into @layer rdg.FrozenColumnShadow! That gets it most of the way to being customizable. One thing is still missing: there's no stable selector for the shadow elements.

Before #3969, we could tune the shadow through --rdg-cell-frozen-box-shadow. Now the shadow elements only have hashed class names, like rdg-7-0-0-beta-62-xxxx, which change with every release. Even with the new layer, the only way to target them is a DOM-position selector, and that would break on the next upgrade.

We upgraded from beta.59 to beta.62, and the new shadow is much more prominent in our app than the old one. We'd like to tone it down to fit our design, but there's nothing stable to hook into.

Could the shadow elements get stable marker classes, like the frozen cells have (rdg-cell-frozen-start / rdg-cell-frozen-end)? For example:

  • rdg-frozen-column-shadow, plus rdg-frozen-column-shadow-start / -end

Alternatively (or as well), a CSS variable for the color would cover the most common need without any selectors:

  • --rdg-frozen-column-shadow-color, defaulting to the current light-dark(rgb(0 0 0 / 15%), rgb(0 0 0 / 40%))

Either would work for us. I'm happy to send a PR for it, separately or on top of this one, whichever you prefer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nstepien and others added 3 commits October 20, 2026 23:12
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move member descriptions into JSDoc on the types and copy the
declarations with their JSDoc into the README, and link render
functions and SelectCellFormatter to their props types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nstepien
nstepien marked this pull request as ready for review October 21, 2026 00:58
@nstepien

Copy link
Copy Markdown
Collaborator Author

@alamothe done in d2f40f9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nstepien nstepien changed the title Fix typos and outdated docs, delete the changelog, and fix the issues found along the way Fix typos and outdated docs, make frozen column shadows customizable, and fix the issues found along the way Oct 21, 2026
@nstepien
nstepien merged commit 3b44655 into main Oct 21, 2026
6 checks passed
@nstepien
nstepien deleted the typos branch October 21, 2026 01:04
if (!enableVirtualization) {
return [0, columns.length - 1];
// start-frozen columns are always rendered, so the overscan range starts after them
return [lastStartFrozenColumnIndex + 1, columns.length - 1];

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we add a test for this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

See the changes in test/browser/virtualization.test.ts

Comment thread src/style/layers.css
@@ -1,3 +1,3 @@
@layer rdg {
@layer Defaults, CheckboxInput, CheckboxIcon, CheckboxLabel, Cell, HeaderCell, SummaryCell, EditCell, Row, HeaderRow, SummaryRow, GroupedRow, Root;
@layer Defaults, Cell, HeaderCell, EditCell, Row, HeaderRow, GroupedRow, Root;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice! I think we had too many layers

Comment thread src/DataGrid.tsx
/**
* Height of the header row in pixels
* @default 35
* @default `rowHeight` when it is a number, otherwise 35

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Wonder if we can use typedoc to generate documentation. Worth enabling https://oxc.rs/blog/2026-07-22-type-aware-linting-stable.html#versioning?

@nstepien nstepien Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I use Claude to generate the docs 🤷‍♂️
What are you suggesting we enable?

@amanmahajan7 amanmahajan7 Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

#4224

What are you suggesting we enable?

please ignore

// should not scroll if scroll to column is frozen
// should not scroll if the column to scroll to is frozen
ref.current!.scrollToCell({ idx: 2 });
await nextFrame();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Were some tests failing?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think Claude added this to ensure it actually failed at the correct line/time.
So it's not to fix the test, but to ensure the test fails correctly.

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.

[Bug] Duplicate frozen column elements in DOM and key collision warning when enableVirtualization={false}

4 participants