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

Update keyboard shortcuts to use primaryShift+backspace for block deletion #69074

Conversation

yogeshbhutkar
Copy link
Contributor

@yogeshbhutkar yogeshbhutkar commented Feb 6, 2025

What, Why and How?

Closes #68139, #69121

This PR is a follow-up to #68164

The previously implemented block deletion shortcut PR #68164 led to frequent accidental activations. To address it, this PR replaces it with a more deliberate alternative: primaryShift+Backspace.

Shortcuts:
Windows/Linux: Ctrl + Shift + Backspace
MacOS: Cmd + Shift + Backspace

Testing Instructions

  1. Create a block.
  2. Press the key combination mentioned above based on the O.S. and observe the removal of the block.

Screencast

pr-demo

Screenshot 2025-02-06 at 3 09 26 PM

Tested on macOS

@yogeshbhutkar yogeshbhutkar force-pushed the enhance-68139/update-block-deletion-shortcut branch 2 times, most recently from cc14da5 to 671e2de Compare February 7, 2025 04:11
@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review February 7, 2025 05:19
Copy link

github-actions bot commented Feb 7, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @Czab1, @tjarrettveracode.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: Czab1, tjarrettveracode.

Co-authored-by: yogeshbhutkar <[email protected]>
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: jarekmorawski <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: talldan <[email protected]>
Co-authored-by: jasmussen <[email protected]>
Co-authored-by: dcalhoun <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Feb 7, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM! I have tested various scenarios following this comment and they all work as expected.

Description of keyboard shortcuts in Windows OS:

image

@yogeshbhutkar yogeshbhutkar force-pushed the enhance-68139/update-block-deletion-shortcut branch from 577144d to 818bd6a Compare February 10, 2025 04:41
@t-hamano
Copy link
Contributor

@yogeshbhutkar Thanks for the update!

Some E2E tests are failing, but the failures are also happening in the trunk branch and shouldn't be caused by this PR. I'll try to look into that issue.

@t-hamano
Copy link
Contributor

@yogeshbhutkar The E2E test failures unrelated to this PR should now be fixed, could you rebase this PR again?

@t-hamano
Copy link
Contributor

Update: The previous PR #68164 caused issues on iOS devices (See #69121). But this PR also resolves that issue.

@t-hamano t-hamano added the props-bot Adding this label triggers the Props Bot workflow for a PR. label Feb 11, 2025
@github-actions github-actions bot removed the props-bot Adding this label triggers the Props Bot workflow for a PR. label Feb 11, 2025
@t-hamano t-hamano merged commit aaa5aee into WordPress:trunk Feb 11, 2025
65 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.3 milestone Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Enhancement A suggestion for improvement.
Projects
None yet
2 participants