Repository navigation
Add tests for column widths and resizing - #4254
Merged
Merged
Conversation
Tests from #4005 that run on main: - 17 tests that pass. - 3 tests marked test.fails(), for behavior that #4005 changes: the measured widths of columns that aren't rendered are kept, measured widths passed via columnWidths are used as is, and an auto column next to a percentage column clamped to its maxWidth leaves a gap at the end of the grid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the tests from #4005 that run on
main, so that #4005's test changes are limited to the behavior that it changes.17 tests that pass on
main:resizable.test.tsx:columnWidthsmap discards the measured and resized widths;onColumnWidthsChange, the map only sets the initial widths;maxWidthis lowered temporarily, and whenonColumnWidthsChangeis removed;width.test.tsx, a new file:widthis used;widthchanges from a number toautois measured;minWidthexceeds it temporarily;ResizeObserverloop error;autocolumns are at least as wide as their content.virtualization.test.ts: columns outside the viewport keep their width, and disabled virtualization works with frozen columns wider than the grid.crossWindow.test.tsx: the grid works in a window withoutResizeObserver.dragFill.test.tsx: the drag handle doesn't get the column's width constraints.ssr.test.tsx: all the columns are rendered on the server when virtualization is disabled.3 tests marked
test.fails(), for behavior that #4005 changes. They failed in all three browsers in 5 local runs onmain:onColumnWidthsChange. Refactor column width and resizing handling #4005 drops it.columnWidthsis used as is, e.g., a 1500px column in a 1000px grid. Refactor column width and resizing handling #4005 measures the column again.autocolumn next to a percentage column that is clamped to itsmaxWidthis measured as if the percentage column weren't clamped, so the columns leave a gap at the end of the grid.Left in #4005:
mainonly because they check Refactor column width and resizing handling #4005's implementation: that measuring cells are observed with theResizeObserverof their window, and that column templates areautowhile a column is resized.mainin Firefox and WebKit, so they can't be markedtest.fails(): the grid narrowing with 8 or 12 columns.vp run cipasses.🤖 Generated with Claude Code