Rework nav selection pill animation for lower GPU cost - #5209
Merged
Conversation
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
July 29, 2026 13:00
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Reworks the sidebar selection pill animation to reduce GPU and layout costs while improving startup reliability.
Changes:
- Uses render transforms for movement and capped stretching.
- Shortens animation duration to 180 ms.
- Retries positioning when startup layout is incomplete.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Marc-André Moreau (mamoreau-devolutions)
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The sliding selection pill added in #5194 was expensive on the GPU and could balloon or fail to follow the page. This reworks how the pill moves — same WinUI-style effect, far cheaper, and correct during startup.
Problem
The pill animation drove Canvas.Top and Height, both layout-affecting properties. Every animation frame forced a full measure/arrange pass plus re-rasterization, and on a Mica window that re-presents the entire translucent surface each frame. Measured ~13% GPU while a single pill slide was on screen — disproportionate for a 3×16 px bar, and rough on low-end machines.
Two secondary issues surfaced while fixing it:
Changes