Skip to content

fix(MVUX): Fix ablity to HR when adding/removing feed properties in model - #2830

Merged
dr1rrb merged 2 commits into
mainfrom
dev/dr/mvuxHR
Jul 2, 2025
Merged

dr1rrb merged 2 commits into
mainfrom
dev/dr/mvuxHR

Conversation

@dr1rrb

@dr1rrb dr1rrb commented Jun 25, 2025

Copy link
Copy Markdown
Member

closes unoplatform/studio#86

ugfix

Fix ablity to HR when adding/removing feed properties in model

What is the current behavior?

State is propagated only considering the original model properties

What is the new behavior?

State is propagated incrementally from each model, using a global cache of properties to ensure proper re-use / update

PR Checklist

  • Tested code with current supported SDKs
  • Docs have been added/updated which fit documentation template. (for bug fixes / features)
  • Unit Tests and/or UI Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Wasm UI Tests are not showing unexpected any differences. Validate PR Screenshots Compare Test Run results.
  • Contains NO breaking changes
  • Updated the Release Notes
  • Associated with an issue (GitHub or internal)

Other information

Internal Issue (If applicable):

@dr1rrb
dr1rrb enabled auto-merge June 26, 2025 17:14
@jeromelaban
jeromelaban requested a review from Copilot June 27, 2025 13:30

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the incremental hot-reload update for model feed properties by improving feed state transfer and caching in the BindableViewModelBase classes while updating tests and generated code accordingly.

  • Change constructor access in BindableViewModelBase and add UnregisterDisposable
  • Refactor feed property transfer logic with caching and logging improvements in HotReload support
  • Update tests to include IAsyncDisposable and adjust generated view model code for improved initialization

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Uno.Extensions.Reactive/Presentation/Bindings/BindableViewModelBase.cs Changed constructor access from public to protected and added an UnregisterDisposable method
src/Uno.Extensions.Reactive/Presentation/Bindings/BindableViewModelBase.HotReload.cs Refactored feed transfer logic by introducing a property feeds cache and updating error/log handling
src/Uno.Extensions.Reactive/Core/Internal/StateStore.cs Fixed minor comment typos
src/Uno.Extensions.Reactive.Tests/IntegrationTests/Given_HotReload.cs Updated test models to implement IAsyncDisposable and added new hot-reload scenarios
src/Uno.Extensions.Reactive.Generator/Bindables/ViewModelGenTool_3.cs Adjusted generated code with conditional compilation and improved model initialization
Comments suppressed due to low confidence (1)

src/Uno.Extensions.Reactive/Presentation/Bindings/BindableViewModelBase.cs:43

  • Changing the constructor access from public to protected prevents direct instantiation of BindableViewModelBase; please confirm that this design change is intentional.
	protected BindableViewModelBase()

Co-authored-by: Copilot <[email protected]>
@Jen-Uno
Jen-Uno self-requested a review July 2, 2025 20:59

@Jen-Uno Jen-Uno left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Confirmed with David that the unit tests are sufficient to catch any issues, Approving the PR so that we can move it to testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[HotReload][Mvux] Changing Model>State Name results in HotReloadException

3 participants