-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Add keyboard shortcut (cmd(ctrl)+option(alt)+v
) to paste styles
#69196
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
Add keyboard shortcut (cmd(ctrl)+option(alt)+v
) to paste styles
#69196
Conversation
Note: The failing test is not related to the changes made in this PR. |
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Getting #69231 merged is a prerequisite for adding tests for paste styles in this PR. However, the refactoring introduced in #69231 still requires thorough testing and review, which I assume might take some time due to the scope of changes. In the meantime, if this PR tests well, would it be possible to review and approve/merge it first and follow up with the paste styles tests separately? CC: @t-hamano |
Sorry for the late reply!
The List View testing can be addressed in a follow-up, but I think this PR at the very least needs testing on the edit canvas. Example:
|
Thanks for the reply, @t-hamano. |
...ious/__snapshots__/Copy-cut-paste-should-paste-styles-using-keyboard-shortcut-1-chromium.txt
Outdated
Show resolved
Hide resolved
Hi, @t-hamano. I believe I've incorporated all the suggested changes, including the recommended test cases. If everything tests well and the feature is deemed necessary, could we proceed with the next steps for this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply!
The added e2e tests look good to me, and I think we can ship this PR 👍
Thanks for the review, @t-hamano. |
…rdPress#69196) * feat: add key combo to paste styles * e2e: add test for pasting styles using keyboard shortcut * refactor: remove snapshots file Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: ethanclevenger91 <eclev91@git.wordpress.org>
What, Why and How?
Closes #69170
This PR introduces the shortcut
cmd(ctrl) + option (alt) + v
for pasting the copied styles.Please note that due to the issue reported here, copying a block using the keyboard shortcut and then attempting to paste its styles—whether via the shortcut or Block Actions—will not work. This issue already exists in Trunk with the
Paste Styles
Block Action, and the shortcut behaves similarly.To resolve this, we can either ensure consistency between the
Copy
keyboard shortcut and Block Actions by addressing the issue or, as a quick fix, introduce a dedicated keyboard shortcut forCopy Styles
.Testing Instructions
cmd(ctrl)+option(alt)+v
.List View
blocks and confirm the usability of the shortcut.List View
when attempting Step 4.Screencasts and Screenshot
Shortcut demo within List View
Tested on macOS