You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
fix: package like fail revert status #943: Modifies like state handling in the same component (app/pages/package/[...package].vue) to address optimistic state reversal on fetch failure.
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.
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
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.
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.