Skip to content

remove primer_react_breadcrumbs_overflow_menu feature flag#7752

Merged
liuliu-dev merged 4 commits intomainfrom
liuliu/graduate-breadcrumbs-overflow-menu-ff
Apr 14, 2026
Merged

remove primer_react_breadcrumbs_overflow_menu feature flag#7752
liuliu-dev merged 4 commits intomainfrom
liuliu/graduate-breadcrumbs-overflow-menu-ff

Conversation

@liuliu-dev
Copy link
Copy Markdown
Contributor

https://github.com/github/feature-flag-lifecycle/issues/8423

Changelog

New

Changed

Removed

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 13, 2026

🦋 Changeset detected

Latest commit: 984e6e6

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

@liuliu-dev liuliu-dev added the Canary Release Apply this label when you want CI to create a canary release of the current PR label Apr 13, 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 Apr 13, 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. 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.

@github-actions github-actions bot temporarily deployed to storybook-preview-7752 April 13, 2026 21:53 Inactive
@primer
Copy link
Copy Markdown
Contributor

primer bot commented Apr 13, 2026

🤖 Lint issues have been automatically fixed and committed to this PR.

@github-actions github-actions bot temporarily deployed to storybook-preview-7752 April 13, 2026 22:03 Inactive
@primer-integration
Copy link
Copy Markdown

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/18531

@primer-integration
Copy link
Copy Markdown

Integration test results from github/github-ui:

Passed  CI   Passed
Passed  VRT   Passed
Passed  Projects   Passed

All checks passed!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the primer_react_breadcrumbs_overflow_menu feature flag and makes the Breadcrumbs overflow menu behavior permanently enabled, aligning the component’s behavior with the graduated feature.

Changes:

  • Removed primer_react_breadcrumbs_overflow_menu from default feature flags and eliminated useFeatureFlag gating in Breadcrumbs.
  • Updated Breadcrumbs tests and Storybook feature stories to no longer enable the removed flag explicitly.
  • Added a changeset for a minor release documenting the graduation.
Show a summary per file
File Description
packages/react/src/FeatureFlags/DefaultFeatureFlags.ts Removes the breadcrumbs overflow menu flag from the default flag set.
packages/react/src/Breadcrumbs/Breadcrumbs.tsx Removes feature-flag gating so overflow menu logic is always active.
packages/react/src/Breadcrumbs/tests/Breadcrumbs.test.tsx Drops explicit flag enabling in tests (some test descriptions still reference the flag).
packages/react/src/Breadcrumbs/Breadcrumbs.features.stories.tsx Removes FeatureFlags wrapper and updates stories to reflect always-on overflow menu behavior.
.changeset/graduate-breadcrumbs-overflow-menu.md Documents the feature flag graduation as a minor release.

Copilot's findings

Comments suppressed due to low confidence (2)

packages/react/src/Breadcrumbs/tests/Breadcrumbs.test.tsx:523

  • The surrounding test suite (describe('variant prop (feature flag on)') above this block) still references the removed feature flag. Rename the describe title to reflect the always-on behavior.
            Docs
          </Breadcrumbs.Item>
        </Breadcrumbs>,
      )
      expect(container.firstChild).toHaveAttribute('data-variant', 'normal')
    })

packages/react/src/Breadcrumbs/Breadcrumbs.tsx:253

  • handleResize only updates state when both visibleItems.length and menuItems.length change (&&). If the set of children changes but the overflow split sizes don’t both change, the component can keep stale visibleItems/menuItems and render the wrong crumbs. Consider updating when either length changes (or when the arrays differ), or resetting overflow state when childArray changes.
        if (
          (visibleItems.length !== result.visibleItems.length && menuItems.length !== result.menuItems.length) ||
          result.effectiveHideRoot !== effectiveHideRoot
        ) {
  • Files reviewed: 5/5 changed files
  • Comments generated: 2

return [rootElement, menuElement, ...visibleElements]
}
let effectiveMenuItems = [...menuItems]
// In 'menu-with-root' mode, include the root item inside the menu even if it's visible in the breadcrumbs
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

The comment says the root item should be included inside the overflow menu when it’s visible, but the code slices it out (menuItems.slice(1)) when !effectiveHideRoot. Either update the comment to match the behavior, or adjust the logic if the root is intended to appear in the menu as well.

Suggested change
// In 'menu-with-root' mode, include the root item inside the menu even if it's visible in the breadcrumbs
// When the root item remains visible in the breadcrumbs, exclude it from the overflow menu to avoid duplication.

Copilot uses AI. Check for mistakes.
Comment on lines 67 to 69
@@ -69,7 +69,6 @@ describe('Breadcrumbs', () => {
<Breadcrumbs overflow="menu">
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

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

This test description still references the removed feature flag (“with feature flag”). Update the test name to reflect the current behavior (overflow menu is no longer gated).

This issue also appears on line 518 of the same file.

See below for a potential fix:

  it('sets data-overflow attribute when overflow is menu', () => {

Copilot uses AI. Check for mistakes.
@liuliu-dev liuliu-dev added integration-tests: skipped manually Changes in this PR do not require an integration test and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Apr 14, 2026
@liuliu-dev liuliu-dev added this pull request to the merge queue Apr 14, 2026
Merged via the queue into main with commit d7380a7 Apr 14, 2026
61 checks passed
@liuliu-dev liuliu-dev deleted the liuliu/graduate-breadcrumbs-overflow-menu-ff branch April 14, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Canary Release Apply this label when you want CI to create a canary release of the current PR integration-tests: skipped manually Changes in this PR do not require an integration test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants