[dev-v5] FluentAnchorButton FluentLink - Overriding navigation behavior to utilize Blazor's features - #5081
Merged
Denis Voituron (dvoituron) merged 4 commits intoAug 7, 2026
Conversation
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
August 6, 2026 15:41
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses #5022 by changing FluentAnchorButton and FluentLink navigation to use Blazor’s navigation pipeline (avoiding full page reloads) while adding a ForceLoad parameter to opt into hard navigations when desired.
Changes:
- Added
ForceLoadparameters toFluentAnchorButtonandFluentLink, emitting aforce-load="true"attribute when enabled. - Introduced a Core.Scripts TypeScript override that replaces Fluent UI Web Components’ internal navigation with
Blazor.navigateTo(...)for same-origin URLs. - Added bUnit coverage to verify
force-loadattribute rendering for both components.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Core/Components/Link/FluentLinkTests.razor | Adds tests asserting force-load attribute output for FluentLink. |
| tests/Core/Components/Button/FluentAnchorButtonTests.razor | Adds tests asserting force-load attribute output for FluentAnchorButton. |
| src/Core/Components/Link/FluentLink.razor.cs | Introduces the ForceLoad parameter on the Blazor wrapper component. |
| src/Core/Components/Link/FluentLink.razor | Emits force-load attribute based on ForceLoad. |
| src/Core/Components/Button/FluentAnchorButton.razor.cs | Introduces the ForceLoad parameter on the Blazor wrapper component. |
| src/Core/Components/Button/FluentAnchorButton.razor | Emits force-load attribute based on ForceLoad. |
| src/Core.Scripts/src/Startup.ts | Wires the override into startup so it runs after component definition. |
| src/Core.Scripts/src/FluentUIWebComponentsOverride.ts | Adds the JS override that routes same-origin navigation through Blazor. |
| src/Core.Scripts/src/d-ts/Blazor.d.ts | Updates Blazor typings to include navigateTo and a global Blazor declaration. |
Vincent Baaij (vnbaaij)
approved these changes
Aug 6, 2026
Vincent Baaij (vnbaaij)
enabled auto-merge (squash)
August 6, 2026 15:52
Collaborator
|
LGTM :) |
Denis Voituron (dvoituron)
disabled auto-merge
August 7, 2026 07:17
Denis Voituron (dvoituron)
deleted the
users/dvoituron/dev-v/link-blazorized
branch
August 7, 2026 07:19
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.7%
Microsoft.FluentUI.AspNetCore.Components.Charts - 100%
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[dev-v5] FluentAnchorButton FluentLink - Overriding navigation behavior to utilize Blazor's features
See #5022
This update integrates Fluent UI Web Components with Blazor by overriding navigation behavior to utilize Blazor's features. It introduces a
ForceLoadparameter forFluentAnchorButtonandFluentLinkcomponents, allowing for full page navigation when needed.peek_5.mp4
Unit tests
Tests for the new
ForceLoadattribute ensure proper functionality.