Open
Conversation
- Replace react-resize-detector with native ResizeObserver - Upgrade recharts ^1.8.5 → ^2.15.4 for React 17 peer support - Update chart SCSS selectors for recharts 2.x markup - Add DownloadGraph test coverage (ResizeObserver + bandwidth-limit line) - Remove react-resize-detector from catalog and package manifests
cf3d77a to
4f3382f
Compare
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.
fixes LAZ-199
Summary
DownloadGraphblocks the React 17 migration because it depends onreact-resize-detector@4.2.3andrecharts@1.8.6, both of which only supportReact 16 as a peer dependency.
This PR updates/replaces those dependencies without changing Downloads page
behaviour (expand/collapse, resize handling, recent speed history, bandwidth-limit line).
See LAZ-199 for details.
Changes
Dependency updates
react-resize-detectorfrom catalog,src/main/package.json, andsrc/renderer/package.jsonrechartsfrom^1.8.5→^2.15.4(React 17 support since 2.0.3)DownloadGraph.tsxreact-resize-detectorwith nativeResizeObserversetRefto store container ref and observe resize viaResizeObservertruthyimport (no longer needed)charts.scss.recharts-areaselectors: use.recharts-area-area/.recharts-area-curveclass names instead of:first-child/:last-childpseudo-selectors (recharts 2.x changed markup structure)Test coverage
DownloadGraph.test.tsxcovering:ResizeObservertriggers chart width updatedisconnect()called on unmountmaxBandwidthconstrains the graphConfig
vitest.config.mtsglob tovitest.config.tsprojectsAcceptance criteria
react-resize-detector@4.2.3orrecharts@1.8.6speedHistory, shows bandwidth-limit line