-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Custom Core Block Variation details not updated in "Settings Sidebar" section #51486
Comments
Hi, |
I'm not entirely sure that you understand the issue I'm facing. Let's say I created a block variation for a "Group" block and called it "Card Group". Now I am adding this block variation to a page with other blocks which has default group blocks as well. There is no way to distinguish this "Card Group" block from the "Group" block. Even if I check the List View, I still see it as a "Group" block and not a "Card Group" block. Which should not be the case right? Also even in the block settings, it shows up as "Group". I hope I was able to make it more clear. Note: I also did try adding transform to the scope and nothing changed. |
Hi, @2xSamurai do you get the same results with other blocks or it's just the Group block that's behaving this way for you? |
Just checked with the 'Paragraph' and 'Columns' blocks. It's the same. |
@2xSamurai @carolinan @Thelmachido I think the issue here may be inconsistency (at least from my expectations) about variations with and without Here's a simple example: wp.blocks.registerBlockVariation(
'core/spacer',
{
name: 'spacer',
title: 'Custom Spacer',
isDefault: true,
description: 'Custom Spacer Description',
}
); When using that code, the "Custom Spacer" title and description are used in the Block Inserter but not the Block List View or the Block Sidebar. There, they use the default core Spacer block title and description. This can be resolved by always returning wp.blocks.registerBlockVariation(
'core/spacer',
{
name: 'spacer',
title: 'Custom Spacer',
isDefault: true,
description: 'Custom Spacer Description',
isActive: () => true,
}
); With that code, the custom So in @2xSamurai's case, I think providing an @ndiego You mentioned revisiting the |
It should but the Group block had #41303 that was/is impacting it. |
Yeah I am adding a section that better explains |
Description
Issue:
When adding a custom core block variation, the details ( title, icon, description ) are not updated in the "Settings Sidebar" section. Hence there is no way to distinguish between custom core block variations and core blocks once a block is added.
Note: I did report this earlier in core-trac without knowing that it had to be reported here. Below is the core trac reference.
https://core.trac.wordpress.org/ticket/58432
Step-by-step reproduction instructions
Note: I used the following tutorial by Carolina Nymark to create the variation
https://fullsiteediting.com/lessons/block-variations/
Custom.Core.Block.Variation.mov
Screenshots, screen recording, code snippet
No response
Environment info
WordPress - 6.2.2
Theme - Twenty Twenty-Two
Tried with and without Guttenberg
Gutenberg: 15.9.1
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: