Repository navigation
fix(maui): recycling follow-ups from the v2.2.0 review - #54
Open
michaelstonis wants to merge 1 commit into
Open
michaelstonis wants to merge 1 commit into
michaelstonis wants to merge 1 commit into
Conversation
…cument the option Passing 0 to a list that had never opted in created a watcher and a PropertyChanged subscription for a list that keeps nothing. Adds the README section for the option, tests that a list which has not opted in is not watched and that opting in after rows are bound takes effect, and puts every MAUI test class through UseStellarComponents so results cannot depend on which class initialises ReactiveUI first. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation is narrowly scoped, consistent with existing watcher behavior, and covered by focused tests.
Review effort: Balanced
Findings: None
What changed in this PR
Refines MAUI recycled-row opt-in behavior, documentation, and test initialization.
Changes:
- Avoids creating watchers when setting an unconfigured list’s limit to zero.
- Adds coverage for watcher creation and late opt-in.
- Documents recycling behavior and standardizes ReactiveUI test setup.
| File | Description |
|---|---|
Stellar.Maui/MauiViewManager.cs |
Clarifies non-opted-in recycling cost. |
Stellar.Maui/Extensions/ItemsViewExtensions.cs |
Avoids unnecessary zero-limit watchers. |
Stellar.Maui.UnitTests/StellarTestBase.cs |
Documents shared ReactiveUI initialization. |
Stellar.Maui.UnitTests/MauiTestBase.cs |
Reuses the shared test base. |
Stellar.Maui.UnitTests/ItemsViewRecyclingTests.cs |
Covers watcher and late opt-in behavior. |
README.md |
Documents recycled-row binding retention. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Oct 5, 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.
Why
Follow-ups from the review of
v2.1.3...v2.2.0for the opt-in recycled-row feature (#47).What
RecycledItemViewLimit(0)no longer watches a list that never opted in. It created a watcher and aPropertyChangedsubscription for a list that keeps nothing.RecycledItemViewLimit: the default, what5corresponds to, which rows are kept, and which lifecycle hooks a kept row skips.RecycledItemViewLimit(0)on such a list does not watch it; opting in after rows are bound takes effect from their next recycle.MauiTestBasenow derives fromStellarTestBase, so every test class initialises ReactiveUI throughUseStellarComponents. Before, two bases built it differently and the outcome could depend on which class ran first.Left alone, deliberately
WeakReferenceper item view on lists that have not opted in. Removing it means a table lookup on every parent change instead, which is no cheaper.Parkingallocated before the watcher can refuse: once per over-limit view, not per recycle.Deactivatedbefore its firstActivated, and the original receives none. Fixing it needs a change toViewManager.OnLifecyclein the core library, and it only affects consumer view models implementingILifecycleEventAwareon an opted-in list.Verification
Stellar.Maui.UnitTests: 198/198 locally onnet10.0.🤖 Generated with Claude Code