fix(ui): hide awkward empty state for weekly downloads for new packages#1054
fix(ui): hide awkward empty state for weekly downloads for new packages#1054wojtekmaj wants to merge 3 commits intonpmx-dev:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR fixes the awkward empty state for weekly downloads on new packages by conditionally hiding the entire downloads section when no data is available. The implementation adds loading state tracking and data presence checks to determine when to show or hide the section, following the pattern used by npmjs.com.
Changes:
- Added computed property to check if weekly downloads data exists
- Added loading state to track data fetch progress
- Conditionally render the downloads section based on loading state or data presence
- Guard modal opening and button visibility with data presence checks
|
My hunch is it's more confusing to hide this entirely. We might get future bug reports like "the downloads chart is missing". Could we keep just the heading and show "No downloads yet"? 🤔 |
Good idea, I'll do this today |
Closes #1044
Too new packages now have Weekly downloads hidden:
Well established packages of course still have the section: