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

Fix: The issue of appender button not clickable in row/stack group. #61585

Merged
merged 1 commit into from May 15, 2024

Conversation

vipul0425
Copy link
Contributor

@vipul0425 vipul0425 commented May 10, 2024

What?

Fixes #56438

Why?

For core/group block that:

  • Has the layout attribute value of {"type": "flex"}, i.e. a Row or Column variation.
  • Has no inner blocks.
  • Has a single value in its allowedBlocks attribute.

One cannot click on the button appender component to insert a block.

How?

The issue was caused as the pointer-events were restricted on the .block-list-appender, So this PR allows the pointer event on the button inside so user can insert the block.

Testing Instructions

  1. Create a new Page.
  2. Paste the group code provided further below.
<!-- wp:group {"allowedBlocks":["core/paragraph"],"layout":{"type":"flex"}} -->
<div class="wp-block-group"></div>
<!-- /wp:group -->
  1. In visual mode, attempt to click on the block appender button. Now, the block should be inserted.

Testing Instructions for Keyboard

Nil

Screenshots or screencast

demo.mov

@vipul0425 vipul0425 requested a review from ajitbohra as a code owner May 10, 2024 20:25
Copy link

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: vipul0425 <vipulgupta003@git.wordpress.org>

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

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label May 10, 2024
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @vipul0425! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@talldan talldan added [Feature] Inserter The main way to insert blocks using the + button in the editing interface [Type] Bug An existing feature does not function as intended labels May 15, 2024
Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

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

Thanks so much for the fix, @vipul0425!

@talldan talldan merged commit e19858b into WordPress:trunk May 15, 2024
66 of 67 checks passed
@github-actions github-actions bot added this to the Gutenberg 18.4 milestone May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot add a block into an empty core/group flex layout with one member in allowedBlocks
2 participants