Add BarChartSkeleton and LineChartSkeleton components#6142
Open
Add BarChartSkeleton and LineChartSkeleton components#6142
Conversation
Add reusable skeleton components for chart loading states: - BarChartSkeleton: Y-axis, grid lines, animated bars, X-axis labels, legend - LineChartSkeleton: SVG-based with distribution curves, grid lines Both components match Recharts dimensions for seamless loading transitions. Includes Storybook stories for documentation and visual testing.
simeonlee
added a commit
that referenced
this pull request
Feb 4, 2026
simeonlee
added a commit
that referenced
this pull request
Feb 4, 2026
- Update skeleton heights from h-72 to h-80 to match ChartContainer - Replace text-only Suspense fallbacks with proper skeleton components - BarChartSkeleton for ModelUsage, LineChartSkeleton for ModelLatency
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| <Skeleton className="h-4 w-20" /> | ||
| <Skeleton className="h-4 w-24" /> | ||
| <Skeleton className="h-4 w-16" /> | ||
| </div> |
There was a problem hiding this comment.
Skeleton legend placement causes layout shift on load
Medium Severity
The skeleton components place the legend section outside the h-80 chart container with additional pt-6 padding, while the actual Recharts ChartLegend renders inside the ChartContainer with h-80. This makes the skeleton taller than the loaded chart, causing a visible layout shift when data loads - contradicting the PR's stated goal of "seamless loading transitions."
Additional Locations (1)
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.


Summary
Adds reusable skeleton components for chart loading states:
Both match Recharts ChartContainer dimensions (h-80) for seamless loading transitions.
Usage:
ModelUsage: Uses BarChartSkeleton in Suspense fallbackModelLatency: Uses LineChartSkeleton in Suspense fallbackScreenshots
BarChartSkeleton
LineChartSkeleton
Test plan
Related
Note
Low Risk
Low risk UI-only change that swaps simple text loading fallbacks for new skeleton components; main risk is minor layout/visual regressions during loading states.
Overview
Introduces reusable chart loading skeletons (
BarChartSkeleton,LineChartSkeleton) with Storybook stories, providing structured placeholders (axes/grid/legend) that mirror Recharts layout.Updates
ModelUsageandModelLatencyto use these skeletons asSuspensefallbacks instead of plain "Loading…" text, improving perceived responsiveness during data fetches.Written by Cursor Bugbot for commit 3ea833c. This will update automatically on new commits. Configure here.