WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.39k stars 4.15k forks source link

Child blocks are displayed in the block inserter and block visibility doesn't work #65687

Open t-hamano opened 4 days ago

t-hamano commented 4 days ago

What problem does this address?

I found two issues in the trunk:

I used git bisect and it looks like this issue occurred in #65490.

https://github.com/user-attachments/assets/e9b761f6-79a2-4ab9-bde3-86b031d5e755

cc @youknowriad @andrewserong @jorgefilipecosta

youknowriad commented 4 days ago

Thanks for catching the bug and creating the issue. It seems the new behavior to "compute insertion point" on the fly should only apply to specific conditions, not all the conditions of when a block is visible or not.

So it's like we need two different kind of selectors:

I'll explore something.

youknowriad commented 4 days ago

We should have e2e tests about the "manage block visibility" thing