Skip to content

fix: remove install size tooltip when size is not available#1721

Merged
danielroe merged 1 commit intonpmx-dev:mainfrom
sybers:fix__empty_tooltip_when_install_size_not_available
Feb 28, 2026
Merged

fix: remove install size tooltip when size is not available#1721
danielroe merged 1 commit intonpmx-dev:mainfrom
sybers:fix__empty_tooltip_when_install_size_not_available

Conversation

@sybers
Copy link
Contributor

@sybers sybers commented Feb 27, 2026

🔗 Linked issue

resolves #1694

🧭 Context

There's an empty tooltip when the install size isn't available for a given package.

📚 Description

Adds a v-if if the tooltip text is empty so we don't render it!

CleanShot 2026-02-27 at 23 35 10@2x

@vercel
Copy link

vercel bot commented Feb 27, 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 27, 2026 10:35pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 27, 2026 10:35pm
npmx-lunaria Ignored Ignored Feb 27, 2026 10:35pm

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 27, 2026

📝 Walkthrough

Walkthrough

The change adds conditional rendering to the install size tooltip component in the package page. The TooltipApp component is now wrapped with a v-if directive that checks for the presence of sizeTooltip text, preventing the tooltip from being rendered when it contains no content. This addresses the issue where empty tooltips were appearing on hover by ensuring the component only renders when there is actual tooltip text to display.

Possibly related PRs

  • PR 883: Touches install-size tooltip rendering on the package page and shares the same TooltipApp component usage pattern.
  • PR 919: Modifies the install-size and info tooltip structure on the package page with related rendering changes.
  • PR 1357: Modifies install-size rendering in the same file with conditional logic controlling when content displays.

Suggested reviewers

  • danielroe
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The pull request directly addresses the objective from issue #1694 by preventing empty tooltip rendering when install size is unavailable, matching the stated requirement.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the install size tooltip conditional rendering, directly addressing the linked issue without introducing unrelated modifications.
Description check ✅ Passed The pull request description clearly relates to the changeset, explaining the issue (empty tooltip when install size unavailable) and the fix (adding v-if conditional).

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

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.

❤️ Share

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

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@danielroe danielroe changed the title fix: remove install size tooltip when size is not available (closes #1694) fix: remove install size tooltip when size is not available Feb 28, 2026
@danielroe danielroe added this pull request to the merge queue Feb 28, 2026
Merged via the queue into npmx-dev:main with commit 78a64c7 Feb 28, 2026
20 checks passed
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.

Empty install size and empty tooltip on hover

2 participants