Skip to content

docs(select-menu): add heading for grouped items and update example code#6425

Open
johnson-jnr wants to merge 2 commits intonuxt:v4from
johnson-jnr:docs/select-menu-grouped-items
Open

docs(select-menu): add heading for grouped items and update example code#6425
johnson-jnr wants to merge 2 commits intonuxt:v4from
johnson-jnr:docs/select-menu-grouped-items

Conversation

@johnson-jnr
Copy link
Copy Markdown

🔗 Linked issue

Relates to #6413

❓ 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

Following the discussion in the issue, I added a heading in the docs specifically for grouped items and updated the example code to include group labels. The content existed in the docs before but without a heading. Now with this change, it is well highlighted for users to know how to implement grouped items with labels.

📝 Checklist

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

@johnson-jnr johnson-jnr requested a review from benjamincanac as a code owner May 5, 2026 19:31
@github-actions github-actions Bot added the v4 #4488 label May 5, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

📝 Walkthrough

Walkthrough

This pull request adds documentation for SelectMenu's grouped items feature. A new subsection explains that the items property accepts an array of arrays structure, with group headings defined via objects containing a label property and type: 'label'. The corresponding code example is updated to demonstrate this pattern with explicit type: 'label' entries for group headers like "Fruits" and "Vegetables", followed by their respective items.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a heading for grouped items in select-menu documentation and updating the example code.
Description check ✅ Passed The description clearly explains the purpose of the changes, relating to issue #6413 and describing the addition of a heading and updated example code for grouped items.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

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

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/content/docs/2.components/select-menu.md`:
- Line 116: The sentence "Use the label property to name each group heading." is
misleading; update the text to explicitly state that group headings require both
type: 'label' and a label property (e.g., { type: 'label', label: 'My Group' })
so readers know to set type: 'label' in the select menu group objects; mention
the example uses both and adjust wording to "Use type: 'label' together with the
label property to name each group heading" and/or add a short example showing {
type: 'label', label: '...' } to the Select Menu group documentation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 902702b9-004f-4ba7-b44a-23741fde3c51

📥 Commits

Reviewing files that changed from the base of the PR and between 5b6f86c and 6cf8f1e.

📒 Files selected for processing (1)
  • docs/content/docs/2.components/select-menu.md

### Grouped Items
You can pass an array of arrays to the `items` prop to display separated groups of items.

Use the label property to name each group heading.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Clarify that group headings require type: 'label', not only label.

The sentence currently implies label alone defines a group heading, but your own example uses type: label plus label. Please make that explicit to avoid misuse.

✍️ Suggested doc tweak
-Use the label property to name each group heading.
+Use an item with `type: 'label'` and the `label` property to define each group heading.
📝 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.

Suggested change
Use the label property to name each group heading.
Use an item with `type: 'label'` and the `label` property to define each group heading.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/content/docs/2.components/select-menu.md` at line 116, The sentence "Use
the label property to name each group heading." is misleading; update the text
to explicitly state that group headings require both type: 'label' and a label
property (e.g., { type: 'label', label: 'My Group' }) so readers know to set
type: 'label' in the select menu group objects; mention the example uses both
and adjust wording to "Use type: 'label' together with the label property to
name each group heading" and/or add a short example showing { type: 'label',
label: '...' } to the Select Menu group documentation.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 5, 2026

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

commit: 6cf8f1e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v4 #4488

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant