Repository navigation
fix(ListView): flicker when repositioning item - #23168
Conversation
There was a problem hiding this comment.
Pull request overview
This PR targets a single-frame flicker in ListViewBase virtualization where newly materialized containers briefly render at (0,0) (top-left) after an item move triggers a refresh, by attempting to force layout/arrange immediately after FillLayout adds new lines.
Changes:
- Changed
FillLayoutto return the number of newly materialized lines. - In non-scroll update paths, attempted to force an immediate layout pass when new lines were added via
OwnerPanel.UpdateLayout().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ajpinedam
left a comment
There was a problem hiding this comment.
Being a fix for a visual issue I imagine it's hard/impossible to be tested
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23168/wasm-skia-net9/index.html |
|
|
OwnerPanel.UpdateLayout() inside VirtualizingPanelLayout.UpdateLayout can trigger a nested ArrangeOverride which overwrites _availableSize with a stale viewport height. Restore _availableSize after the call so EstimatePanelSize uses the correct measure constraint. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23168/wasm-skia-net9/index.html |
GitHub Issue: closes unoplatform/kahua-private#452
PR Type:
🐞 Bugfix
What changed? 🚀
When moving an item in a
ListView,NotifyCollectionChangedAction.Movetriggers a full panel refresh.FillLayoutmaterializes new lines, but they are not arranged until the next layout pass. If a render pass occurs between materialization and arrangement, items appear clustered at(0,0)for one frame — visible as a brief flicker of broken layout.This PR makes
FillLayoutreturn the number of lines it added, and forces an immediateOwnerPanel.UpdateLayout()after non-scroll refresh paths when new lines were materialized, ensuring items are arranged before the next render pass.PR Checklist ✅
Screenshots Compare Test Runresults.