feat: Add support for keyboard navigation in/to workspace comments. by gonfunko · Pull Request #9182 · RaspberryPiFoundation/blockly
The basics
The details
Resolves
Fixes #9167
Fixes part of RaspberryPiFoundation/blockly-keyboard-experimentation#614
Proposed Changes
This PR adds support for keyboard navigation in and through workspace comments. Specifically, it:
- Factors out comment icons into their own classes that support being focused
- Adds navigation policies for workspace comments and icons
- Improves the Rect and WorkspaceSvg APIs to have better typings/additional convenience functions to support this
A (small) corresponding PR will still be needed in the keyboard-experimentation repo.
With this change, workspace comments are part of the keyboard nav flow; with a comment focused, Enter will focus its editor, Escape will return focus to the comment as a whole, and the collapse/delete icons may be reached by right-arrowing in from a focused workspace comment. Up and down include workspace comments as well as blocks in the list of locations that they visit.