Repository navigation
fix: keep the sidebar from sticking mid-slide when toggled quickly (INC-423) - #513
Merged
Merged
Conversation
…NC-423) Wait for the slide to visually finish before ending the portal resize, and measure the traffic lights only once the sidebar has settled.
…ay mid-slide (INC-423)
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.
What this does
Hiding and showing the sidebar quickly with Cmd+B could leave a window stuck partway through the slide: sidebar rows shifted left and cut off, and the sidebar toggle sitting next to the bell instead of after the traffic lights. It stayed that way until something else redrew the window. This keeps the slide from #503 and makes it always finish in the right place.
Linear: INC-423 (follow-up to INC-387)
Summary
SidebarState.toggle()now usescompletionCriteria: .removed. With the default (logically complete), a second toggle mid-slide fired the first completion immediately, soendInteractiveGeometryResize()ran while the sidebar was still moving and the AppKit-backed views were left at a partial offset.programaSidebarToggleDidSettle.ContentViewsyncs the terminal portal to the final frame on it.TrafficLightsTrailingEdgeViewskips measuring while the slide runs (those frames carry the transition offset, and one of them was seeding the sharedlastMeasuredMaxXwith ~390 pt instead of 79) and measures again on settle.Test Plan
debug.shortcut.simulate cmd+b) in pairs with gaps cycling 30 ms to 600 ms, checking the settled zoom-button measurement: before the fix 1 of 24 pairs ended stuck; after it 100 of 100 ended at 79 pt.Screenshots: before/after needed.