Repository navigation
fix(settings): keep the SSH host list's scrolling inside the list (#1221) - #1222
Merged
Merged
Conversation
) Show all and search bound the host list to 360px inside the scrolling settings page, and GPUI scrolls every scroller under the pointer, so the wheel moved the page along with the list. Give the list the same wheel handler the Agents page got in #1214, now shared as nested_list_wheel: an event the list can absorb stays in the list, and only one that starts at its edge reaches the page.
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.
Fixes #1221.
Settings → SSH bounds the host list to 360px when Show all is on or a search is active. That list sits inside the settings page, which also scrolls, and GPUI scrolls every scroller under the pointer. So the wheel moved the page along with the list.
#1214 fixed the same problem on the Agents page. This moves that wheel handler into a shared
nested_list_wheeland gives the SSH list the same structure: a scrolling viewport that tracks a newssh_list_scrollhandle, with the handler on its content child.The Agents page behaves as before.
Test
ssh_host_list_scroll_stays_inside_the_list: 40 hosts with Show all on. Scrolling mid-list leaves the page where it was. Once the list is at its end, the next wheel event scrolls the page. Without the fix it fails: the page moves from -30px to -60px.cargo test --bin tty7-app -- ui::settings: 57 passed. This includes fix(settings): hand off nested scrolling only at list boundaries #1214's Agents test.