-
-
Notifications
You must be signed in to change notification settings - Fork 510
docs: fix link label rendering in mobile menu #3829
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
Conversation
WalkthroughIn docs/components/Header.vue, the template for UContentNavigation’s link-title slot was updated to render link.label instead of link.title. No control flow, data handling, or exports were modified. The change only affects which property is displayed for each link in the header navigation. Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Single-file, single-line UI binding change with no logic or structural edits; homogeneous and straightforward to verify. Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <span class="inline-flex items-center gap-0.5"> | ||
| {{ link.title }} | ||
| {{ link.label }} | ||
| </span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Retain a fallback to link.title.
Some navigation entries only define title (the default shape returned by @nuxt/content), so rendering link.label exclusively can surface blank menu rows. Keep the new label preference but fall back to title when the label is absent.
- {{ link.label }}
+ {{ link.label ?? link.title }}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <span class="inline-flex items-center gap-0.5"> | |
| {{ link.title }} | |
| {{ link.label }} | |
| </span> | |
| <span class="inline-flex items-center gap-0.5"> | |
| {{ link.label ?? link.title }} | |
| </span> |
🤖 Prompt for AI Agents
In docs/components/Header.vue around lines 93 to 95, the template currently
renders only link.label which can be undefined for entries that only provide
title; update the rendering to prefer link.label but fall back to link.title
when label is absent (e.g., use a conditional or logical-or expression to
display link.label || link.title) so menu rows are never blank.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing!
🔗 Linked issue
📚 Description
Similar to 840fe61
Before:
After:
Summary by CodeRabbit