Skip to content

Conversation

@BenHenning
Copy link
Contributor

@BenHenning BenHenning commented Apr 9, 2025

This is a working branch for bringing in FocusManager support in the keyboard navigation plugin.

Other things left to do:

  • Rendered connections need to be redone so that they correctly update due to block moves and resizes.
  • The cursor may need to be reimplemented further such that its state is entirely derived from FocusManager rather than partially.
  • Clicking needs to tie back to focus or the state becomes inconsistent. This has been partly implemented, but is not yet complete.
  • Styling choices need to be finalized. CSS works, but SVG rendering issues cause strokes to be partially cut off. We will need to introduce an extra path element per block to represent the block's highlights (for selection or passive highlight).

Pathways untested (or partially tested):

  • Comments and icons, and more complex flyout arrangements.
  • Action menu.
  • Keyboard-based movement.
  • Other shortcuts.
  • Likely other scenarios that were carefully patched over the last few months that now fundamentally change with this approach.

Cool thing to note: this works with Chromevox, though it's rough since group elements over-announce and we don't have good block representations yet. Much of this will be fixed with ARIA work, though. :)

The corresponding core change is here: RaspberryPiFoundation/blockly#8875. Note that the core branch and this branch must be linked together, e.g. using https://developers.google.com/blockly/guides/contribute/samples/debugging#npm_link in order for both to work correctly.

gonfunko and others added 6 commits March 11, 2025 14:58
This hooks up to FocusManager.
Conflicts:
	package-lock.json
	package.json
	src/index.ts
	src/line_cursor.ts
	src/navigation.ts
	src/navigation_controller.ts
	test/index.ts
This contains some initial code changes to incorporate FocusManager.
More is happening in Core, and there's still a lot left to figure out.
This further reduces the amount of responsibility that the plugin has in
favor of core + FocusManager changes.
This removes the passive indicator rendering since FocusManager handles
it. It also updates part of toolbox navigation to select a first item if
there isn't currently a selection (which state is now possible due to
tab navigation).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants