Skip to content

fix: hide likes when data is being fetched - #984

Closed
sacrosanctic wants to merge 2 commits into
npmx-dev:mainfrom
sacrosanctic:like-flashing
Closed

fix: hide likes when data is being fetched#984
sacrosanctic wants to merge 2 commits into
npmx-dev:mainfrom
sacrosanctic:like-flashing

Conversation

@sacrosanctic

Copy link
Copy Markdown
Contributor

the likes flashes a 0 briefly before showing the actual value.

I opted to just hide it for now as a quick fix.

@vercel

vercelBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

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

ProjectDeploymentActionsUpdated (UTC)
npmx.devReadyReadyPreview, CommentFeb 5, 2026 6:22am
2 Skipped Deployments
ProjectDeploymentActionsUpdated (UTC)
docs.npmx.devIgnoredIgnoredPreviewFeb 5, 2026 6:22am
npmx-lunariaIgnoredIgnoredFeb 5, 2026 6:22am

Request Review

@codecov

codecovBot commented Feb 5, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing linesPatch %Lines
app/pages/package/[...package].vue0.00%8 Missing ⚠️

📢 Thoughts on this report? Let us know!

@coderabbitai

coderabbitaiBot commented Feb 5, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Replaced optional chaining in the package page likes UI with direct property access (likesData.userHasLiked, likesData.totalLikes) and exposed the fetch status as likesStatus. Added a guard (v-if="likesStatus !== 'pending'") to avoid rendering like-related bindings while the fetch is pending, so the template assumes likesData is defined only after fetch completion.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check nameStatusExplanation
Description check✅ PassedThe description directly addresses the changeset by identifying the specific issue (likes flashing 0) and explaining the implemented solution (hiding likes during fetch).

✏️ 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.

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Comment threadapp/pages/package/[...package].vue
@btea

btea commented Feb 5, 2026

Copy link
Copy Markdown
Contributor

Perhaps adding a loading effect would be better. #982

@sacrosanctic

Copy link
Copy Markdown
ContributorAuthor

I figured this is just a quick fix for a bigger redesign down the line. Since there's a lot of UI elements being added at the moment.

@jhroemer

Copy link
Copy Markdown
Contributor

Perhaps adding a loading effect would be better. #982

I agree, a simple <SkeletonInline> with the right size would make the effect less jarring. I stumbled on the same thing @sacrosanctic btw so thanks for opening the PR.

@ghostdevv

Copy link
Copy Markdown
Member

Looks like this was resolved in #982 😅 - let me know if I'm wrong 🙏

@sacrosanctic
sacrosanctic deleted the like-flashing branch February 11, 2026 04:09
Sign up for freeto 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.

4 participants

@sacrosanctic@btea@jhroemer@ghostdevv