[release/10.0-preview6] Flip switch for controlling navigation flow on SSR #62377
+14
−12
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.
Backport of #62358 and partial #62369 (fixing CI) to release/10.0-preview6
/cc @ilonatommy
Flip switch for controlling navigation flow on SSR
Flips the App switch for controlling the navigation flow on SSR.
Description
Switch was introduced in #61306. The PR unifies the navigation across render modes but also allows SSR code after the navigation to run. Upgrading the application could lead to unexpected behaviors, e.g. see how templates had to be changed to adjust to the new navigation: #62105. From this reason, we decided to keep the default behavior for the exception flow. It can be changed by setting
Microsoft.AspNetCore.Components.Endpoints.NavigationManager.DisableThrowNavigationException
switch. New projects will use the new way of working.Partial backport of #62369 fixes the tests that are failing on p6 branch. It was introduced in #62045. The CI was green but inside, the non-quaratined test silently failed log.
Customer Impact
It will keep the behavior same as net9, without the need to change code if users upgrade to net10.
The partial backport changes only test to let this PR merge. Tell mode.
Regression?
We introduced it with #61306 that was fixing the SSR navigation.
Risk
It's just changing the default behavior to the one from before the fix.
Verification
Packaging changes reviewed?