Skip to content

Table Block: Enhance contentOnly Editing Experience #70114

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

Conversation

Sukhendu2002
Copy link
Contributor

@Sukhendu2002 Sukhendu2002 commented May 14, 2025

What?

Part of: #65778

Allows contentOnly editing in the Table block.

Testing Instructions

  1. Create a Group block
  2. Set the Group block's templateLock attribute to "contentOnly"
  3. Insert a Table block inside this Group
  4. Verify you can edit the initial placeholder
  5. Verify you can click into table cells and edit their content

Screenshots or screencast

Screen.Recording.2025-05-14.at.3.41.32.PM.mov

@Sukhendu2002 Sukhendu2002 marked this pull request as ready for review May 14, 2025 10:13
Copy link

github-actions bot commented May 14, 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: Sukhendu2002 <sukhendu2002@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

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

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.

Thanks for the PR!

Can we use the check blockEditingMode === 'default' instead of blockEditingMode !== 'contentOnly' ? This is because the block editing mode value can be disabled other than default and contentOnly. We need to disable the block controls when the mode is disabled.

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Table Affects the Table Block labels May 15, 2025
@Sukhendu2002
Copy link
Contributor Author

Thanks for the feedback! I have updated the PR accordingly. Let me know if there's anything else that needs attention!

@Sukhendu2002 Sukhendu2002 requested a review from t-hamano May 15, 2025 08:53
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 👍

@t-hamano t-hamano merged commit 5c7c4e7 into WordPress:trunk May 15, 2025
61 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.9 milestone May 15, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
* Enhance contentOnly editing experience in Table block

* Update conditional rendering to only show controls in default mode

Co-authored-by: Sukhendu2002 <sukhendu2002@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Table Affects the Table Block [Feature] Write mode [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants