Skip to content

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

Merged
MackinnonBuck merged 3 commits intomainfrom
mbuck/navigation-refresh
Aug 17, 2023
Merged

[Blazor] Add APIs for "enhanced refresh"#50068
MackinnonBuck merged 3 commits intomainfrom
mbuck/navigation-refresh

Conversation

@MackinnonBuck
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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.

Comment thread src/Components/Components/src/NavigationManager.cs Outdated
Comment thread src/Components/Web.JS/src/Services/NavigationEnhancement.ts
Copy link
Copy Markdown
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
Copy Markdown
Member Author

/backport to release/8.0-rc1

@github-actions
Copy link
Copy Markdown
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