Fix Blazor activation render ordering and update dependencies#4318
Merged
glennawatson merged 1 commit intomainfrom Apr 2, 2026
Merged
Fix Blazor activation render ordering and update dependencies#4318glennawatson merged 1 commit intomainfrom
glennawatson merged 1 commit intomainfrom
Conversation
- Fix Blazor OnActivate notification ordering: property changes during WhenActivated (OnInitialized) were missed because change subscriptions were not wired until OnAfterRender. Added a re-render after wiring subscriptions to pick up activation-phase changes. Applied to all four Blazor component base classes. - Update TUnit 1.17.54 to 1.24.18, enable implicit usings - Update bunit 2.6.2 to 2.7.2 - Update Microsoft.SourceLink.GitHub 10.0.103 to 10.0.201 - Update Microsoft.AspNetCore.Components 8.0.24/9.0.13/10.0.3 to 8.0.25/9.0.14/10.0.5 - Update Microsoft.Testing.Extensions.CodeCoverage 18.4.1 to 18.5.2 - Update Verify.TUnit 31.13.2 to 31.14.0 - Update Microsoft.Xaml.Behaviors.Wpf to 1.1.142 (all TFMs) - Update Microsoft.Maui.Controls 10.0.41 to 10.0.51 (net10 only) - Update Xamarin.AndroidX.Preference 1.2.1.16 to 1.2.1.17 - Update Xamarin.AndroidX.Lifecycle.LiveData 2.10.0.1 to 2.10.0.2 - Update Xamarin.AndroidX.Fragment 1.8.9.1 to 1.8.9.2 - Update Xamarin.AndroidX.Collection.Jvm 1.5.0.4 to 1.5.0.5 - Update Xamarin.AndroidX.SavedState 1.4.0.1 to 1.4.0.2 - Fix TUnit 1.24 test compatibility for nullable Func assertion
ChrisPulman
approved these changes
Apr 2, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4318 +/- ##
=======================================
Coverage 89.68% 89.68%
=======================================
Files 251 251
Lines 9618 9571 -47
Branches 1460 1460
=======================================
- Hits 8626 8584 -42
+ Misses 753 747 -6
- Partials 239 240 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
What changed for end users
Blazor components (ReactiveComponentBase, ReactiveInjectableComponentBase, ReactiveLayoutComponentBase, ReactiveOwningComponentBase) had a lifecycle ordering bug where property changes made during
WhenActivatedwere not reflected in the UI. This happened because:WhenActivatedfires duringOnInitialized-- your Rx chains execute and set reactive propertiesOnAfterRender-- too late to catch changes from step 1The fix adds a
StateHasChanged()call after wiring subscriptions inOnAfterRenderso the component re-renders with the latest state from activation. This results in one additional render cycle on first load but ensures the UI is always consistent.Fixes #4317
Dependency updates
TUnit implicit usings were enabled to match TUnit 1.24 requirements. One test assertion was updated for TUnit 1.24 compatibility (nullable Func evaluation change).
Test plan