Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toolbar Shortcut (alt + F10) to focus block toolbar from empty block #49778

Open
jeryj opened this issue Apr 12, 2023 · 4 comments
Open

Toolbar Shortcut (alt + F10) to focus block toolbar from empty block #49778

jeryj opened this issue Apr 12, 2023 · 4 comments
Labels
Needs Design Feedback Needs general design feedback. [Package] Editor /packages/editor [Type] Enhancement A suggestion for improvement.

Comments

@jeryj
Copy link
Contributor

jeryj commented Apr 12, 2023

I think the behavior of the toolbar shortcut would be more consistent if it moved focus into the block toolbar from an empty block in the default view.

For example, here's a table of the current behavior for alt + F10 (fn + option + F10 on smaller mac keyboard) shortcut in different contexts:

View Is Unmodified Default Block (empty) Toolbar Focused from Shortcut
Unified/Top Toolbar No (has content) Block Toolbar
Unified/Top Toolbar Yes (empty block) Block Toolbar
Default No (has content) Block Toolbar
Default Yes (empty block) Document Toolbar

If we move focus into the block toolbar from the empty default block, I think it would be more a consistent behavior across all views.

Testing instructions

1. View: Top Toolbar, Block with content

  • Turn on Top Toolbar view from Options menu
  • Move focus to block with content
  • Press alt + F10
  • Focus is in the Block Toolbar

2. View: Top Toolbar, Empty Block

  • Turn on Top Toolbar view from Options menu
  • Move focus to empty/new block
  • Press alt + F10
  • Focus is in the Block Toolbar

3. View: Default, Block with Content

  • Turn off Top Toolbar view from Options menu
  • Move focus to block with content
  • Press alt + F10
  • Focus is in the Block Toolbar

4. View: Default, Empty Block

  • Turn off Top Toolbar view from Options menu
  • Move focus to empty/new block
  • Press alt + F10
  • Focus is in the Document Toolbar (I propose we move focus to block toolbar instead)

Video of Behavior

Screen.Recording.2023-04-12.at.3.20.33.PM.mov
@jeryj jeryj added Needs Design Feedback Needs general design feedback. Needs Accessibility Feedback Need input from accessibility labels Apr 12, 2023
@jeryj jeryj assigned jeryj and unassigned jeryj Apr 12, 2023
@alexstine
Copy link
Contributor

@annezazu You have insights into who might be able to work on this? I know @draganescu has done a lot of work around toolbars here lately. Is this possibly related to ongoing work in #49634?

@jeryj
Copy link
Contributor Author

jeryj commented Apr 13, 2023

@alexstine I'm happy to work on it, I was seeking feedback to make sure everyone is OK with this proposed shortcut behavior.

I noticed it while working on #49644. I could land this alongside that PR if y'all agree with the behavior change.

@alexstine
Copy link
Contributor

@jeryj Sure, absolutely. I just wanted to make sure we were not duplicating efforts. Ping me when ready, happy to review/test the PR. 👍

@jeryj
Copy link
Contributor Author

jeryj commented May 5, 2023

I looked into this for a bit. I thought it would be an easy fix to make things more readable and consistent, but I'm having a hard time making this work in a way that doesn't cause more problems than it creates. It is a nice hidden feature to know that you can move to the document toolbar if it's from an empty default block, I guess. I'll leave this open for now, but unfortunately I'm not sure how to do this in a simple way that preserves all the current behaviors.

@jeryj jeryj removed the Needs Accessibility Feedback Need input from accessibility label Jun 7, 2023
@jordesign jordesign added [Package] Commands /packages/commands [Package] Editor /packages/editor [Type] Enhancement A suggestion for improvement. and removed [Package] Commands /packages/commands labels Jul 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Design Feedback Needs general design feedback. [Package] Editor /packages/editor [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants