Skip to content

feat: load package like data add loading effect#982

Open
btea wants to merge 1 commit intonpmx-dev:mainfrom
btea:feat/package-like-add-loading
Open

feat: load package like data add loading effect#982
btea wants to merge 1 commit intonpmx-dev:mainfrom
btea:feat/package-like-add-loading

Conversation

@btea
Copy link
Contributor

@btea btea commented Feb 5, 2026

When the network speed is slow, you can see a loading effect on the left-hand tabs.

However, the "like" data on the right-hand side defaults to 0, only suddenly changing to the returned number after loading is complete, which looks rather abrupt. Adding a loading effect, similar to the left-hand side, would look much better.

@vercel
Copy link

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 5, 2026 3:23am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 5, 2026 3:23am
npmx-lunaria Ignored Ignored Feb 5, 2026 3:23am

Request Review

@codecov
Copy link

codecov bot commented Feb 5, 2026

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
app/pages/package/[...package].vue 0.00% 6 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 5, 2026

📝 Walkthrough

Walkthrough

This change enhances the user experience for like data fetching in the package detail page by introducing explicit handling of loading states. A separate status indicator (likeStatus) and derived loading flag (isLoadingLikeData) are added to distinguish between loading, success, and error states. The UI now displays a loading spinner within the likes tooltip whilst data is being fetched and hides the like button during this period. A CSS alignment class is also added to the tooltip wrapper.

Possibly related PRs

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining the motivation for adding a loading effect to the like data display.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant