docs(select-menu): add heading for grouped items and update example code#6425
docs(select-menu): add heading for grouped items and update example code#6425johnson-jnr wants to merge 2 commits intonuxt:v4from
Conversation
📝 WalkthroughWalkthroughThis pull request adds documentation for SelectMenu's grouped items feature. A new subsection explains that the Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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.
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
📒 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. |
There was a problem hiding this comment.
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.
| 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.
commit: |
🔗 Linked issue
Relates to #6413
❓ Type of 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