dotnet / dotnet/aspnetcore

Handle hot reload refresh when `disableDomPreservation = true`

Open
#50,790 5 comments 1 reaction 0 assignees View on GitHub
area-blazor bug feature-hot-reload Pillar: Dev Experience Priority:3
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

The current resolution to https://github.com/dotnet/aspnetcore/issues/49144 in https://github.com/dotnet/sdk/pull/35450 triggers an enhanced navigation to force the browser to reload a statically server-side rendered page if it has been modified by a hot reload action.

Per https://github.com/dotnet/sdk/pull/35450#discussion_r1328416133, the experience doesn't work super well when DOM preservation is disabled. The result of this is as follows:

- For statically rendered pages, the page refresh is not triggered.
- For non-statically rendered pages, the notification UI (checkbox animation on the top left of the view) is not displayed since it is hooked onto the `enhancedload` event.

We should consider a fallback for this. We _could_ trigger a page refresh on the hot reload event but this takes us back to the original dilemma of being able to determine if a given page has been statically rendered or if it has any components backed by a live rendered on it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.