fix(ContentNavigation): prevent toggling disabled parent items by SusithD · Pull Request #6122 · nuxt/ui

📝 Walkthrough

Walkthrough

This change implements disabled state handling for navigation items in a content navigation component. The playground example adds a disabled flag to the Theme navigation item and introduces a default-open prop. The runtime component propagates per-link disabled states to both accordion items and triggers, ensuring items respect both per-link and component-level disabled conditions. A new test verifies that disabled parent items with children remain non-interactive when clicked.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: preventing toggling of disabled parent items in ContentNavigation, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description clearly explains the bug being fixed, the specific changes made, and provides implementation details that align with the code changes.

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