fix: hide changelog skeleton when package has no logs (#3168) - #3170
fix: hide changelog skeleton when package has no logs (#3168)#3170jibin7jose wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe package changelog page now uses ChangesPackage changelog loading
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
gameroman
left a comment
There was a problem hiding this comment.
Please follow the PR template
|
Updated the PR description to follow the template |
🔗 Linked issue
Resolves #3168
🧭 Context
Previously, the
ChangelogSkeletonwas conditionally rendered usingv-if="!changelog && !changelogError". This caused the skeleton to remain visible permanently for packages that successfully returned from the API but simply didn't have any changelogs (like thefcypackage).This PR resolves the issue by extracting the
pendingstate fromusePackageChangelogand using it to conditionally render both the skeleton and the fallback error messages.📚 Description
pending: changelogPendingstate fromusePackageChangelog.v-if="changelogPending && !changelog && !changelogError").<template v-else-if="!changelogPending">so they don't render simultaneously while the skeleton is loading.Testing:
Tested against packages with no changelogs (e.g.,
fcy) to confirm the skeleton gracefully hides and properly shows the "Sorry, this package does not publish changelogs..." text without overlap.