Skip to content

feat: Global breadcrumbs feature flag - #5113

Draft
georgylobko wants to merge 3 commits into
mainfrom
feat/global-breadcrumbs-feature-flag
Draft

georgylobko wants to merge 3 commits into
mainfrom
feat/global-breadcrumbs-feature-flag

Conversation

@georgylobko

Copy link
Copy Markdown
Member

Description

Adds a feature flag that hides breadcrumbs in the AppLayout toolbar from the first render. This PR made it possible for an external consumer to take over breadcrumbs, and AppLayout then hides its own toolbar breadcrumbs. The consumer registers through an async event, though, so the breadcrumbs only get hidden after the first render, which causes a visible flicker. With this flag on, the toolbar breadcrumbs never render, so the flicker goes away.

Related links, issue #, if available: n/a

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov

codecov Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.70%. Comparing base (0e279e5) to head (acc0c77).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5113   +/-   ##
=======================================
  Coverage   97.70%   97.70%           
=======================================
  Files         990      990           
  Lines       31818    31821    +3     
  Branches    11752    11753    +1     
=======================================
+ Hits        31089    31092    +3     
  Misses        722      722           
  Partials        7        7           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

Copilot review overview

🟡 Changes recommended

Renaming the cross-version widget state key without a compatibility fallback can restore duplicate toolbar breadcrumbs in mixed-version deployments.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds a global feature flag to hide AppLayout toolbar breadcrumbs from the first render, preventing flicker before an external consumer registers.

Changes:

  • Adds and propagates appLayoutHideToolbarBreadcrumbs.
  • Renames the widgetized visibility state.
  • Adds flag behavior tests and updates contract snapshots.
File Description
src/​app-layout/​visual-refresh-toolbar/​widget-areas/​before-main-slot.tsx Passes breadcrumb visibility state to the toolbar.
src/​app-layout/​visual-refresh-toolbar/​toolbar/​index.tsx Adopts the renamed toolbar property.
src/​app-layout/​visual-refresh-toolbar/​state/​use-app-layout.tsx Combines consumer registration with the global flag.
src/​app-layout/​visual-refresh-toolbar/​skeleton/​toolbar-container.tsx Hides breadcrumbs based on the new state.
src/​app-layout/​visual-refresh-toolbar/​interfaces.ts Updates the widgetized state interface.
src/​app-layout/​utils/​feature-flags.ts Reads the new global flag.
src/​app-layout/​__tests__/​runtime-breadcrumbs-widgetized.test.tsx Tests flagged breadcrumb behavior.
src/​app-layout/​__tests__/​__snapshots__/​widget-contract-split-panel-old.test.tsx.snap Updates split-panel widget contracts.
src/​app-layout/​__tests__/​__snapshots__/​widget-contract-old.test.tsx.snap Updates widget contract snapshots.
pages/​app/​index.tsx Exposes the flag through development-page query parameters.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

widgetizedState: {
...appLayoutInternals,
breadcrumbsExternallyOwned: hasBreadcrumbsConsumer,
hideBreadcrumbsInToolbar: hasBreadcrumbsConsumer || isAppLayoutHideToolbarBreadcrumbsEnabled(),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It doesn’t cause a break, since use-app-layout loads as a widget alongside the other widget parts. There are no breaking changes here

bottomDrawerReportedSize,
featureNotificationsProps,
breadcrumbsExternallyOwned,
hideBreadcrumbsInToolbar,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Same as in the previous comment

This branch was successfully deployed

3 active deployments
dev-pages-react16 — 8ccc6975 Deployed Oct 7, 2026 by georgylobko via deploy (React 16) / deploy #2584
dev-pages-react18 — 8ccc6975 Deployed Oct 7, 2026 by georgylobko via deploy (React 18) / deploy #2584
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants