MudTable: opt-in AutoReloadOnCollectionChanged / AutoReloadOnItemPropertyChanged; package as ModelingEvolution.MudBlazor - #1
Merged
Conversation
…ertyChanged Parity with MudDataGrid (MudBlazor#11822) for MudTable: when Items implements INotifyCollectionChanged, or items implement INotifyPropertyChanged, the table re-renders on change without reassigning Items or calling StateHasChanged. Both parameters default to false, so existing behaviour is unchanged. Subscriptions follow Items reassignment and parameter changes, are released on Dispose, and a burst of notifications is coalesced into one render on the next dispatcher turn. Notifications may arrive on any thread. No effect with ServerData. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…pace, _content/MudBlazor path) Tag-triggered publish on me/X.Y.Z[.N] to nuget.modelingevolution.com and nuget.org; upstream's v* workflow is untouched. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… at site root) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…MudTableObservedRow<T>) Each rendered row observes its own item for exactly as long as the row exists (rows are keyed on the item); a change re-renders that row only. Blazor's row lifecycle is the bookkeeping: no per-table set of subscribed items, nothing to reconcile on Reset, and only visible rows (page / virtualized window) are observed. The table keeps only the INotifyCollectionChanged subscription. MudTableObservedRow<T> is internal and rendered from code (Razor tag syntax only discovers public component types). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…udBlazor#13614) (cherry picked from commit 029a592)
A consumer that also receives the upstream MudBlazor package — typically transitively via MudBlazor.Markdown or Extensions.MudBlazor.StaticInput — got two MudBlazor.dll and 'Conflicting assets with the same target path _content/MudBlazor/MudBlazor.min.css'. The packed buildTransitive targets now drop the upstream package's compile/runtime/static-web assets in any project that references ModelingEvolution.MudBlazor directly or transitively, so no per-consumer override is needed. Opt out: ModelingEvolutionMudBlazorSupersedesUpstream=false. Verified with a fresh web host referencing MudBlazor.Markdown 9.0.0 and no override: builds, deps.json lists only the fork, one MudBlazor.dll, assets served from the fork. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
MudTable<T>gains two opt-in parameters (both defaultfalse, upstream behaviour unchanged):AutoReloadOnCollectionChanged— table re-renders whenItemsraisesINotifyCollectionChanged.CollectionChanged. Subscription followsItemsreassignment / flag changes, released onDispose; notifications may arrive on any thread; a synchronous burst coalesces into one render on the next dispatcher turn. No effect withServerData.AutoReloadOnItemPropertyChanged— row-scoped: each rendered row is wrapped in an internalMudTableObservedRow<T>(keyed on the item) that observes its own item'sINotifyPropertyChangedfor exactly as long as the row exists and re-renders that row only. Blazor's row lifecycle is the bookkeeping — no per-table set of subscribed items, nothing to reconcile onReset/Clear, and only visible rows (current page / virtualized window) are observed, so cost is bounded by what's on screen, not by the collection.MudTableObservedRow<T>isinternal(not part of the public API) and rendered from code, since Razor tag syntax only discovers public component types.MudDataGrid(upstream MudDataGrid : Refresh on collection changed MudBlazor/MudBlazor#11822) for the collection half, minus its gaps (opt-in, coalesced, unsubscribed on swap/dispose).PackageId=ModelingEvolution.MudBlazor; assembly, namespace and_content/MudBlazorpath unchanged → drop-in swap of onePackageReference. Tag-triggered publish onme/X.Y.Z[.N](publish-me-nuget.yml); upstreamv*workflow untouched.MudBlazoris superseded inside the package (buildTransitive/ModelingEvolution.MudBlazor.targets, 9.7.0.4): a consumer that also receives upstreamMudBlazor— typically viaMudBlazor.MarkdownorExtensions.MudBlazor.StaticInput— would otherwise get twoMudBlazor.dlland "Conflicting assets with the same target path_content/MudBlazor/MudBlazor.min.css". The targets drop the upstream package's compile/runtime/static-web assets in every project that references the fork directly or transitively; no per-consumer override needed. Opt out:ModelingEvolutionMudBlazorSupersedesUpstream=false.Epic:
docs/epics/epic-084-mudblazor-observable/README.md(§1c).Commits
765f167first version (table-level item tracking with a HashSet) — superseded by 4cdb1ae8packaging + publish workflow (fork-only)d749d60base-path fix —StaticWebAssetBasePath=_content/MudBlazor(9.7.0.1 served assets at site root)2b79bb4row-scopedAutoReloadOnItemPropertyChanged— the design to review; for an upstream PR squash 1+4d04388dUTF-8 BOM (CICHARSETcheck),b752c4bcherry-pick of upstream Tests: Guard null picker reference in DateRangePickerMinMaxDaysTest MudBlazor/MudBlazor#13614 (pre-existing CS8602 on the runner's SDK)2646ec7buildTransitive supersede of upstreamMudBlazor(fork-only, not for upstream)Test plan
TableAutoReloadTests(12): default-off = no subscription & no re-render; add/remove/clear re-render; item change re-renders only that row (siblingMudTrrender counts unchanged); rows observe only while rendered and follow add/remove;Clear()(Reset, noOldItems) still releases every subscription via row disposal; 500-add and 500-property-change bursts → <10 renders;Itemsswap moves subscriptions; flags off → unsubscribed; dispose → unsubscribed, late notifications ignored.propsshowsBasePath=_content/MudBlazorMudBlazor.Markdown 9.0.0+ the fork, no override: builds, deps.json lists only the fork, oneMudBlazor.dll, assets served from the forkObservable/Source/ModelingEvolution.Observable.MudBlazorSample— a background thread folds add/insert/remove/in-place updates every 50 ms intoModelingEvolution.Observable.ObservableCollectionwhileMudTablerenders it; headless Chrome confirms rows and cells update with no interaction, no console/HTTP/server errors🤖 Generated with Claude Code