Skip to content

feat(reactive): add Uno.HotTesting.Reactive handwritten feed mocks (#3149) - #3154

Merged
dr1rrb merged 4 commits into
mainfrom
dev/devid/issue-3149-feed-mocks
Aug 25, 2026
Merged

dr1rrb merged 4 commits into
mainfrom
dev/devid/issue-3149-feed-mocks

Conversation

@dr1rrb

@dr1rrb dr1rrb commented Aug 24, 2026

Copy link
Copy Markdown
Member

GitHub Issue (If applicable): closes #3149

PR Type

  • Feature
  • Documentation content changes

What is the current behavior?

Uno.Extensions has no runtime helper for hand-writing MVUX view-model mocks in tests or
design-time scenarios. Developers have to assemble MVUX feed states manually and there is
no documented, reusable vocabulary for pinned feed states.

What is the new behavior?

Adds a deliberately small runtime assembly Uno.HotTesting.Reactive (assembly, package
and namespace identical) exposing FeedMock and ListFeedMock factories that build
cold, finite feeds pinned to a chosen MVUX state:

  • Undefined, Loading, Empty, Value, Error, Refreshing, Message.
  • Each subscription receives its pinned state and completes: no timers or background
    work, so Loading/Refreshing stay visually pinned and replay on re-subscription.
  • Scalar Empty = Option.None; list Empty = Some(empty) preserved through a
    forwarding list adapter; None for a list is expressed explicitly via
    ListFeedMock.Message.
  • Undefined replays a None data message then Undefined so the final undefined
    value stays an observable data-axis change through state replay.
  • Refreshing sets data plus transient progress; it does not touch the internal
    refresh axis.

Usage is handwritten: the developer writes a record/class shaped like the page view
model, exposes IFeed<T>/IListFeed<T> properties matching the XAML bindings,
initialises them with these factories, and assigns the instance to Page.DataContext.
Property naming, feed-shape compatibility and DataContext injection remain explicit user
responsibilities; there is no generator and no generated code.

Docs: the MVUX testing reference page doc/Reference/Reactive/testing.md documents the
handwritten workflow with scalar and list examples. Design/scope is captured in
specs/009-hot-testing-reactive-feed-mocks/spec.md.

PR Checklist

  • Tested code with current supported SDKs
  • Docs have been added/updated which fit the 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 differences — N/A, no UI/Wasm surface in this change
  • Contains NO breaking changes
  • Updated the Release Notes — not done yet
  • Associated with an issue (GitHub or internal)

Focused tests: 22 passed, 0 failed (Release). The uno-dev image ships only the .NET 10
runtime, so the net9.0 test host was executed with DOTNET_ROLL_FORWARD=Major. Release
package creation for Uno.HotTesting.Reactive succeeded (net9.0 assembly, XML docs,
symbols, Uno.Extensions.Reactive dependency).

Other information

Opened as a draft. This is the reusable runtime foundation for the broader Hot Testing
direction (spec 013). Intentionally out of scope: source generators / generated
view-model factories, generated records or automatic property-name matching,
MockCommand, timed scripts or selection helpers, and gallery/marketing docs.

Internal Issue (If applicable): n/a

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Devid Worker seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@dr1rrb
dr1rrb marked this pull request as ready for review August 24, 2026 18:45
@dr1rrb
dr1rrb force-pushed the dev/devid/issue-3149-feed-mocks branch from 33e002f to 9def5c4 Compare August 24, 2026 21:31
@dr1rrb
dr1rrb enabled auto-merge August 24, 2026 21:32
@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 229893 has failed on uno.extensions.

@dr1rrb
dr1rrb force-pushed the dev/devid/issue-3149-feed-mocks branch from 9def5c4 to 58191e5 Compare August 25, 2026 01:30
@dr1rrb
dr1rrb merged commit 5d45200 into main Aug 25, 2026
18 of 20 checks passed
@dr1rrb
dr1rrb deleted the dev/devid/issue-3149-feed-mocks branch August 25, 2026 01:56
agneszitte pushed a commit that referenced this pull request Nov 3, 2026
- The docs validation only runs for PRs that touch a .md file. This PR does (HowTo-DefineRoutes.md, from #3254), so it fails on 7.3 files it didn't change
- Same fix as main's ec84019 (from #3153): MD040 in specs/004 and specs/006, "nuspecs" and "unmaterialized" in the dictionary, "recognize" in specs/lessons.md, MD059/MD060 off
- Also adds "rehook" (specs/009), which main got with #3154

(cherry picked from commit ec84019)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

♥️ [MVUX] Add simple mocking feed

4 participants