fix: Fix missing bar chart bar when there is only one bar#2300
fix: Fix missing bar chart bar when there is only one bar#2300pulpdrew wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 3e8797c The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
PR Review
Minor: the |
Deep Review🟡 P2 -- recommended
🔵 P3 nitpicks (4)
Reviewers (4): correctness, testing, maintainability, julik-frontend-races. Testing gaps:
|
E2E Test Results✅ All tests passed • 177 passed • 3 skipped • 1237s
Tests ran across 4 shards in parallel. |
|
@claude fix these:
|
|
Claude finished @pulpdrew's task in 5m 22s —— View job Applied PR feedback
Notes
|
- Extract Y_AXIS_WIDTH constant and use it in both YAxis width prop and the single-point bar size calculation so they stay in sync - Also extract right-padding and width-ratio constants for clarity - Gate setContainerWidth on the single-point StackedBar case so other display types stay ref-only on resize and avoid unnecessary re-renders - Use functional setState to bail out when width is unchanged - Replace conditional spread with direct barSize prop (Recharts treats undefined as unset) Co-authored-by: Drew Davis <pulpdrew@users.noreply.github.com>
Summary
This PR fixes a bug which caused the bar chart to show no bars when there should be exactly 1 bar.
Screenshots or video
Closes HDX-4230