Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Closes: #62152
Alternative (or complementary, preferrably) to #68744
Adds a keyboard shortcut to rename the selected block directly from the List View. There's no established pattern for the key combination, normally this is achieved by pressing enter, but in the context of the block editor that's not possible as it would be overtaking the flow. I went with
⌥⌘Ras it felt the most natural, I also saw Google Drive has the⌥⌘Eshortcut for renaming files/folders so we could consider that as a possibility as well.Why?
Renaming each element requires several clicks. When there are many to rename, it can become an annoying task for site owners. Whether the user is a block theme developer or a site administrator, it can generate considerable friction and a poor experience.
Plus, renaming items via the keyboard is a common pattern in lists or layer-based UIs, like finder or many design tools. Supporting this improves keyboard accessibility and makes the list view workflows faster and more discoverable for power users.
How?
When a block is selected in the List View, pressing
⌥⌘Rswitches the block label into an editable state, allowing it to be renamed without using the mouse.It also supports the shortcut if the list view is closed and a block is selected or being edited.
Testing Instructions
With the list view open
⌥⌘R.With the list view open
⌥⌘R.Screenshots or screencast
block-rename-shortcut.mp4