Skip to content

fix: show dependencies section even when empty#2394

Closed
C1ANCYSz wants to merge 2 commits intonpmx-dev:mainfrom
C1ANCYSz:fix/show-dependencies-empty-state
Closed

fix: show dependencies section even when empty#2394
C1ANCYSz wants to merge 2 commits intonpmx-dev:mainfrom
C1ANCYSz:fix/show-dependencies-empty-state

Conversation

@C1ANCYSz
Copy link
Copy Markdown
Contributor

@C1ANCYSz C1ANCYSz commented Apr 5, 2026

🔗 Linked issue

Resolves #2168

🧭 Context

The dependencies section in the sidebar was only rendered when a package had at least one dependency. This meant users had to look in different places depending on whether a package had deps or not, which was inconsistent.

📚 Description

  • Removed hasDependencies && from the v-if on PackageDependencies in [name].vue so the section always renders when a version is resolved
  • Added an empty state message inside PackageDependencies.vue that shows when all three dependency lists are empty
  • Added the package.dependencies.none i18n key to en.json
  • Added the package.dependencies.none i18n key to ar-EG.json

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 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 Apr 5, 2026 4:46pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Apr 5, 2026 4:46pm
npmx-lunaria Ignored Ignored Apr 5, 2026 4:46pm

Request Review

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 5, 2026

Hello! Thank you for opening your first PR to npmx, @C1ANCYSz! 🚀

Here’s what will happen next:

  1. Our GitHub bots will run to check your changes.
    If they spot any issues you will see some error messages on this PR.
    Don’t hesitate to ask any questions if you’re not sure what these mean!

  2. In a few minutes, you’ll be able to see a preview of your changes on Vercel

  3. One or more of our maintainers will take a look and may ask you to make changes.
    We try to be responsive, but don’t worry if this takes a few days.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 5, 2026

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
i18n/locales/ar-EG.json Localization changed, will be marked as complete.
i18n/locales/en.json Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c9754bbb-34c8-47b1-a4b2-3f217e48f73f

📥 Commits

Reviewing files that changed from the base of the PR and between 5324b96 and 0d7d3cf.

📒 Files selected for processing (3)
  • app/components/Package/Dependencies.vue
  • i18n/locales/ar-EG.json
  • i18n/locales/en.json

📝 Walkthrough

Walkthrough

The changes add support for displaying an empty-state message in the Dependencies component when no dependencies exist across all dependency types. A conditional paragraph is introduced to the component template that renders when sortedDependencies, sortedPeerDependencies, and sortedOptionalDependencies are all empty. Translation strings have been added to the English and Arabic Egyptian locale files to provide appropriate text for this empty state.

Suggested reviewers

  • danielroe
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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
Copy Markdown

codecov Bot commented Apr 5, 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!

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.

Show dependencies in sidebar even when there are none

1 participant