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

Block Action: Implement cut functionality in block actions and settings menu #68554

Open
wants to merge 9 commits into
base: trunk
Choose a base branch
from

Conversation

yogeshbhutkar
Copy link
Contributor

@yogeshbhutkar yogeshbhutkar commented Jan 8, 2025

What, Why and How?

As outlined in the issue, the Block Options menu currently lacks a Cut option. This PR introduces the Cut functionality to the menu.

Testing Instructions

  1. Navigate to post edit page.
  2. Create a paragraph or any other block.
  3. Navigate to the block options using the vertical three dots.
  4. Click on Cut.
  5. Try pasting the block.
  6. Note, the Cut option is now working from Block Options.

Screencast

cut-demo-gif

Screenshots

Before After
Screenshot 2025-01-08 at 9 56 32 PM Screenshot 2025-01-08 at 9 56 02 PM

Shortcuts List

Screenshot 2025-01-09 at 12 04 03 PM

Closes: #68550

@yogeshbhutkar
Copy link
Contributor Author

The failure in the Navigation Block Frontend Interactivity test is unrelated to the changes introduced in this PR. This test passed in earlier runs and continues to pass in the local environment.

Screenshot 2025-01-09 at 12 34 29 PM

@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review January 9, 2025 07:53
Copy link

github-actions bot commented Jan 9, 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.

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

Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: afercia <afercia@git.wordpress.org>

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

@yogeshbhutkar
Copy link
Contributor Author

Hi @afercia, can you please review this PR when you get a moment? Thanks!

@yogeshbhutkar
Copy link
Contributor Author

As per the discussions on this issue, added the Paste shortcut to the list of available shortcuts for blocks.

Screenshot 2025-01-09 at 3 11 31 PM

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Package] Block editor /packages/block-editor [Feature] Block settings menu The block settings screen labels Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block settings menu The block settings screen [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the Cut block action to the block actions menu
2 participants