Skip to content

[Blazor] Add APIs for "enhanced refresh" #50068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 17, 2023
Merged

Conversation

MackinnonBuck
Copy link
Member

@MackinnonBuck MackinnonBuck commented Aug 14, 2023

Add APIs for "enhanced refresh"

Adds a new API to NavigationManager to refresh the current page using enhanced navigation if possible, otherwise falling back to a full page reload.

Description

This PR adds NavigationManager.Refresh(bool forceReload = false). The page gets refreshed using enhanced navigation, if it's enabled and forceReload is false. Otherwise, a full page reload is performed.

Fixes #49414

Copy link
Member

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

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

LGTM!

I'm not familiar with the WebView bits but the changes there seem sensible.

Copy link
Member

@SteveSandersonMS SteveSandersonMS left a comment

Choose a reason for hiding this comment

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

Looks great! One question about possible replacing the NotImplementedException with a default implementation, but will leave it with you to conclude.

@MackinnonBuck
Copy link
Member Author

/backport to release/8.0-rc1

@github-actions
Copy link
Contributor

Started backporting to release/8.0-rc1: https://github.com/dotnet/aspnetcore/actions/runs/5883807131

@MackinnonBuck MackinnonBuck merged commit 31a26e0 into main Aug 17, 2023
@MackinnonBuck MackinnonBuck deleted the mbuck/navigation-refresh branch August 17, 2023 17:28
@ghost ghost added this to the 9.0-preview1 milestone Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to programmatically perform an "enhanced page refresh"
3 participants