Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(NavigationMenu): conditionally-rendered links #3169

Open
wants to merge 4 commits into
base: v3
Choose a base branch
from

Conversation

GalacticHypernova
Copy link

@GalacticHypernova GalacticHypernova commented Jan 24, 2025

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR introduces the possibility of conditionally rendered items in UNavigationMenu.

This improves the overall support UNavigationMenu will have to all kinds of navigations, including providing links to items that only need to exist under certain conditions.

For example, only an authorized user should see a link to their profile page.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

pkg-pr-new bot commented Jan 24, 2025

npm i https://pkg.pr.new/@nuxt/ui@3169

commit: 0890729

@GalacticHypernova GalacticHypernova marked this pull request as ready for review January 24, 2025 09:01
@benjamincanac
Copy link
Member

Not sure about this honestly, it's as easy to filter the items you provide in a computed.

@GalacticHypernova
Copy link
Author

Well, true, but I don't see the harm in having it supported natively. You can argue that a lot of features nuxt ui provides can easily be made manually.

Do you foresee any issue with this?

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