-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsyncedA collection of blocks that can be synced (previously reusable blocks) or unsynced[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
When testing the block patterns that are planned for Twenty Fourteen,
I learnt that the patterns show correctly in 10.6.2 but not in 10.7 RC1.
With 10.7 RC1, only two of the patterns show (summary and contact).
I was able to reproduce this in my own themes. It seems to be related to spacing inside the content.
The following does not work, the pattern is not selectable:
register_block_pattern(
'twentyfourteen/list',
array(
'title' => esc_html__( 'List', 'twentyfourteen' ),
'categories' => array( 'twentyfourteen' ),
'viewportWidth' => 1000,
'content' => '<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"40%"} -->
<div class="wp-block-column" style="flex-basis:40%">
... truncated
The following does work:
register_block_pattern(
'twentyfourteen/list',
array(
'title' => esc_html__( 'List', 'twentyfourteen' ),
'categories' => array( 'twentyfourteen' ),
'viewportWidth' => 1000,
'content' => '<!-- wp:columns --><div class="wp-block-columns"><!-- wp:column {"width":"40%"} --><div class="wp-block-column" style="flex-basis:40%"><!-- wp:heading {"style":{"typography":{"fontSize":45}}} --><h2 style="font-size:45px">' . esc_html__( '2001', 'twentyfourteen' ) . '</h2><!-- /wp:heading --></div><!-- /wp:column --><!-- wp:column --><div class="wp-block-column"><!-- wp:paragraph --><p><em>' . esc_html__( 'My first year of traveling. I visited China, Thailand, Japan, and India.', 'twentyfourteen' ) . '</em></p><!-- /wp:paragraph --></div><!-- /wp:column --></div>
... truncated
Step-by-step reproduction instructions
- Download the patch for the patterns in Twenty Fourteen, or copy the pattern code into your current theme.
- In the editor, open the inserter, select patterns, select the Twenty Fourteen category, and see that only two patterns show.
Expected behaviour
All registered patterns should show
Actual behaviour
Only two of the patterns show.
WordPress information
- WordPress version: 5.7.2
- Gutenberg version: 10.7.0 RC1
- Are all plugins except Gutenberg deactivated? yes
- Are you using a default theme (e.g. Twenty Twenty-One)? Twenty Fourteen with above pull request. Armando.
Device information
- Device: Desktop
- Operating system: Windows 10
- Browser: Chrome Version 90.0.4430.212
kjellr, richtabor, justintadlock, chthonic-ds and strarsis
Metadata
Metadata
Assignees
Labels
[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsyncedA collection of blocks that can be synced (previously reusable blocks) or unsynced[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended