-
Notifications
You must be signed in to change notification settings - Fork 208
chore: Remove ResizeObserver polyfill #3790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Remove ResizeObserver polyfill #3790
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3790 +/- ##
==========================================
- Coverage 97.12% 97.12% -0.01%
==========================================
Files 844 844
Lines 24553 24553
Branches 8660 8659 -1
==========================================
- Hits 23848 23846 -2
- Misses 656 700 +44
+ Partials 49 7 -42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ee026e7 to
3ad1968
Compare
3ad1968 to
db6049a
Compare
db6049a to
0f03851
Compare
just-boris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is good and passed all our internal tests. Ready to merge
All target browsers now support the native ResizeObserver API, making the polyfill unnecessary. This change reduces bundle size and simplifies the codebase. Changes: - Remove @juggle/resize-observer from package.json dependencies - Update sticky scrollbar hook to use native ResizeObserver - Add global ResizeObserver mock in Jest setup for JSDOM compatibility - Update mock file to use native ResizeObserver types with JSDOM-compatible implementations Note that the mock file can be removed once the polyfill is also removed from @cloudscape-design/component-toolkit: cloudscape-design/component-toolkit#154
This reverts commit 9e28a7d.
feb70c5 to
ff64b1e
Compare
1fee55a
Co-authored-by: Boris Serdiuk <[email protected]>
Co-authored-by: Boris Serdiuk <[email protected]>
All target browsers now support the native ResizeObserver API, making the polyfill unnecessary: https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver#browser_compatibility.
This change reduces bundle size and simplifies the codebase.
Changes:
Note that the mock file can be removed once the polyfill is also removed from @cloudscape-design/component-toolkit: cloudscape-design/component-toolkit#154
How has this been tested?
✅ All unit tests pass.
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.