Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dr1rrb
Copy link
Member

@dr1rrb dr1rrb commented Jun 25, 2025

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
Copy link

@Copilot Copilot AI left a comment

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 <175728472+Copilot@users.noreply.github.com>
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
1 participant