CmdPal: Virtualize grid views and polish it - #50233
CmdPal: Virtualize grid views and polish it#50233Jiří Polášek (jiripolasek) wants to merge 5 commits into
Conversation
✅ PR intakeAll automated intake checks now pass. Thanks for the updates! Automated PR intake; PowerToys maintainers make final decisions. |
GridItemGroupViewModel now contains collection of its items, instead of being it.
Michael Jolley (michaeljolley)
left a comment
There was a problem hiding this comment.
#50231 is merged, but this branch still doesn’t include it, so the current CI run tested ItemsWrapGrid without the icon fix that prevents the layout cycle. Can you update from main and rerun CI before we merge this?
| return; | ||
| } | ||
|
|
||
| if (_pendingGridNavigation.Count > 0 || !TryNavigateGrid(key)) |
There was a problem hiding this comment.
Once one navigation key gets queued, every key after it gets queued too. Can we coalesce these keys and add bounded cleanup so a layout that never settles doesn’t leave LayoutUpdated hooked while the queue keeps growing?
There was a problem hiding this comment.
Michael Jolley (@michaeljolley) I think best course of action is to do nothing here, unless it turns to a real issue. The implementation would add complexity, and it is not really straight forward.
Summary of the Pull Request
This PR replaces that implementation with a grouped
GridViewbacked by the nativeItemsWrapGrid, allowing WinUI to realize and recycle only the containers needed for the current viewport.CmdPal grid and gallery pages used a custom
WrapPanelthat measured and arranged every item. This prevented container virtualization and made large result sets increasingly expensive.And because I'm lazy splitting and retesting everything, this PR is packing some other fixes on a way toward making the grid view usable, like keyboard navigation.
ItemsWrapGrid.Pictures? Pictures!
Screen.Recording.2026-08-29.091926.mp4
Screen.Recording.2026-08-29.095121.mp4
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed