MudDialog: Fix Inline Dialog Title Refresh#11504
Merged
ScarletKuro merged 4 commits intoMudBlazor:devfrom Jun 23, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds automatic calls to StateHasChanged for inline dialogs so that their title and content update correctly, and includes a new unit test to verify title and progress updates.
- Forward
StateHasChangedcalls to inline dialog instances inMudDialog.razor.cs. - Add a unit test (
Dialog_TitleContent_And_ProgressBar_ShouldUpdate) inDialogTests.cs. - Introduce a test component (
InlineDialogTitleRefreshTest.razor) to simulate inline dialog behavior.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/MudBlazor/Components/Dialog/MudDialog.razor.cs | Forwards render updates to inline DialogInstance. |
| src/MudBlazor.UnitTests/Components/DialogTests.cs | Adds a new test for inline dialog title and progress updates. |
| src/MudBlazor.UnitTests.Viewer/TestComponents/Dialog/InlineDialogTitleRefreshTest.razor | New test component that drives dialog visibility, progress, and title changes. |
Comments suppressed due to low confidence (1)
src/MudBlazor.UnitTests/Components/DialogTests.cs:1365
- Uncomment or replace this with
comp1.Render();after the state changes to force a re-render before assertions—otherwise the title and progress updates may not appear in the DOM.
//comp.Render();
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #11504 +/- ##
=======================================
Coverage 91.15% 91.16%
=======================================
Files 466 466
Lines 14499 14499
Branches 2815 2815
=======================================
+ Hits 13217 13218 +1
Misses 644 644
+ Partials 638 637 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ScarletKuro
approved these changes
Jun 23, 2025
This was referenced Aug 1, 2025
Closed
This was referenced Aug 11, 2025
This was referenced Oct 6, 2025
This was referenced Nov 12, 2025
This was referenced Dec 12, 2025
Closed
Closed
This was referenced Dec 29, 2025
This was referenced Jan 9, 2026
Closed
This was referenced Feb 10, 2026
Closed
This was referenced Feb 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Description
When using an inline dialog, users are unable to access the
DialogInstanceparameter which is required for refreshing the Dialog Title via aStateHasChangedcall. This change automatically callsStateHasChangedon theDialogInstancein cases of inline dialogs, similar to howStateHasChangedis automatically called on theIDialogReferenceHow Has This Been Tested?
Visually + Unit test
Type of Changes
Checklist
dev).