Commit 2dc5b14
fix(treeview): stop reconcile from clobbering runtime expansion; keep TreeView<T> hosting declarative
Two expand/collapse fixes:
1. Legacy TreeView (the "expand flashes open then shut" regression that
repros on main): DiffTreeViewNodes reset each live node's IsExpanded to
the static TreeViewNodeData value on every reconcile. When a reconcile
fires after the user toggles a node — e.g. an OnExpanding lazy-load that
updates state, or any unrelated state change while nodes are data-expanded
— it snapped the node back to the data's state. Now expansion is treated as
uncontrolled: the data value is only applied when it actually changes
between renders, never clobbering the user's (or WinUI's native) toggle.
2. TreeView<T>: applied the same uncontrolled-expansion rule, and reverted the
experimental ContainerContentChanging hosting back to the declarative
{Binding Content} template. The imperative host/recycle handler perturbed
WinUI's synchronous expand pass (manifested as expand opening then closing,
and child-click collapsing the parent); the binding never perturbs native
expand/collapse.
Tests: legacy + typed expansion-not-clobbered guards, collapse/expand cycle,
expand-collapsed-node, constrained-viewport expand. Full suite green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent b7d25af commit 2dc5b14
5 files changed
Lines changed: 110 additions & 139 deletions
File tree
- src/Reactor/Core
- tests/Reactor.AppTests.Host/SelfTest
- Fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1990 | 1990 | | |
1991 | 1991 | | |
1992 | 1992 | | |
1993 | | - | |
1994 | | - | |
1995 | | - | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
1996 | 1999 | | |
1997 | 2000 | | |
1998 | 2001 | | |
| |||
2005 | 2008 | | |
2006 | 2009 | | |
2007 | 2010 | | |
2008 | | - | |
2009 | | - | |
2010 | | - | |
2011 | | - | |
2012 | | - | |
2013 | | - | |
2014 | | - | |
2015 | | - | |
2016 | | - | |
2017 | | - | |
2018 | | - | |
2019 | | - | |
2020 | | - | |
2021 | | - | |
2022 | | - | |
2023 | | - | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
2027 | | - | |
2028 | | - | |
2029 | | - | |
2030 | | - | |
2031 | | - | |
2032 | | - | |
2033 | | - | |
2034 | | - | |
2035 | 2011 | | |
2036 | 2012 | | |
2037 | 2013 | | |
2038 | 2014 | | |
2039 | 2015 | | |
2040 | 2016 | | |
2041 | 2017 | | |
2042 | | - | |
2043 | | - | |
2044 | | - | |
2045 | | - | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
2046 | 2022 | | |
2047 | | - | |
2048 | 2023 | | |
2049 | 2024 | | |
2050 | 2025 | | |
| |||
2053 | 2028 | | |
2054 | 2029 | | |
2055 | 2030 | | |
2056 | | - | |
2057 | | - | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
2067 | | - | |
2068 | | - | |
2069 | | - | |
2070 | | - | |
2071 | | - | |
2072 | | - | |
2073 | | - | |
2074 | | - | |
2075 | | - | |
2076 | | - | |
2077 | | - | |
2078 | | - | |
2079 | | - | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
2084 | | - | |
2085 | | - | |
2086 | | - | |
2087 | | - | |
2088 | | - | |
2089 | | - | |
2090 | | - | |
2091 | | - | |
2092 | | - | |
2093 | | - | |
2094 | | - | |
2095 | | - | |
2096 | | - | |
2097 | | - | |
2098 | | - | |
2099 | | - | |
2100 | | - | |
2101 | | - | |
2102 | | - | |
2103 | | - | |
2104 | | - | |
2105 | 2031 | | |
2106 | 2032 | | |
2107 | 2033 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4017 | 4017 | | |
4018 | 4018 | | |
4019 | 4019 | | |
4020 | | - | |
| 4020 | + | |
| 4021 | + | |
| 4022 | + | |
| 4023 | + | |
| 4024 | + | |
| 4025 | + | |
| 4026 | + | |
4021 | 4027 | | |
4022 | 4028 | | |
4023 | 4029 | | |
| |||
4168 | 4174 | | |
4169 | 4175 | | |
4170 | 4176 | | |
4171 | | - | |
4172 | | - | |
| 4177 | + | |
| 4178 | + | |
| 4179 | + | |
| 4180 | + | |
4173 | 4181 | | |
4174 | 4182 | | |
| 4183 | + | |
4175 | 4184 | | |
4176 | 4185 | | |
4177 | 4186 | | |
| |||
4195 | 4204 | | |
4196 | 4205 | | |
4197 | 4206 | | |
4198 | | - | |
4199 | 4207 | | |
4200 | | - | |
| 4208 | + | |
4201 | 4209 | | |
4202 | | - | |
4203 | | - | |
4204 | 4210 | | |
4205 | | - | |
4206 | | - | |
4207 | | - | |
4208 | | - | |
4209 | | - | |
| 4211 | + | |
| 4212 | + | |
4210 | 4213 | | |
4211 | 4214 | | |
4212 | 4215 | | |
4213 | | - | |
4214 | | - | |
4215 | | - | |
4216 | | - | |
| 4216 | + | |
| 4217 | + | |
4217 | 4218 | | |
4218 | 4219 | | |
4219 | | - | |
4220 | | - | |
4221 | 4220 | | |
4222 | 4221 | | |
4223 | 4222 | | |
| |||
4230 | 4229 | | |
4231 | 4230 | | |
4232 | 4231 | | |
4233 | | - | |
4234 | | - | |
4235 | | - | |
4236 | | - | |
4237 | | - | |
4238 | | - | |
4239 | | - | |
4240 | | - | |
4241 | | - | |
4242 | | - | |
4243 | | - | |
4244 | | - | |
4245 | | - | |
4246 | 4232 | | |
4247 | 4233 | | |
4248 | | - | |
| 4234 | + | |
4249 | 4235 | | |
4250 | 4236 | | |
4251 | 4237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
648 | 648 | | |
649 | 649 | | |
650 | 650 | | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | 651 | | |
674 | 652 | | |
675 | 653 | | |
| |||
2043 | 2021 | | |
2044 | 2022 | | |
2045 | 2023 | | |
2046 | | - | |
| 2024 | + | |
2047 | 2025 | | |
2048 | 2026 | | |
2049 | 2027 | | |
| |||
Lines changed: 77 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
291 | 368 | | |
292 | 369 | | |
293 | 370 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1261 | 1261 | | |
1262 | 1262 | | |
1263 | 1263 | | |
| 1264 | + | |
| 1265 | + | |
1264 | 1266 | | |
1265 | 1267 | | |
1266 | 1268 | | |
| |||
1273 | 1275 | | |
1274 | 1276 | | |
1275 | 1277 | | |
| 1278 | + | |
| 1279 | + | |
1276 | 1280 | | |
1277 | 1281 | | |
1278 | 1282 | | |
| |||
0 commit comments