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

Widget screen: Custom block styles are not available when running WP 5.7 #25808

Closed
carolinan opened this issue Oct 3, 2020 · 5 comments
Closed
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Bug An existing feature does not function as intended

Comments

@carolinan
Copy link
Contributor

Describe the bug
When a block with a custom block style (register_block_style) is added to a widget area,
the custom style is not present in the block inserter or block sidebar.

To reproduce
Steps to reproduce the behavior:

  1. Activate Gutenberg
  2. Activate a theme with custom block styles, for example Seedlet.
  3. In the widgets screen, place a block that has a custom block style, for example, latest posts in Seedlet.
  4. When adding the block, see that the block style is not showing in the block inserter.
  5. With the block selected, open the block sidebar, and view the styles section.
  6. See that the custom styles are missing, or if it is the only style, that the styles section is missing.

Expected behavior
I expect all options to be available when placing the block.

Editor version (please complete the following information):

  • WordPress version: 5.5.1
    -Gutenberg version 9.1
@carolinan carolinan added the [Feature] Widgets Screen The block-based screen that replaced widgets.php. label Oct 3, 2020
@draganescu draganescu added the [Type] Bug An existing feature does not function as intended label Oct 16, 2020
@draganescu
Copy link
Contributor

I was able to reproduce this on Gutenberg master as of Oct. 17th.

@talldan
Copy link
Contributor

talldan commented Oct 19, 2020

I can also replicate using seedlet. What's interesting is that from the console this still works:

wp.blocks.registerBlockStyle( 'core/latest-posts', {
    name: 'fancy-latest-posts',
    label: 'Fancy Latest Posts',
} );

@noisysocks
Copy link
Member

Thanks for the report! I can only reproduce it when running the Gutenberg plugin on WP 5.7. It's fixed in 5.8-alpha. Going to de-prioritse the issue in the Widgets project board.

@noisysocks noisysocks changed the title Widget screen: Custom block styles are not available Widget screen: Custom block styles are not available when running WP 5.7 Jun 1, 2021
@draganescu
Copy link
Contributor

If it's fixed in 5.8-alpha why not close this issue?

@carolinan
Copy link
Contributor Author

I can confirm that this is fixed. I don't believe there are any backporting to 5.7 concerns, as far as I know, that is not planned.
I am not sure why it is listed in maybe later. Please reopen if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants