Skip to content

Remove --rdg-scroll-height#3980

Merged
nstepien merged 2 commits intomainfrom
descrollitization
Feb 24, 2026
Merged

Remove --rdg-scroll-height#3980
nstepien merged 2 commits intomainfrom
descrollitization

Conversation

@nstepien
Copy link
Collaborator

Removed --rdg-scroll-height, we can rely on max-content, or calc-size() in more complex scenarios.

The resize observer callback now only reads from contentBoxSize,
no access to clientHeight/offsetHeight -> no chance to thrash layout.

I've also simplified initial width/height states, it works fine in basic testing, but if the browser zoom isn't exactly 100% then the dimensions will be wrong anyway.
Maybe it's best to wait for the RO callback?

@nstepien nstepien self-assigned this Feb 24, 2026
@nstepien nstepien marked this pull request as ready for review February 24, 2026 21:06
Copy link
Collaborator

@amanmahajan7 amanmahajan7 left a comment

Choose a reason for hiding this comment

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

LGTM

const initialHorizontalScrollbarHeight = offsetHeight - clientHeight;
const initialWidth = width - offsetWidth + clientWidth;
const initialHeight = height - initialHorizontalScrollbarHeight;
const { clientWidth, clientHeight } = gridRef.current!;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we can revisit #3873

Copy link
Collaborator Author

@nstepien nstepien Feb 24, 2026

Choose a reason for hiding this comment

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

I predicted your comment a few days earlier: #3968

@nstepien nstepien merged commit 1121164 into main Feb 24, 2026
2 checks passed
@nstepien nstepien deleted the descrollitization branch February 24, 2026 22:40
@codecov-commenter
Copy link

⚠️ 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.
⚠️ Please upload report for BASE (main@6bd962f). Learn more about missing BASE report.
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3980   +/-   ##
=======================================
  Coverage        ?   97.53%           
=======================================
  Files           ?       36           
  Lines           ?     1463           
  Branches        ?      472           
=======================================
  Hits            ?     1427           
  Misses          ?       36           
  Partials        ?        0           
Files with missing lines Coverage Δ
src/DataGrid.tsx 98.98% <100.00%> (ø)
src/hooks/useGridDimensions.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.

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.

3 participants