Skip to content
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

Fix use of ReconnectModal in Blazor templates with auto mode and global interactivity #60735

Merged
merged 2 commits into from
Mar 4, 2025

Conversation

oroztocil
Copy link
Member

@oroztocil oroztocil commented Mar 4, 2025

Fixes two issues with ReconnectModal in the Blazor project template:

  • Template configurations with options --interactivity auto and --all-interactive (aka global interactivity) use different file structure. This fixes the ReconnectModal.razor.js include path in this case, as reported in https://github.com/dotnet/AspNetCore-ManualTests/issues/3482 (after closing the original issue).
  • Having the <ReconnectModal> element in MainLayout.razor does not work with global interactivity. This moves the element to App.razor and updates the import statements in _Imports.razor accordingly, so that the JS code setting up reconnection event handlers is executed properly in all modes.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Mar 4, 2025
@oroztocil oroztocil added area-blazor Includes: Blazor, Razor Components and removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels Mar 4, 2025
@oroztocil oroztocil marked this pull request as ready for review March 4, 2025 14:00
@Copilot Copilot bot review requested due to automatic review settings March 4, 2025 14:00
@oroztocil
Copy link
Member Author

This should be backported to preview 2, if possible.

@oroztocil oroztocil requested a review from a team March 4, 2025 14:01
@oroztocil
Copy link
Member Author

oroztocil commented Mar 4, 2025

I re-tested all the template configurations manually.

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@oroztocil
Copy link
Member Author

I am also investigating this https://github.com/dotnet/AspNetCore-ManualTests/issues/3489.

@lewing lewing merged commit e512a11 into main Mar 4, 2025
27 checks passed
@lewing lewing deleted the oroztocil/fix-reconnect-ui-template branch March 4, 2025 22:26
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview3 milestone Mar 4, 2025
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.

3 participants