Skip to content

chore: remove Breadcrumbs component feature flag - #10031

Merged
sissbruecker merged 2 commits into
mainfrom
chore/remove-breadcrumbs-feature-flag
Sep 9, 2026
Merged

chore: remove Breadcrumbs component feature flag#10031
sissbruecker merged 2 commits into
mainfrom
chore/remove-breadcrumbs-feature-flag

Conversation

@totally-not-ai

@totally-not-ai totally-not-ai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

The Breadcrumbs component is no longer experimental, so the feature flag that gated it and all of its plumbing can go away. Previously, attaching a Breadcrumbs to a UI without com.vaadin.experimental.breadcrumbsComponent=true threw at attach time; now the component just works out of the box.

What changed

  • Breadcrumbs: dropped the checkFeatureFlag(UI) call from onAttach along with the private helper and the FeatureFlags import; removed the "this component is experimental" paragraph from the class Javadoc.
  • Removed BreadcrumbsFeatureFlagProvider and its META-INF/services/com.vaadin.experimental.FeatureFlagProvider registration, so the flag no longer shows up in the experimental features list.
  • Removed ExperimentalFeatureException, which existed only to report the disabled flag.
  • Tests: deleted FeatureFlagTest (it only covered enabled/disabled attach behaviour) and dropped the EnableFeatureFlagExtension registration from BreadcrumbsModeTest, which now exercises the component the way an application will.
  • Integration tests: deleted vaadin-featureflags.properties, which only contained the breadcrumbs flag entry.

No references to the flag, provider, or exception remain in the repository.

API Changes

com.vaadin.flow.component.breadcrumbs.BreadcrumbsFeatureFlagProvider

// Removed
public class BreadcrumbsFeatureFlagProvider implements FeatureFlagProvider
public BreadcrumbsFeatureFlagProvider()
public static final Feature BREADCRUMBS_COMPONENT
public List<Feature> getFeatures()

com.vaadin.flow.component.breadcrumbs.ExperimentalFeatureException

// Removed
public class ExperimentalFeatureException extends RuntimeException
public ExperimentalFeatureException() // no longer thrown; Breadcrumbs is not gated

Test summary

# Status What the test verifies Why it matters
1 A Breadcrumbs can be added to a UI with no feature flag configured and attaches without throwing This is the whole point of the change — a leftover flag check would break every application on attach
2 Router mode still registers exactly one AfterNavigationListener on attach, and manual mode registers none, with no flag enabled onAttach was edited; the listener wiring must survive removal of the flag check
3 Router mode still builds the trail from the route hierarchy (static, dynamic and query-parameter titles) after attach Guards against the attach path regressing while the flag check was stripped out
4 Detach still unregisters the navigation listener, and setMode switching on an attached instance rewires listeners/children Attach/detach lifecycle is the code path that was touched

Tests changed on this branch (no new test methods were added — this change only removes behaviour):

  • BreadcrumbsModeTest — the EnableFeatureFlagExtension registration was removed, so every existing test in the class now runs against an unflagged environment. BreadcrumbsModeTest.routerMode_attach_registersExactlyOneAfterNavigationListener and BreadcrumbsModeTest.manualMode_attach_doesNotRegisterListener cover rows 1 and 2; BreadcrumbsModeTest.routerMode_afterNavigationEvent_buildsTrailFromRouteHierarchy, BreadcrumbsModeTest.routerMode_currentViewHasDynamicTitle_usedForLastItem, BreadcrumbsModeTest.routerMode_currentItemTitle_resolvedWithQueryParameters and BreadcrumbsModeTest.routerMode_ancestorTitle_resolvedWithoutQueryParameters cover rows 1 and 3; BreadcrumbsModeTest.routerMode_detach_unregistersListener, BreadcrumbsModeTest.setModeRouter_onAttachedManualInstance_registersListenerAndBuildsTrail and BreadcrumbsModeTest.setModeManual_onAttachedRouterInstance_unregistersListenerAndClearsTrail cover row 4.
  • FeatureFlagTest.featureEnabled_attach_doesNotThrow / FeatureFlagTest.featureDisabled_attach_throws — deleted; both asserted behaviour that no longer exists.

Deliberately untested: that BreadcrumbsFeatureFlagProvider is gone from the FeatureFlagProvider service registry and that the flag no longer appears in Copilot's experimental features tab — both are absence-of-a-file facts with nothing left to assert against, verified by grep instead.

The Breadcrumbs component is no longer gated behind an experimental
feature flag, so the flag and its plumbing can be removed.

Removes the feature flag check from `Breadcrumbs`, the
`BreadcrumbsFeatureFlagProvider` and local `ExperimentalFeatureException`
classes, the `FeatureFlagProvider` SPI registration, the dedicated
`FeatureFlagTest`, the flag-enable extension in `BreadcrumbsModeTest`,
and the integration-tests `vaadin-featureflags.properties` entry.
@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

@sissbruecker
sissbruecker added this pull request to the merge queue Sep 9, 2026
Merged via the queue into main with commit 6a0689d Sep 9, 2026
18 checks passed
@sissbruecker
sissbruecker deleted the chore/remove-breadcrumbs-feature-flag branch September 9, 2026 06:49
sissbruecker added a commit that referenced this pull request Sep 9, 2026
…10058)

This PR cherry-picks changes from the original PR #10031 to branch 25.3.
---
#### Original PR description
> The `Breadcrumbs` component is no longer experimental, so the feature
flag that gated it and all of its plumbing can go away. Previously,
attaching a `Breadcrumbs` to a UI without
`com.vaadin.experimental.breadcrumbsComponent=true` threw at attach
time; now the component just works out of the box.
> 
> ## What changed
> 
> - **`Breadcrumbs`**: dropped the `checkFeatureFlag(UI)` call from
`onAttach` along with the private helper and the `FeatureFlags` import;
removed the "this component is experimental" paragraph from the class
Javadoc.
> - **Removed `BreadcrumbsFeatureFlagProvider`** and its
`META-INF/services/com.vaadin.experimental.FeatureFlagProvider`
registration, so the flag no longer shows up in the experimental
features list.
> - **Removed `ExperimentalFeatureException`**, which existed only to
report the disabled flag.
> - **Tests**: deleted `FeatureFlagTest` (it only covered
enabled/disabled attach behaviour) and dropped the
`EnableFeatureFlagExtension` registration from `BreadcrumbsModeTest`,
which now exercises the component the way an application will.
> - **Integration tests**: deleted `vaadin-featureflags.properties`,
which only contained the breadcrumbs flag entry.
> 
> No references to the flag, provider, or exception remain in the
repository.
> 
> ## API Changes
> 
> ###
com.vaadin.flow.component.breadcrumbs.BreadcrumbsFeatureFlagProvider
> 
> ```java
> // Removed
> public class BreadcrumbsFeatureFlagProvider implements
FeatureFlagProvider
> public BreadcrumbsFeatureFlagProvider()
> public static final Feature BREADCRUMBS_COMPONENT
> public List<Feature> getFeatures()
> ```
> 
> ### com.vaadin.flow.component.breadcrumbs.ExperimentalFeatureException
> 
> ```java
> // Removed
> public class ExperimentalFeatureException extends RuntimeException
> public ExperimentalFeatureException() // no longer thrown; Breadcrumbs
is not gated
> ```
> 
> ## Test summary
> 
> | # | Status | What the test verifies | Why it matters |
> |---|--------|------------------------|----------------|
> | 1 | ✅ | A `Breadcrumbs` can be added to a UI with no feature flag
configured and attaches without throwing | This is the whole point of
the change — a leftover flag check would break every application on
attach |
> | 2 | ✅ | Router mode still registers exactly one
`AfterNavigationListener` on attach, and manual mode registers none,
with no flag enabled | `onAttach` was edited; the listener wiring must
survive removal of the flag check |
> | 3 | ✅ | Router mode still builds the trail from the route hierarchy
(static, dynamic and query-parameter titles) after attach | Guards
against the attach path regressing while the flag check was stripped out
|
> | 4 | ✅ | Detach still unregisters the navigation listener, and
`setMode` switching on an attached instance rewires listeners/children |
Attach/detach lifecycle is the code path that was touched |
> 
> Tests changed on this branch (no new test methods were added — this
change only removes behaviour):
> 
> - `BreadcrumbsModeTest` — the `EnableFeatureFlagExtension`
registration was removed, so every existing test in the class now runs
against an unflagged environment.
`BreadcrumbsModeTest.routerMode_attach_registersExactlyOneAfterNavigationListener`
and `BreadcrumbsModeTest.manualMode_attach_doesNotRegisterListener`
cover rows 1 and 2;
`BreadcrumbsModeTest.routerMode_afterNavigationEvent_buildsTrailFromRouteHierarchy`,
`BreadcrumbsModeTest.routerMode_currentViewHasDynamicTitle_usedForLastItem`,
`BreadcrumbsModeTest.routerMode_currentItemTitle_resolvedWithQueryParameters`
and
`BreadcrumbsModeTest.routerMode_ancestorTitle_resolvedWithoutQueryParameters`
cover rows 1 and 3;
`BreadcrumbsModeTest.routerMode_detach_unregistersListener`,
`BreadcrumbsModeTest.setModeRouter_onAttachedManualInstance_registersListenerAndBuildsTrail`
and
`BreadcrumbsModeTest.setModeManual_onAttachedRouterInstance_unregistersListenerAndClearsTrail`
cover row 4.
> - `FeatureFlagTest.featureEnabled_attach_doesNotThrow` /
`FeatureFlagTest.featureDisabled_attach_throws` — deleted; both asserted
behaviour that no longer exists.
> 
> Deliberately untested: that `BreadcrumbsFeatureFlagProvider` is gone
from the `FeatureFlagProvider` service registry and that the flag no
longer appears in Copilot's experimental features tab — both are
absence-of-a-file facts with nothing left to assert against, verified by
grep instead.

Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants