Skip to content

feat: rebase + measure via getBoundingClientRect + add roundingMode prop for sub-pixel rounding control - #1

Open
jainamdhirenshah-bpi wants to merge 21 commits into
Beacon-Platform:masterfrom
jainamdhirenshah-bpi:feature.rebased-autosizer-rounding
Open

feat: rebase + measure via getBoundingClientRect + add roundingMode prop for sub-pixel rounding control#1
jainamdhirenshah-bpi wants to merge 21 commits into
Beacon-Platform:masterfrom
jainamdhirenshah-bpi:feature.rebased-autosizer-rounding

Conversation

@jainamdhirenshah-bpi

@jainamdhirenshah-bpi jainamdhirenshah-bpi commented Aug 10, 2026

Copy link
Copy Markdown
  • The existing test suites (npm test) all pass
  • For any new features or bug fixes, both positive and negative test cases have been added
  • For any new features, documentation has been added
  • For any documentation changes, the text has been proofread and is clear to both experienced users and beginners.
  • Format your code with prettier (yarn run prettier).
  • Run the Flow typechecks (yarn run typecheck).

--

As it stands right now the AutoSizer has an issue; any fractional heights/widths are rounded up. This means the child content is told it has more space to play with than the reality which can lead to overflow issues and the likes.

This change rebases the react-virtualized repo to get the latest changes and also proposes a shift to using getBoundingClientRect which consumes the fractional height/width correctly and then rounds it according to the newly exposed roundingMode prop. By default, for backwards compatibility it will use ceil which rounds upwards.

fupengl and others added 21 commits May 6, 2021 11:00
* Fix issue with unused import being emitted

* Fix import
* Fix grid roles for accessbility

* Add test for gridcell role
Co-authored-by: Anton Dubrouski <anton.dubrouski@softnetix.io>
This ensures the AutoSizer will render properly even when browser zoom is <= 80%
@jainamdhirenshah-bpi jainamdhirenshah-bpi changed the title Feature.rebased autosizer rounding feat: rebase + measure via getBoundingClientRect + add roundingMode prop for sub-pixel rounding control Aug 10, 2026
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.