Skip to content

fix: handle empty package description in table row display#1763

Merged
serhalp merged 1 commit intonpmx-dev:mainfrom
vmrjnvc:fix/add-search-result-description-fallback
Feb 28, 2026
Merged

fix: handle empty package description in table row display#1763
serhalp merged 1 commit intonpmx-dev:mainfrom
vmrjnvc:fix/add-search-result-description-fallback

Conversation

@vmrjnvc
Copy link
Contributor

@vmrjnvc vmrjnvc commented Feb 28, 2026

🔗 Linked issue

Extra PR for the issue #1681

🧭 Context

In the first PR, we are not handling the scenario where the description contains only HTML tags. We would end up with empty boxes for the description package on the search page. Instead, we want to display dashes (-).

@vercel
Copy link

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

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 04bd490 and 842d5ad.

📒 Files selected for processing (1)
  • app/components/Package/TableRow.vue

📝 Walkthrough

Walkthrough

The pull request modifies the Description column rendering logic in the TableRow component. Previously, a fallback hyphen was passed through the decodeHtmlEntities function alongside the description value. The change reorders this logic so the description (or empty string) is processed first through decoding and HTML tag stripping, with the fallback hyphen only applied if the resulting processed value is empty. This prevents unnecessary processing of the fallback character.

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 explains the context and rationale for the change, directly addressing the handling of empty descriptions after HTML stripping.

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

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

@vmrjnvc vmrjnvc changed the title handle empty package description in table row display fix/handle empty package description in table row display Feb 28, 2026
@vmrjnvc vmrjnvc changed the title fix/handle empty package description in table row display fix: handle empty package description in table row display Feb 28, 2026
@codecov
Copy link

codecov bot commented Feb 28, 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!

Copy link
Member

@serhalp serhalp left a comment

Choose a reason for hiding this comment

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

Thank you!

@serhalp serhalp added this pull request to the merge queue Feb 28, 2026
Merged via the queue into npmx-dev:main with commit d822cc7 Feb 28, 2026
18 of 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.

2 participants