fix(app): migrate ChartPanel grid item to the MUI v7 Grid API - #1114
fix(app): migrate ChartPanel grid item to the MUI v7 Grid API#1114bitsbeyond wants to merge 1 commit into
Conversation
Since the MUI v7 upgrade, Grid is the former Grid2 and silently ignores the legacy item/xs props. The chart cards in the bottom panel therefore collapsed to their intrinsic width and the chart svg fell back to the visx default of 300x150 with a clipped time axis. Using the size prop restores the intended 12/6/4-column layout, matching the released app. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
|
Note on the failing checks: every GitHub Actions job on this PR fails inside
Since the workflows here trigger on
Happy to adapt this PR if you prefer a different setup. The same applies to #1115 and #1116. 🤖 Generated with Claude Code |
Problem
Since the MUI v7 upgrade (#940),
Gridis the formerGrid2and silently ignores the legacyitem/xsprops. The chart cards in the bottom chart panel therefore collapse to their intrinsic width: the chart svg falls back to the visx default of 300x150, and the time axis gets clipped.Fix
Use the
sizeprop of the new Grid API. One line; the12/6/4-column logic inmapWidth/spacingForChartCountapplies again.Verification
Measured via DevTools against a live broker: with one chart the card spans the full panel width, with two charts each card takes 50%, same as the released build.
yarn test:appunchanged (103 passing, 4 pre-existing failures).🤖 Generated with Claude Code