Keep GridWrap highlight visible after scroll#6344
Open
puneetdixit200 wants to merge 1 commit into
Open
Conversation
Member
|
I don't agree with this change. Scrolling does not imply the user is not interested in the current selection. See List/Tree etc - the selected item does not change when they scroll. Selecting an item, then scrolling, then tapping "down" should move to the item below the selected one, not to a new item based on where the viewport is scrolled to |
Member
|
Any other team members want to weigh in on this before I close? |
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.
Description:
Fixes #5992
Keeps the GridWrap keyboard highlight clamped to the visible item range after scrolling. This lets subsequent arrow-key navigation continue from the current viewport instead of jumping back to a stale off-screen highlighted item.
Checklist:
Testing:
go test ./widget -run '^TestGridWrap_ScrollKeepsHighlightVisible$' -count=1\n-go test ./widget -run '^TestGridWrap' -count=1\n-go test ./widget -run '^Test(GridWrap|List|Tree)_(ScrollTo|TypedKey|Highlight)' -count=1\n-go vet ./widget\n-go run golang.org/x/tools/cmd/goimports@latest -e -d widget/gridwrap.go widget/gridwrap_test.go\n-go run mvdan.cc/gofumpt@latest -l widget/gridwrap.go widget/gridwrap_test.go\n-git diff --check\n\ngo test ./widget -count=1hit unrelated local golden-render differences inList/Treescrollbars/images on macOS; the focused GridWrap and nearby scroll/highlight tests above passed.