Skip to content

Drop the frozen: true alias for frozen: 'start' - #4260

Draft
nstepien wants to merge 4 commits into
mainfrom
breaking/drop-frozen-true
Draft

nstepien wants to merge 4 commits into
mainfrom
breaking/drop-frozen-true

Conversation

@nstepien

@nstepien nstepien commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Column.frozen now only accepts false, 'start', or 'end'. When 'start' and 'end' arrived in beta.60 (#4034), true stayed on as an alias for 'start' so that 6.x code kept working. 7.0.0 drops the alias. Without it, the type is just Maybe<ColumnFrozen>, and the grid no longer has to convert true to 'start'.

Breaking change

- { key: 'id', name: 'ID', frozen: true }
+ { key: 'id', name: 'ID', frozen: 'start' }

Column.frozen is false | 'start' | 'end'. true, which was accepted as an alias for 'start', is now a type error.

Changes

  • Column.frozen is typed Maybe<ColumnFrozen>, and its JSDoc no longer mentions the alias. useCalculatedColumns now uses rawColumn.frozen ?? false instead of converting true.
  • getColSpan and the column sort in useCalculatedColumns compare frozen with false first, then with 'start', since unfrozen columns are the most common, then start-frozen ones.
  • SelectColumn and the group-by columns of TreeDataGrid use frozen: 'start'.
  • README: the frozen entry drops the backward-compatibility wording, and the ColumnFrozen "See also" link points to the renamed anchor (#frozen-maybecolumnfrozen).
  • Removed the test that checked frozen: true is treated as 'start'. The other tests now use 'start'.
  • Boolean expressions such as frozen: i < 5 used to type-check because they evaluate to true | false. They are type errors now, so the website demos (ColumnSpanning, MillionCells, ScrollToCell, VariableRowHeight) and tests (colSpan, startFrozen, keyboardNavigation, scrollToCell) use i < 5 ? 'start' : false. Apps that compute frozen from a boolean need the same change.

Verification

vp run ci passes. I also built the package with vp pack and type-checked a scratch consumer against lib/index.d.ts with tsc --strict, both with and without --exactOptionalPropertyTypes: 'start', 'end', false, null, and undefined are accepted, and true is a type error.

🤖 Generated with Claude Code

`Column.frozen` now only accepts `ColumnFrozen` (`false | 'start' | 'end'`).
`true` was kept as an alias for `'start'` for backward compatibility with
6.x; it is now a type error and is no longer normalized.

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

codecov-commenter commented Oct 27, 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 99.27%. Comparing base (5e7977b) to head (f2f72b6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4260   +/-   ##
=======================================
  Coverage   99.27%   99.27%           
=======================================
  Files          44       44           
  Lines        2204     2204           
  Branches      965      965           
=======================================
  Hits         2188     2188           
  Misses         16       16           
Files with missing lines Coverage Δ
src/Columns.tsx 100.00% <ø> (ø)
src/TreeDataGrid.tsx 98.66% <ø> (ø)
src/hooks/useCalculatedColumns.ts 100.00% <100.00%> (ø)
🚀 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 3 commits October 29, 2026 03:16
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Most columns are not frozen, so they now take one comparison instead of two.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Unfrozen columns are the most common, then start-frozen ones, so `getColSpan` and the column sort now compare `frozen` with `false` first, then with `'start'`.

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

This branch has not been deployed

No deployments
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.

2 participants