feat: 10187 toolbox flyout nav shortcuts - #10258
Draft
mikeharv wants to merge 3 commits into
Draft
Conversation
Page Up, Page Down, Ctrl/Cmd + Home and Ctrl/Cmd + End only acted on workspace blocks. In the toolbox they moved focus out of the toolbox and into the workspace, and in the flyout the page shortcuts did nothing. Ctrl/Cmd + Home and End now move to the first and last item of whichever of the workspace, toolbox or flyout holds focus. Page Up and Page Down move focus to the first or last currently visible item of the toolbox or flyout and scroll it to the edge of the viewport it moved towards, so that nothing between the old and new position is passed over unseen. No new key bindings are introduced, and everything stays inside the opt-in registerNavigationShortcuts bundle. Fixes RaspberryPiFoundation#10187
Toolbox items take focus with preventScroll, so Ctrl/Cmd + Home and End moved focus to a category that stayed off screen. ToolboxItem.onNodeFocus now scrolls the item into view with block and inline set to nearest. Paging no longer scrolls the newly focused item to the far edge of the viewport, which moved it a long way when it was already partly visible. The item's own scroll-into-view handles it instead, so it moves only as far as it takes to show it and stays near the edge it came from.
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 basics
The details
Resolves
Fixes
Proposed Changes
Reason for Changes
Test Coverage
Documentation
Additional Information