Repository navigation
fix(native): fit the terminal to the dock's destination as it starts sliding - #920
Merged
Merged
Conversation
…sliding The terminal held its refit back for refitSettle after the dock stopped, so it sat clipped at the dock's edge and then jumped while the agent redrew. A lone session's terminal now takes the width the slide ends at on its first frame, and a split layout refits on the frame the dock lands.
3 tasks done
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.
Summary
Opening or closing the dock had a hitch right after it stopped. The slide itself is cheap (about 0.5 ms of layout per frame); the hitch was the session's terminal. While the dock moved, the island's width changed every frame, so the terminal's refit stayed debounced (
refitSettle, 100 ms, meant for dragging an edge). Once the dock landed, the terminal sat clipped at its edge for another 100 ms, then refit and the agent redrew the whole screen.islandtakes atermWidth). Opening, the island's fill shows past the narrower grid; closing, the island clips the wider one as the dock slides away. The agent redraws while the dock is still moving.dockSlide.began/landed, read throughterminals.refitNow). A drag of the dock's edge keeps the debounce.Test plan
gofmt,go vet ./...,go test ./...innative/TestDockSlideMarksTheFramesItBeginsAndEndsman lsshow the text rewrapped before the dock finishes sliding in