Skip to content

Add hideDivider prop to NavList.Group#8086

Open
TylerJDev wants to merge 1 commit into
mainfrom
tylerjdev/add-navlist-hide-divider-prop
Open

Add hideDivider prop to NavList.Group#8086
TylerJDev wants to merge 1 commit into
mainfrom
tylerjdev/add-navlist-hide-divider-prop

Conversation

@TylerJDev

Copy link
Copy Markdown
Member

Closes https://github.com/github/primer/issues/5407

Adds hideDivider prop to NavList.Group to allow consumers to toggle showing a divider when NavList.Group is rendered.

NavList.Group with divider NavList.Group without divider (hideDivider prop)
Screen capture of NavList component with groups. Shown is multiple links grouped into sections, divided by a visual line (divider) Screen capture of NavList component with groups. Shown is multiple links grouped into sections, without a visual divider

Changelog

New

  • Adds hideDivider prop to NavList.Group

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@TylerJDev TylerJDev requested a review from a team as a code owner June 29, 2026 20:03
@TylerJDev TylerJDev requested review from Copilot and joshblack June 29, 2026 20:03
@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: eb3db75

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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

@github-actions github-actions Bot added the staff Author is a staff member label Jun 29, 2026
@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jun 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. If this doesn't work, you can also use the original workflow here. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

Copilot AI left a comment

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.

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?: boolean prop to NavList.Group.
  • Updated rendering so the leading ActionList.Divider is conditional on hideDivider.
  • 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 joshblack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@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 👀

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

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm integration-tests: skipped manually Changes in this PR do not require an integration test staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants