Skip to content

Conversation

@BenHenning
Copy link
Collaborator

Fixes part of #101
Fixes #89

This change removes the need for using enter and escape to enable keyboard navigation when the workspace is focused.

Instead, simply focusing the workspace is sufficient to allow keyboard navigation. Note that this PR goes back to the previous behavior of always enabling keyboard navigation on page load and instead limits the preconditions of navigation keys to check focus rather than feature enabled state. This allows for #89 to be fully mitigated. Since keyboard navigation is never disabled, the cursor position is never lost (and thus doesn't need to be cached). The removal of enter/escape fixes the first part of #101.

This PR also performs some other minor cleanup work in navigation_controller.ts.

Specifically, this change:
1. Removes using enter/escape as indicator keys for enabling and
   disabling keyboard navigation.
2. Makes it such that focus alone is enough to enable navigation keys.
3. Permanently enables keyboard navigation on page load (as was done
   before), but instead changes the conditions for navigation keys.
4. Performs some other minor cleanups in navigation_controller.ts.
Copy link
Collaborator Author

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-reviewed.

@BenHenning BenHenning marked this pull request as ready for review November 15, 2024 00:04
@BenHenning BenHenning requested a review from a team as a code owner November 15, 2024 00:04
@BenHenning BenHenning requested review from gonfunko and removed request for a team November 15, 2024 00:04
@BenHenning
Copy link
Collaborator Author

PTAL @gonfunko or reroute if needed.

FYI @cpcallen and @rachel-fenichel.

@BenHenning BenHenning self-assigned this Nov 27, 2024
@BenHenning
Copy link
Collaborator Author

I'll address the suggested changes & submit this early next week (I want to make sure I actually retest it since there isn't any CI to verify that I don't break the plugin if I try making changes on GitHub directly (: ).

Copy link
Collaborator Author

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-reviewed changes, and also tested them locally (though I didn't test the shortcuts exhaustively). Things should be in good order, though.

@BenHenning
Copy link
Collaborator Author

Thanks @cpcallen! Going to go ahead and merge this since it's a significant navigation change that would be good to get in front of users for the next testing round. Please note that I resolved your comment threads--if you have any follow-up suggestions please let me know and I'll be happy to address them in a follow-up PR.

@BenHenning BenHenning merged commit 2ed7b7d into RaspberryPiFoundation:main Dec 18, 2024
1 check passed
@BenHenning BenHenning deleted the simplify-workspace-navigation branch December 18, 2024 23:47
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.

Cache cursor location when exiting workspace and resume when reentering

3 participants