Repository navigation
fix(charts): require recharts >= 3.7.0 so chart axes stop blinking on re-render - #1261
Conversation
… re-render recharts 3.0.x/3.1.x render each XAxis/YAxis as null for one frame whenever the chart re-renders (SetXAxisSettings memoizes on the props object and returns null until a useEffect re-syncs the store). Consumers that locked recharts at 3.1.2 (metalk8s ui) show the GlobalHealthBar x-axis blinking whenever the host re-renders often, e.g. while ARTESCA downloads upgrade artifacts. 3.3.0+ registers axes in a layout effect and no longer renders null; 3.7.0 is what core-ui already locks and tests against.
Hello jbwatenbergscality,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
ℹ️ No review performedNo test review was performed: no code under test could be determined: the pull request changes no code and no tests. |
Waiting for approvalThe following approvals are needed before I can proceed with the merge:
Peer approvals must include at least 1 approval from the following list: |
|
/approve |
|
I have successfully merged the changeset of this pull request
Please check the status of the associated issue None. Goodbye jbwatenbergscality. The following options are set: approve |
TL;DR
Raise the
rechartsfloor from^3.0.2to^3.7.0. On recharts 3.0.x/3.1.x every chart axis renders asnullfor one frame each time the chart re-renders. On ARTESCA's overview, that makes the Platform Health x-axis blink about once a second while the UI downloads upgrade artifacts.core-ui's own lockfile is already on 3.7.0, so nothing changes here. The new floor makes consumers that locked 3.1.2 (metalk8s
ui, which renders the federated Platform Health bar) pick up the fixed version on their next core-ui bump.Why
recharts 3.1.2
SetXAxisSettings:3.2.0 dropped the
return null, and 3.3.0+ registers axes in auseLayoutEffect(before paint). I pinned the floor to 3.7.0, not latest: 3.8.0+ ships stricterTooltiptypes that breaktscinLineTimeSerieChartTooltip,BarchartandGlobalHealthBar(15 errors), and 3.7.0 is the version core-ui is already built and tested with.Review focus
Testing
tsc --noEmit: cleanjest: 52 suites / 623 tests pass