Commit ad8c2de
committed
spec(047): Phase 3-final Batch G-prep — ItemsHost typing + descriptor-side ordering
Two engine fixes uncovered by the first Batch G1 attempt (which reverted
clean rather than ship broken). ItemsHost is now usable for descriptor
authors; flat-items ports (ListBox / ComboBox / RadioButtons in G1) and
typed templated lists (G2 keyed-reconcile shape, deferred) build on top.
Changes:
- ChildrenStrategy.ItemsHost.GetCollection signature: System.Collections.IList -> IList<object>.
WinUI Microsoft.UI.Xaml.Controls.ItemCollection does not implement
the non-generic IList projection under CsWinRT; a descriptor reaching
for c.Items hit InvalidCastException at runtime. IList<object> is the
projected interface ItemCollection actually exposes.
- DescriptorHandler.Mount / Update now dispatch ItemsHost INLINE between
RentControl and the prop loop (Mount), and before the prop Update loop
(Update). Selection-tracking initial writes (SelectedIndex /
SelectedItem) need the collection in its final shape first — WinUI
silently clamps selection against an empty collection. The strategy
shape is unchanged; descriptors using ItemsHost simply get the items
populated first, matching legacy MountListBox ordering.
DescriptorHandler.Children returns null when the strategy is
ItemsHost so V1HandlerAdapter doesn't double-dispatch.
- V1HandlerAdapter ItemsHost branches kept for hand-coded handlers
(none today) and updated for the IList<object> typing.
Keyed-reconcile path (originally planned as part of G-prep for Batch G2)
deferred: typed templated lists need ReactorListState + KeyedListDiff
integration plus a Reconciler.BindKeyedItemsSource helper, which is
substantial engine work better landed alongside its consumer rather
than blind.
V1 ON: 511 ok / 0 failures
V1 OFF: 511 ok / 0 failures1 parent 0f17286 commit ad8c2de
3 files changed
Lines changed: 92 additions & 2 deletions
File tree
- src/Reactor/Core/V1Protocol
- Descriptor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| |||
Lines changed: 86 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
55 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
56 | 73 | | |
57 | 74 | | |
58 | 75 | | |
| |||
75 | 92 | | |
76 | 93 | | |
77 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
78 | 101 | | |
79 | 102 | | |
80 | 103 | | |
| |||
90 | 113 | | |
91 | 114 | | |
92 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
93 | 178 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
132 | 137 | | |
133 | 138 | | |
134 | 139 | | |
| |||
0 commit comments