Commit b9d7b98
fix(unocrm): drive the Contacts FeedView from the generated ContactsViewModel, not the mock
A FeedView must bind to a real feed, which only the code-generated view model provides — a
plain mock record can't drive it. So:
- ContactsPage seeds its design-time DataContext with `new ContactsViewModel()` (the generated
VM whose parameterless ctor builds a ContactsModel + its reactive SourceContext); Hot Design is
a live app, so the FeedView's list feed pumps and renders at design time.
- ContactsPageMockData is removed (a workaround for the old plain-ListView approach; it can't feed
a FeedView), along with the earlier ListFeed.Async mock hack.
- ContactsPreviews now hosts the page with its generated VM (a single populated "Contacts"
preview). The no-results state isn't authored: it depends on the live filter state, which can't
be preset on the generated VM at design time.
Verified: Debug build succeeds.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent f1e235c commit b9d7b98
3 files changed
Lines changed: 11 additions & 64 deletions
File tree
- studio/uno-crm/UnoCRM
- Presentation
- MockData
- Previews
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
Lines changed: 0 additions & 51 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
19 | 15 | | |
20 | 16 | | |
0 commit comments