Add hideDivider prop to NavList.Group#8086
Conversation
🦋 Changeset detectedLatest commit: eb3db75 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
There was a problem hiding this comment.
Pull request overview
Adds an opt-out mechanism for the visual divider that precedes NavList.Group, matching the requested consumer control while preserving the existing default behavior.
Changes:
- Added a new optional
hideDivider?: booleanprop toNavList.Group. - Updated rendering so the leading
ActionList.Divideris conditional onhideDivider. - Added unit tests and documented the new prop; included a minor-release changeset.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/NavList/NavList.tsx | Introduces hideDivider prop and conditionally renders the divider before a group. |
| packages/react/src/NavList/NavList.test.tsx | Adds tests verifying divider renders by default and is omitted when hideDivider is set. |
| packages/react/src/NavList/NavList.docs.json | Documents hideDivider in the generated docs metadata with default false. |
| .changeset/navlist-group-hide-divider.md | Declares a minor bump for the new NavList.Group prop. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0
- Review effort level: Low
joshblack
left a comment
There was a problem hiding this comment.
@TylerJDev could you add a VRT test for this? I think it'd be helpful since it is a visual prop. Let me know what you think 👀
Closes https://github.com/github/primer/issues/5407
Adds
hideDividerprop toNavList.Groupto allow consumers to toggle showing a divider whenNavList.Groupis rendered.NavList.Groupwith dividerNavList.Groupwithout divider (hideDividerprop)Changelog
New
hideDividerprop toNavList.GroupRollout strategy
Testing & Reviewing
Merge checklist